Build failed when installing ns3

10,057 views
Skip to first unread message

Nicole Cui

unread,
Feb 23, 2014, 12:07:54 AM2/23/14
to ns-3-...@googlegroups.com
Hello, everyone,

I have downloaded ns-3-allinone with Mercurial, when runing build.py, the following error showed:


[1543/1695] cxx: src/topology-read/helper/topology-reader-helper.cc -> build/src/topology-read/helper/topology-reader-helper.cc.1.o
Waf: Leaving directory `/home/ns3/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'ns3module_core' failed (exit status 1):
        {task 42775312: cxx ns3module.cc -> ns3module.cc.8.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-fvisibility=hidden', '-Wno-array-bounds', '-pthread', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-I.', '-I..', '-Isrc/core/bindings', '-I../src/core/bindings', '-I/usr/include/python2.7', '-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/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-I/usr/include/libxml2', '-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_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DNS_DEPRECATED=', '-DNS3_DEPRECATED_H', '-DNDEBUG', '-DNDEBUG', 'src/core/bindings/ns3module.cc', '-c', '-o', 'src/core/bindings/ns3module.cc.8.o']
Traceback (most recent call last):
  File "./build.py", line 170, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 161, in main
    build_ns3(config, build_examples, build_tests, args, build_options)
  File "./build.py", line 81, in build_ns3
    run_command([sys.executable, "waf", "build"] + build_options)
  File "/home/hongmanteam/ns3/ns-3-allinone/util.py", line 24, in run_command
    raise CommandError("Command %r exited with code %i" % (argv, retval))
util.CommandError: Command ['/usr/bin/python', 'waf', 'build'] exited with code 1

Since I am a begginner and don't know how to resolve this,  I hope your help. Thanks so much.

nicole

Tommaso Pecorella

unread,
Feb 23, 2014, 2:48:10 AM2/23/14
to ns-3-...@googlegroups.com
Hi,

that's a Python bindings error. Please update ns-3-dev and rebuild. The latest push should fix that.

T.

Nicole Cui

unread,
Feb 24, 2014, 12:39:58 PM2/24/14
to ns-3-...@googlegroups.com
Hi, Tommaso,

I updated ns-3-dev with hg pull -u and ./waf -p, then rebuild, build finished successfully. But summary of ns3 features exit problems showed as follows,

---- Summary of optional NS-3 features:
Build profile                 : debug
Build directory               : /home/cuimei/repos/ns-3-allinone/ns-3-dev/build
Python Bindings               : not enabled (PyBindGen version not correct and newer version could not be retrieved)
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration     : not enabled (OpenFlow not enabled (see option --with-openflow))
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : not enabled (Python Bindings are needed but not enabled)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : not enabled (defaults to disabled)
Build examples                : not enabled (defaults to disabled)
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (4.591s)

The highlights with red color should be "enable" according to tutorial,  how to solve these now? 
I am appreciated for your reply.

nicole


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/qLTtw1cKy_c/unsubscribe.
To unsubscribe from this group and all its topics, 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/groups/opt_out.

Nicole Cui

unread,
Feb 26, 2014, 7:49:32 PM2/26/14
to ns-3-...@googlegroups.com
Hi Tommaso,

Thanks for your help, it works. However, there is a new problem with yellow color. I don't know if this will effect the work which I build a ad hoc routing protocol in cognitive radio network? Besides, I run a example with wireless/wifi-simple-grid.cc, it run well with ./waf --run file, but I also want to get netanim picture and performance plot, how to do ?
can you recommend the implementation video? 


Best Regards!
nicole

--- Summary of optional NS-3 features:
Build profile                 : optimized
Build directory               : /home/cuimei/repos/ns-3-allinone/ns-3-dev/build
Python Bindings               : enabled
Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration     : not enabled (OpenFlow not enabled (see option --with-openflow))
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : enabled
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : enabled
Build examples                : enabled
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (7.148s)



2014-02-24 15:39 GMT-05:00 Tommaso Pecorella <tomm...@gmail.com>:
Hi Nicole,

the PyBindGen thing can be fixed by going into /home/cuimei/repos/ns-3-allinone/ and issuing the command ./downlad
It will refresh pybindgen (it has been updated).

As for NSC, don't worry about it. The tutorial is slightly outdated.

Cheers,

T.

Tommaso Pecorella

unread,
Feb 27, 2014, 2:03:37 AM2/27/14
to ns-3-...@googlegroups.com
Hi,

no, it will not affect anything, unless you change the internal ns.3 APIs (in this case you'll need to rescan the API to avoid Python-related errors, and you'll need pybindgen).

About netanim, search the nsnam wiki for specific netanim building  instructions. The examples folder contains some examples using it, just check them.


Cheers,

T.

Tommaso Pecorella

unread,
Feb 24, 2014, 3:39:57 PM2/24/14
to ns-3-...@googlegroups.com
Hi Nicole,

the PyBindGen thing can be fixed by going into /home/cuimei/repos/ns-3-allinone/ and issuing the command ./downlad
It will refresh pybindgen (it has been updated).

As for NSC, don't worry about it. The tutorial is slightly outdated.

Cheers,

T.


On Monday, February 24, 2014 6:39:58 PM UTC+1, Nicole Cui wrote:

Vandana Kumari

unread,
Feb 14, 2018, 8:57:15 AM2/14/18
to ns-3-users


On Sunday, February 23, 2014 at 10:37:54 AM UTC+5:30, Nicole Cui wrote:
Hello, everyone,

I have downloaded ns-3-allinone with Mercurial, when running build.py, the following error showed:

jnritw...@gmail.com

unread,
Apr 24, 2018, 5:14:35 AM4/24/18
to ns-3-users
hello everyone,
After installing ns3.26 in Ubuntu 16.04lts .then after giving ./waf command then i get this error
../scratch/impsmac.cc:24:26: fatal error: ns3/mac-gploth: No such file or directory
 #include "ns3/mac-gploth"
                          ^
compilation terminated.

Waf: Leaving directory `/home/ritwick/ns-allinone-3.26/ns-3.26/build'
Build failed
 -> task in 'impsmac' failed (exit status 1):
    {task 139800580156240: cxx impsmac.cc -> impsmac.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-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/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-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', '../scratch/impsmac.cc', '-c', '-o', '/home/ritwick/ns-allinone-3.26/ns-3.26/build/scratch/impsmac.cc.1.o'].

i am new to ns3.26.so please help me by giving the solution .Help is really appreciated.
Ritwik

pdbarnes

unread,
Apr 26, 2018, 12:20:30 AM4/26/18
to ns-3-users
The error is pretty clear:
../scratch/impsmac.cc:24:26: fatal error: ns3/mac-gploth: No such file or directory
#include "ns3/mac-gploth"

Did you mean

#include “ns3/mac-gplot.h”

Peter

2017m...@smvdu.ac.in

unread,
Sep 13, 2018, 1:27:17 AM9/13/18
to ns-3-users

hello sir,
i'm getting the same error in the installation of ns3 as was faced by you. can u help me in resolving this issue ?

Muntaha Saleem

unread,
Oct 25, 2018, 12:18:03 PM10/25/18
to ns-3-users
hi can u please tell me how to update ns-3 dev and what is it? i am a beginner and trying to install ns 3 on mac and getting this same error code 1 kindly help me step by step

pdbarnes

unread,
Oct 25, 2018, 11:49:57 PM10/25/18
to ns-3-users
The step by step instructions are in the first chapter of the tutorial.

Peter

beletu dagne

unread,
May 31, 2019, 7:03:11 AM5/31/19
to ns-3-users
Waf: Leaving directory `/home/krwel/ns3/ns-allinone-3.27/ns-3.27/build'
Build failed
 -> task in 'lab4olsr' failed (exit status 1):
    {task 139974032972112: cxx lab4olsr.cc -> lab4olsr.cc.2.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-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/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-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', '../scratch/lab4olsr.cc', '-c', '-o', '/home/krwel/ns3/ns-allinone-3.27/ns-3.27/build/scratch/lab4olsr.cc.2.o']
krwel@krwel-OptiPlex-3040:~/ns3/ns-allinone-3.27/ns-3.27$

Bodhy Krishna

unread,
May 15, 2022, 4:28:00 AM5/15/22
to ns-3-users
Hai,

     Me too have same problem while running bulid.py. But I dont know how to update ns-3-dev

Bodhy Krishna

unread,
May 15, 2022, 4:29:21 AM5/15/22
to ns-3-users
Waf: Leaving directory `/home/oem/ns3/ns-allinone-3.27/ns-3.27/build'
Build failed
 -> task in 'ns3-mesh' failed (exit status 1):
    {task 139820518040784: cxx ie-dot11s-beacon-timing.cc -> ie-dot11s-beacon-timing.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-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', '../src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc', '-c', '-o', '/home/oem/ns3/ns-allinone-3.27/ns-3.27/build/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc.1.o']

Traceback (most recent call last):
  File "./build.py", line 176, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 167, in main

    build_ns3(config, build_examples, build_tests, args, build_options)
  File "./build.py", line 87, in build_ns3

    run_command([sys.executable, "waf", "build"] + build_options)
  File "/home/oem/ns3/ns-allinone-3.27/util.py", line 25, in run_command

    raise CommandError("Command %r exited with code %i" % (argv, retval))
util.CommandError: Command ['/usr/bin/python', 'waf', 'build'] exited with code 1


Reply all
Reply to author
Forward
0 new messages