undefined reference to `ns3::QuaggaHelper::QuaggaHelper()'

908 views
Skip to first unread message

Carlos Lucas

unread,
Jul 22, 2014, 2:46:17 PM7/22/14
to ns-3-...@googlegroups.com


I need to use the quagga ospf protocol but get error reference in build

I have the reference to quagga helper in my script in source/ns-3-dce/myscripts/mynet.cc

‪#‎include‬ "ns3/core-module.h"
#include "ns3/dce-module.h"
#include "ns3/quagga-helper.h"

(.....)
                  QuaggaHelper quagga;
quagga.EnableOspfDebug (nodes);
quagga.EnableZebraDebug (nodes);
quagga.Install (nodes);
(....)

but y get this error:

/dce/source/ns-3-dce/build/../myscripts/mynetscript.cc:193: undefined reference to `ns3::QuaggaHelper::QuaggaHelper()'
collect2: ld returned 1 exit status
undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
undefined reference to `ns3::QuaggaHelper::EnableOspfDebug(ns3::NodeContainer)'
dce/source/ns-3-dce/build/../myscripts/mynetscript.cc:209: undefined reference to `ns3::QuaggaHelper::EnableZebraDebug(ns3::NodeContainer)'

...
...


can you help me?

Hajime Tazaki

unread,
Jul 28, 2014, 7:51:59 PM7/28/14
to ns-3-...@googlegroups.com

it seems waf can't find libns3-dce-quagga.so.
how did you install dce-quagga ?

recent document recommends to use bake to install them.

http://www.nsnam.org/docs/dce/manual-quagga/html/getting-started.html#getting-started

and it would be helpful if you share the result of the
following command (console output).

% ./waf -v

when you faced the undefined reference issue.

-- Hajime

At Tue, 22 Jul 2014 11:46:17 -0700 (PDT),
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.

Carlos Lucas

unread,
Jul 28, 2014, 8:36:32 PM7/28/14
to ns-3-...@googlegroups.com


