ns-3 compilation error on Ubuntu

884 views
Skip to first unread message

Maher Heal

unread,
May 16, 2018, 3:09:30 PM5/16/18
to ns-3-users
I installed ns-3 using mercurial by following the instructions in https://www.nsnam.org/wiki/Installation  I am getting the following error when I compile. Please help:
Waf: Leaving directory `/home/maherheal/repos/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'ns3module_internet' failed (exit status 1): 
{task 140024971470480: cxx ns3module.cc -> ns3module.cc.8.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-fno-strict-aliasing', '-fstack-protector-strong', '-fwrapv', '-fvisibility=hidden', '-Wno-array-bounds', '-pthread', '-pthread', '-I.', '-I..', '-Isrc/internet/bindings', '-I../src/internet/bindings', '-I/usr/include/python2.7', '-I/usr/include/x86_64-linux-gnu/python2.7', '-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', '-DNS_DEPRECATED=', '-DNS3_DEPRECATED_H', '-DHAVE_PYEXT=1', '-D_FORTIFY_SOURCE=2', '-DNDEBUG', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', 'src/internet/bindings/ns3module.cc', '-c', '-o', '/home/maherheal/repos/ns-3-allinone/ns-3-dev/build/src/internet/bindings/ns3module.cc.8.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/maherheal/repos/ns-3-allinone/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

Tom Henderson

unread,
May 16, 2018, 3:30:54 PM5/16/18
to ns-3-...@googlegroups.com
On 05/16/2018 12:09 PM, Maher Heal wrote:
> I installed ns-3 using mercurial by following the instructions in
> https://www.nsnam.org/wiki/Installation  I am getting the following
> error when I compile. Please help:
> Waf: Leaving directory
> `/home/maherheal/repos/ns-3-allinone/ns-3-dev/build'

ns-3-dev has some outdated Python bindings that I will fix shortly. In
the meantime, you can try to disable Python if you do not need the
bindings; e.g.

./waf configure --disable-python --enable-examples --enable-tests &&
./waf build

- Tom


Maher Heal

unread,
May 17, 2018, 8:01:19 AM5/17/18
to ns-3-users
I got the following messages:

maherheal@ubuntu:~/repos/ns-3-allinone$ ./waf configure --disable-python --enable-examples --enable-tests &&
> ./waf build
bash: ./waf: No such file or directory
maherheal@ubuntu:~/repos/ns-3-allinone$ 


I am totally newbie.

Tom Henderson

unread,
May 17, 2018, 9:58:13 AM5/17/18
to ns-3-...@googlegroups.com
On 05/17/2018 05:01 AM, Maher Heal wrote:
> I got the following messages:
>
> maherheal@ubuntu:~/repos/ns-3-allinone$ ./waf configure
> --disable-python --enable-examples --enable-tests &&
> > ./waf build
> bash: ./waf: No such file or directory
> maherheal@ubuntu:~/repos/ns-3-allinone$
>
>
> I am totally newbie.

You are trying from the wrong directory.  cd into ns-3-dev.


Bruna Alves da Silva

unread,
May 17, 2018, 11:16:10 AM5/17/18
to ns-3-...@googlegroups.com
You can try to run build on ns-3-allinone with

./build.py













--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
--- 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+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
Atenciosamente, 

Bruna Alves da Silva

Master Student in Computer Science at CIn-UFPE
Phone: +55 81 9 95210802 

Dpk Rohilla

unread,
May 17, 2018, 1:05:51 PM5/17/18
to ns-3-...@googlegroups.com
Yeah it works
Thanks

On Thu 17 May, 2018, 8:46 PM Bruna Alves da Silva, <ba...@cin.ufpe.br> wrote:
You can try to run build on ns-3-allinone with

./build.py







2018-05-17 10:57 GMT-03:00 Tom Henderson <to...@tomh.org>:
On 05/17/2018 05:01 AM, Maher Heal wrote:

I got the following messages:



maherheal@ubuntu:~/repos/ns-3-allinone$ ./waf configure

--disable-python --enable-examples --enable-tests &&

> ./waf build

bash: ./waf: No such file or directory

maherheal@ubuntu:~/repos/ns-3-allinone$





I am totally newbie.



You are trying from the wrong directory.  cd into ns-3-dev.





--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
--- 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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
Atenciosamente, 

Bruna Alves da Silva

Master Student in Computer Science at CIn-UFPE
Phone: +55 81 9 95210802 

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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.

Maher Heal

unread,
May 18, 2018, 5:53:39 AM5/18/18
to ns-3-users
That's what I tried using ./build.py and I got the compilation error. Thanks!


On Thursday, May 17, 2018 at 4:16:10 PM UTC+1, Bruna Alves da Silva wrote:
You can try to run build on ns-3-allinone with

./build.py







2018-05-17 10:57 GMT-03:00 Tom Henderson <to...@tomh.org>:
On 05/17/2018 05:01 AM, Maher Heal wrote:

I got the following messages:



maherheal@ubuntu:~/repos/ns-3-allinone$ ./waf configure

--disable-python --enable-examples --enable-tests &&

> ./waf build

bash: ./waf: No such file or directory

maherheal@ubuntu:~/repos/ns-3-allinone$





I am totally newbie.



You are trying from the wrong directory.  cd into ns-3-dev.





--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
--- 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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Maher Heal

unread,
May 18, 2018, 5:58:11 AM5/18/18
to ns-3-users
what works?? It is not working with me. Could you tell me how to configure and access the waf? Thanks!

Dpk Rohilla

unread,
May 18, 2018, 6:35:21 AM5/18/18
to ns-3-...@googlegroups.com
Where you are using this build command
use it from
ns3allinone
Not from ns3allinone/ns3

Maher Heal

unread,
Aug 1, 2018, 5:37:14 AM8/1/18
to ns-3-users
I have used

./waf configure --disable-python --enable-examples --enable-tests &&
> ./waf build

in ~/repos/ns-3-allinone/ns-3-dev$

and it worked. 

Thanks!
Reply all
Reply to author
Forward
0 new messages