Aqua-sim ng integration error[need help]

520 views
Skip to first unread message

Abir Hossain

unread,
Jun 12, 2016, 1:42:02 AM6/12/16
to ns-3-users

Dear
i successfully installed ns-3 but trying to integrate aqua-sim ng in the ns-3 source directory using aqua-sim ng documentation.pdf. but it shows error and examples are not executed.
when i put the command as   ./waf --run broadcastMAC_example

 it shows the following error

wscript:122: Warning: (in aqua-sim-ng) Requested to build modular python bindings, but apidefs dir not found => skipped the bindings.
  print()
Waf: Leaving directory `/home/abir/ns3/ns-allinone-3.25/ns-3.25/build'
source not found: 'model/aqua-sim-routing-ddos.cc' in bld(features=['cxx', 'cxxshlib', 'ns3module'], ns3_dir_location='src/aqua-sim-ng', pcfilegen=bld(features='ns3pcfile', idx=2, meths=[], prec=defaultdict(<type 'list'>, {}), _name='', source='', module='ns3-aqua-sim-ng', mappings={}, path=/home/abir/ns3/ns-allinone-3.25/ns-3.25/src/aqua-sim-ng, target='') in /home/abir/ns3/ns-allinone-3.25/ns-3.25/src/aqua-sim-ng, use=['ns3-network', 'ns3-energy', 'ns3-mobility'], mappings={}, uselib='', meths=['_add_test_code', 'apply_bundle', 'process_rule', 'process_source', 'apply_link', 'apply_implib', 'process_use', 'propagate_uselib_vars', 'apply_incpaths', 'apply_vnum', 'collect_compilation_db_tasks', 'install_boost', 'set_macosx_deployment_target'], prec=defaultdict(<type 'list'>, {}), source=['model/aqua-sim-address.cc', 'model/aqua-sim-pt-tag.cc', 'model/aqua-sim-channel.cc', 'model/aqua-sim-energy-model.cc', 'model/aqua-sim-hash-table.cc', 'model/aqua-sim-header.cc', 'model/aqua-sim-header-goal.cc', 'model/aqua-sim-header-mac.cc', 'model/aqua-sim-mac.cc', 'model/aqua-sim-mobility-pattern.cc', 'model/aqua-sim-modulation.cc', 'model/aqua-sim-net-device.cc', 'model/aqua-sim-node.cc', 'model/aqua-sim-noise-generator.cc', 'model/aqua-sim-phy.cc', 'model/aqua-sim-phy-cmn.cc', 'model/aqua-sim-propagation.cc', 'model/aqua-sim-range-propagation.cc', 'model/aqua-sim-simple-propagation.cc', 'model/aqua-sim-routing.cc', 'model/aqua-sim-signal-cache.cc', 'model/aqua-sim-sinr-checker.cc', 'helper/aqua-sim-helper.cc', 'model/aqua-sim-mac-broadcast.cc', 'model/aqua-sim-mac-fama.cc', 'model/aqua-sim-mac-aloha.cc', 'model/aqua-sim-mac-copemac.cc', 'model/aqua-sim-mac-goal.cc', 'model/aqua-sim-mac-sfama.cc', 'model/aqua-sim-mac-uwan.cc', 'model/aqua-sim-rmac.cc', 'model/aqua-sim-rmac-buffer.cc', 'model/aqua-sim-tmac.cc', 'model/aqua-sim-routing-static.cc', 'model/aqua-sim-header-routing.cc', 'model/aqua-sim-routing-dynamic.cc', 'model/aqua-sim-routing-flooding.cc', 'model/aqua-sim-routing-buffer.cc', 'model/aqua-sim-routing-vbf.cc', 'model/aqua-sim-routing-dbr.cc', 'model/aqua-sim-routing-vbva.cc', 'model/aqua-sim-mobility-kinematic.cc', 'model/aqua-sim-mobility-rwp.cc', 'model/aqua-sim-synchronization.cc', 'model/aqua-sim-localization.cc', 'model/aqua-sim-routing-ddos.cc'], test=False, is_ns3_module=True, install_path='${LIBDIR}', module_deps=['network', 'energy', 'mobility'], dependencies=['network', 'energy', 'mobility'], path=/home/abir/ns3/ns-allinone-3.25/ns-3.25/src/aqua-sim-ng, vnum=None, posted=True, is_static=False, target='../../ns3.25-aqua-sim-ng-debug', idx=1, _name='ns3-aqua-sim-ng') in /home/abir/ns3/ns-allinone-3.25/ns-3.25/src/aqua-sim-ng
 

need help.

Tommaso Pecorella

unread,
Jun 12, 2016, 6:26:27 AM6/12/16
to ns-3-users
source not found: 'model/aqua-sim-routing-ddos.cc'

This rings a bell. Double check that you have all the directories in the right place (and with the right names).

T.

Abir Hossain

unread,
Jun 15, 2016, 2:42:15 AM6/15/16
to ns-3-users
i comment out the following lines in the following directory  /aqua-sim-ng/wscript

#'model/aqua-sim-routing-ddos.cc',

'#model/aqua-sim-routing-ddos.h',

and also in the following directory /aqua-sim-ng/examples/wscript

  #obj = bld.create_ns3_program('ddos', ['network', 'mobility', 'energy', 'applications', 'aqua-sim-ng'])
    obj.source = 'ddos.cc'
#obj = bld.create_ns3_program('aqua-sim-example', ['network', 'mobility', 'energy', 'applications', 'aqua-sim-ng'])
#obj.source = 'aqua-sim-example.cc'

and now run the command as ./waf --run broadcastMAC_example --disable-python
but still the error occurs as

wscript:122: Warning: (in aqua-sim-ng) Requested to build modular python bindings, but apidefs dir not found => skipped the bindings.
  if i == 3:
[1615/2667] Compiling src/aqua-sim-ng/examples/GOAL_string.cc
[1616/2667] Compiling src/aqua-sim-ng/examples/broadcastMAC_example.cc
[1618/2667] Compiling src/aqua-sim-ng/model/aqua-sim-mobility-kinematic.cc
[1620/2667] Compiling src/aqua-sim-ng/model/aqua-sim-routing-buffer.cc
[1670/2667] Compiling src/aqua-sim-ng/model/aqua-sim-routing-flooding.cc
[1896/2667] Compiling src/aqua-sim-ng/model/aqua-sim-routing-dynamic.cc
In file included from ./ns3/aqua-sim-ng-module.h:44:0,
                 from ../src/aqua-sim-ng/examples/GOAL_string.cc:25:
./ns3/aqua-sim-routing-dbr.h:86:7: error: redefinition of ‘class ns3::QueueItem’
 class QueueItem : public Object {
       ^
In file included from ./ns3/node.h:29:0,
                 from ./ns3/application.h:28,
                 from ./ns3/application-container.h:26,
                 from ./ns3/network-module.h:12,
                 from ../src/aqua-sim-ng/examples/GOAL_string.cc:22:
./ns3/net-device.h:55:7: error: previous definition of ‘class ns3::QueueItem’
 class QueueItem : public SimpleRefCount<QueueItem>
       ^

In file included from ./ns3/aqua-sim-ng-module.h:44:0,
                 from ../src/aqua-sim-ng/examples/broadcastMAC_example.cc:25:
./ns3/aqua-sim-routing-dbr.h:86:7: error: redefinition of ‘class ns3::QueueItem’
 class QueueItem : public Object {
       ^
In file included from ./ns3/node.h:29:0,
                 from ./ns3/application.h:28,
                 from ./ns3/application-container.h:26,
                 from ./ns3/network-module.h:12,
                 from ../src/aqua-sim-ng/examples/broadcastMAC_example.cc:22:
./ns3/net-device.h:55:7: error: previous definition of ‘class ns3::QueueItem’
 class QueueItem : public SimpleRefCount<QueueItem>
       ^

Waf: Leaving directory `/home/abir/ns3/ns-allinone-3.25/ns-3.25/build'
Build failed
 -> task in 'GOAL_string' failed (exit status 1):
    {task 140693929504336: cxx GOAL_string.cc -> GOAL_string.cc.3.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/freetype2', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/harfbuzz', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '../src/aqua-sim-ng/examples/GOAL_string.cc', '-c', '-o', '/home/abir/ns3/ns-allinone-3.25/ns-3.25/build/src/aqua-sim-ng/examples/GOAL_string.cc.3.o']
 -> task in 'broadcastMAC_example' failed (exit status 1):
    {task 140693929503120: cxx broadcastMAC_example.cc -> broadcastMAC_example.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/freetype2', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/harfbuzz', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '../src/aqua-sim-ng/examples/broadcastMAC_example.cc', '-c', '-o', '/home/abir/ns3/ns-allinone-3.25/ns-3.25/build/src/aqua-sim-ng/examples/broadcastMAC_example.cc.1.o']