/home/carlos/DesdeCero/source/ns-3-dce# ./waf -vv --run myscriptnet 
Waf: Entering directory `/home/carlos/DesdeCero/source/ns-3-dce/build'

--------------------------------------------------------------------
 Python bindings compilation 
--------------------------------------------------------------------
Erroneous order constraint 'before'='command' on task class 'apiscan_task'
Erroneous order constraint 'after'='gen_ns3_module_header' on task class 'apiscan_task'
Erroneous order constraint 'after'='ns3header' on task class 'apiscan_task'
[ 11/352] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc
[111/352] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc
[142/352] cxxprogram: build/myscripts/myscriptnet.cc.12.o -> build/bin/myscriptnet
17:27:09 runner ['/usr/bin/g++', '-Wl,--no-as-needed', '-pthread', '-pthread', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', '-pthread', '-Wl,-Bdynamic', 'myscripts/myscriptnet.cc.12.o', '-o', '/home/carlos/DesdeCero/source/ns-3-dce/build/bin/myscriptnet', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Llib', '-Llib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-L/home/carlos/DesdeCero/build/lib', '-lns3-dce', '-lns3-netlink', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-internet-debug', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-point-to-point-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-tap-bridge-debug', '-lns3.20-internet-debug', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-netanim-debug', '-lns3.20-wimax-debug', '-lns3.20-lte-debug', '-lns3.20-uan-debug', '-lns3.20-spectrum-debug', '-lns3.20-buildings-debug', '-lns3.20-virtual-net-device-debug', '-lns3.20-point-to-point-debug', '-lns3.20-csma-debug', '-lns3.20-antenna-debug', '-lns3.20-applications-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-energy-debug', '-lns3.20-internet-debug', '-lns3.20-wifi-debug', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-propagation-debug', '-lns3.20-mobility-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-wifi-debug', '-lns3.20-propagation-debug', '-lns3.20-mobility-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-csma-debug', '-lns3.20-applications-debug', '-lns3.20-internet-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-mobility-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-point-to-point-layout-debug', '-lns3.20-netanim-debug', '-lns3.20-wimax-debug', '-lns3.20-lte-debug', '-lns3.20-uan-debug', '-lns3.20-spectrum-debug', '-lns3.20-buildings-debug', '-lns3.20-virtual-net-device-debug', '-lns3.20-point-to-point-debug', '-lns3.20-csma-debug', '-lns3.20-antenna-debug', '-lns3.20-applications-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-energy-debug', '-lns3.20-internet-debug', '-lns3.20-wifi-debug', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-propagation-debug', '-lns3.20-mobility-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-lte-debug', '-lns3.20-spectrum-debug', '-lns3.20-buildings-debug', '-lns3.20-virtual-net-device-debug', '-lns3.20-point-to-point-debug', '-lns3.20-csma-debug', '-lns3.20-antenna-debug', '-lns3.20-propagation-debug', '-lns3.20-mobility-debug', '-lns3.20-applications-debug', '-lns3.20-internet-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-visualizer-debug', '-lns3.20-internet-debug', '-lns3.20-wifi-debug', '-lns3.20-point-to-point-debug', '-lns3.20-bridge-debug', '-lns3.20-propagation-debug', '-lns3.20-mobility-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-applications-debug', '-lns3.20-internet-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-emu-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-flow-monitor-debug', '-lns3.20-internet-debug', '-lns3.20-config-store-debug', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lglib-2.0', '-lxml2', '-lns3.20-bridge-debug', '-lns3.20-mpi-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lns3.20-topology-read-debug', '-lns3.20-network-debug', '-lns3.20-stats-debug', '-lsqlite3', '-lns3.20-core-debug', '-lrt', '-lgsl', '-lgslcblas', '-lm']
[154/352] lib/pkgconfig/libns3-dev-dce-quagga-debug.pc:  -> build/myscripts/ns-3-dce-quagga/lib/pkgconfig/libns3-dev-dce-quagga-debug.pc
myscripts/myscriptnet.cc.12.o: In function `main':
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:199: undefined reference to `ns3::QuaggaHelper::QuaggaHelper()'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:472: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:474: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:526: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:528: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:628: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
myscripts/myscriptnet.cc.12.o:/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:630: more undefined references to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)' follow
myscripts/myscriptnet.cc.12.o: In function `main':
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:653: undefined reference to `ns3::QuaggaHelper::EnableOspfDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:654: undefined reference to `ns3::QuaggaHelper::EnableZebraDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:655: undefined reference to `ns3::QuaggaHelper::Install(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:663: undefined reference to `ns3::QuaggaHelper::EnableOspfDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:664: undefined reference to `ns3::QuaggaHelper::EnableZebraDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:665: undefined reference to `ns3::QuaggaHelper::Install(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:674: undefined reference to `ns3::QuaggaHelper::EnableOspfDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:675: undefined reference to `ns3::QuaggaHelper::EnableZebraDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:676: undefined reference to `ns3::QuaggaHelper::Install(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:684: undefined reference to `ns3::QuaggaHelper::EnableOspfDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:685: undefined reference to `ns3::QuaggaHelper::EnableZebraDebug(ns3::NodeContainer)'
/home/carlos/DesdeCero/source/ns-3-dce/build/../myscripts/myscriptnet.cc:686: undefined reference to `ns3::QuaggaHelper::Install(ns3::NodeContainer)'
collect2: ld returned 1 exit status
Waf: Leaving directory `/home/carlos/DesdeCero/source/ns-3-dce/build'
  File "./waf", line 161, in <module>
    Scripting.waf_entry_point(cwd, VERSION, wafdir)
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 97, in waf_entry_point
    run_commands()
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 151, in run_commands
    run_command(cmd_name)
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 143, in run_command
    ctx.execute()
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 345, in execute
    return execute_method(self)
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Build.py", line 98, in execute
    self.execute_build()
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Build.py", line 107, in execute_build
    self.compile()
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Tools/errcheck.py", line 124, in check_compile
    ret=self.orig_compile()
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Build.py", line 190, in compile
    raise Errors.BuildError(self.producer.error)
  File "/home/carlos/DesdeCero/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Errors.py", line 25, in __init__
    WafError.__init__(self,self.format_error())
 
Build failed
 -> task in 'bin/myscriptnet' failed (exit status 1): 

Carlos Lucas

unread,
Jul 28, 2014, 8:56:43 PM7/28/14
to ns-3-...@googlegroups.com
to solve the problem: I copy the script and rename it to:


1. --->     /source/ns-3-dce/myscripts/myscriptnet.cc         to         /source/ns-3-dce/myscripts/ns-3-dce-quagga/example/dce-quagga-myscriptnet.cc


2. -->then i modify wscript

 /home/carlos/DesdeCero/source/ns-3-dce/myscripts/ns-3-dce-quagga/wscript

I add the lines:

                     module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point', 'csma', 'applications', 'netanim', 'network', 'dce', 'netlink', 'flow-monitor'], 
                     target='bin/dce-quagga-myscriptnet',
                     source=['example/dce-quagga-myscriptnet.cc']) 



and the script run successfully



El lunes, 28 de julio de 2014 18:51:59 UTC-5, Hajime escribió:

Hajime Tazaki

unread,
Jul 28, 2014, 9:10:52 PM7/28/14
to ns-3-...@googlegroups.com
It seems that wscripts failed to detect libraries in myscripts directory. I will look at this issue. 

Thanks for the report. 

-- Hajime

Carlos Lucas

unread,
Jan 5, 2015, 6:00:57 PM1/5/15
to ns-3-...@googlegroups.com
Please help in DCE1.4 (dce-quagga-1.4) is the same error with quagga

undefined reference to `ns3::QuaggaHelper::QuaggaHelper()'
myscripts/dce-quagga-enruta.cc.11.o: In function `main':
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:199: undefined reference to `ns3::QuaggaHelper::QuaggaHelper()'
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:472: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:474: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:526: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:528: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'
/root/dce/source/ns-3-dce/build/../myscripts/dce-quagga-enruta.cc:628: undefined reference to `ns3::QuaggaHelper::EnableOspf(ns3::NodeContainer, char const*)'

Carlos Lucas

unread,
Jan 5, 2015, 10:17:51 PM1/5/15
to ns-3-...@googlegroups.com
I solved :), the DCE-1-4 is not compatible with ubuntu 12.04.4 but is worked with Ubuntu 14.04

Hajime Tazaki

unread,
Jan 29, 2015, 8:44:24 PM1/29/15
to ns-3-...@googlegroups.com

Hi Carlos,

now I found the issue is an incorrect handling of listing
directories and files under the myscripts directory. if
ns-3-dce-quagga is listed (in 'wscript') _before_ your
script, then waf can successfully detect dce-quagga module.

I filed a bug entry. patches are welcome ;)

https://www.nsnam.org/bugzilla/show_bug.cgi?id=2051


-- Hajime

At Mon, 5 Jan 2015 19:17:51 -0800 (PST),
Carlos Lucas wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (quoted-printable)>]
> [1.2 <text/html; UTF-8 (quoted-printable)>]
>
Reply all
Reply to author
Forward
0 new messages