need help please.

Konstantinos

unread,
Jun 15, 2016, 3:12:57 AM6/15/16
to ns-3-users
Hi Abir,

When you comment out files in wscript file, those files are not being compiled and along with them classes defined inside those files.
You can search online for the error you got "error: redefinition of ‘class ns3::QueueItem’"  and see possible solutions.
Message has been deleted

Tommaso Pecorella

unread,
Jun 19, 2016, 11:21:55 AM6/19/16
to ns-3-users
Hi,

I didn't want to reply at want to reply to this thread at first, mainly because there's no way to explain the issue without heavily insulting who's asking it. Insulting their intelligence, of course.
The main issue is: if you're using this, then you don't know the following:
1) How to read an error message, and
2) What are the C++ basics.

I can admit that "Queueitem" is a pretty common name, but especially because it is a pretty obvious name an error about it should have raised some suspects.
and then check if there are multiple definitions of an object named "Queueitem" around.

About the solution, that would be really an insult to anyone's intelligence.

T.

On Sunday, June 19, 2016 at 4:07:17 PM UTC+2, Rashid Alkindi wrote:
Hi All,

i have the same problem , and i follow Abir steps by commented the lines !! but still showing me "error: redefinition of ‘class ns3::QueueItem’
 class QueueItem"
!! how i could solve that please.

Thanks
Message has been deleted

Abir Hossain

unread,
Jun 21, 2016, 1:39:05 AM6/21/16
to ns-3-users
Dear
i am really sorry for the inconvenience.The works makes me crazy that's why i query in such a way.

and thanks your response.

Safdar Hussain Bouk

unread,
Jul 12, 2016, 10:35:44 PM7/12/16
to ns-3-users
#obj = bld.create_ns3_program('ddos', ['network', 'mobility', 'energy', 'applications', 'aqua-sim-ng'])
    obj.source = 'ddos.cc'
#obj = bld.create_ns3_program('aqua-
sim-example', ['network', 'mobility', 'energy', 'applications', 'aqua-sim-ng'])
#obj.source = 'aqua-sim-example.cc'

I think you forgot to comment the " obj.source = 'ddos.cc'" to  "# obj.source = 'ddos.cc'"

I hope this will work.
Reply all
Reply to author
Forward
0 new messages