Build failed

1,451 views
Skip to first unread message

» ѕєтнυ ℓєкѕнмι. S

unread,
Mar 22, 2014, 12:33:24 AM3/22/14
to ns-3-...@googlegroups.com
Hey all
I am new to ns3.I have downloaded ns3 using tarballs approach given in http://www.nsnam.org/wiki/Installation.But when I am building ns3 i get the following error

Build failed
 -> task failed (exit status 1):
    {task 46709136: cxx tap-bridge.cc -> tap-bridge.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-Ibuild', '-I.', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DPYTHONDIR="/usr/local/lib/python2.7/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/dist-packages"', '-DHAVE_PYTHON_H=1', '-DENABLE_GSL', '../src/tap-bridge/model/tap-bridge.cc', '-c', '-o', 'src/tap-bridge/model/tap-bridge.cc.1.o']
 -> task failed (exit status 1):
    {task 46148816: cxx animation-interface.cc -> animation-interface.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-pthread', '-Ibuild/src/netanim', '-Isrc/netanim', '-Ibuild', '-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/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/harfbuzz', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DPYTHONDIR="/usr/local/lib/python2.7/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/dist-packages"', '-DHAVE_PYTHON_H=1', '-DENABLE_GSL', '../src/netanim/model/animation-interface.cc', '-c', '-o', 'src/netanim/model/animation-interface.cc.1.o']



I am using ubuntu 13.10.Can someone help me?

Tommaso Pecorella

unread,
Mar 22, 2014, 2:29:20 AM3/22/14
to ns-3-...@googlegroups.com
Hi,

the error is described a few lines before the ones you posted.
Please include a complete log, otherwise it's a bit of a shoot in the dark.

By the way, the error could be due to missing libraries or to other things that have been already iced in the development version.

Anyway, include the full log and we'll see.

T.

SethuLekshmi S

unread,
Mar 22, 2014, 10:25:18 AM3/22/14
to ns-3-...@googlegroups.com
@Tommaso Pecorella While running "
sudo apt-get install g++-3.4 gcc-3.4
" command I got error  ": Unable to locate package gcc-3.4.Is this error related to this?

"

This is the log I am getting while building.

Build failed
 -> task failed (exit status 1):
    {task 23251472: cxx unix-system-wall-clock-ms.cc -> unix-system-wall-clock-ms.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-Ibuild', '-I.', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DPYTHONDIR="/usr/local/lib/python2.7/dist-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python2.7/dist-packages"', '-DHAVE_PYTHON_H=1', '-DENABLE_GSL', '../src/core/model/unix-system-wall-clock-ms.cc', '-c', '-o', 'src/core/model/unix-system-wall-clock-ms.cc.1.o']
Traceback (most recent call last):
  File "./build.py", line 147, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 138, in main
    build_ns3(config, build_examples, build_tests, args, build_options)
  File "./build.py", line 61, in build_ns3
    run_command([sys.executable, "waf", "build"] + build_options)
  File "/home/sethu/ns3/ns-allinone-3.13/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


--
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/_2IwpAvv_gc/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/d/optout.



--
Sethulekshmi S
Student
S3 M.Tech
GECB

Tommaso Pecorella

unread,
Mar 22, 2014, 11:04:29 AM3/22/14
to ns-3-...@googlegroups.com
Hi,

you can bet it is!

No compiler -> no compilation. Logical.
What's less logical is that the system attempted to build ns-3 despite the compiler installation error.

Fix the compiler installation and retry.
Btw, mind that, depending on your system, the gcc / g++ packages may be named differently. Follow your OS guide about installing gcc, g++ and all the required packages.

T.

SethuLekshmi S

unread,
Mar 22, 2014, 11:40:07 AM3/22/14
to ns-3-...@googlegroups.com

@Tommaso Pecorella

I have gcc version 4.8.So what should I do?.Is there any problem with higher version of gcc?

Tommaso Pecorella

unread,
Mar 22, 2014, 12:02:54 PM3/22/14
to ns-3-...@googlegroups.com
Hi,

no, it's ok to use higher versions. However gcc != g++... install that too :P

T.

SethuLekshmi S

unread,
Mar 22, 2014, 12:27:36 PM3/22/14
to ns-3-...@googlegroups.com
@Tommaso Pecorella thank you so much .It is solved.I was trying to install ns-3.13 with gcc4.8.It  works fine now.I have installed ns-3.17.Thank you so much for the help

Tommaso Pecorella

unread,
Mar 22, 2014, 12:30:39 PM3/22/14
to ns-3-...@googlegroups.com
Nice. however I'd suggest to use 3.19. Since you0re upgrading, why not using the latest one ?

Cheers,

T.

Vishal Bogam

unread,
Nov 6, 2017, 1:27:51 AM11/6/17
to ns-3-users
../src/aomdv/helper/aomdv-helper.cc:21:82: fatal error: ns3/ns-allinone-3.26/ns-3.26/src/aomdv/helper/aomdv-routing-protocol.h: No such file or directory
 #include "ns3/ns-allinone-3.26/ns-3.26/src/aomdv/helper/aomdv-routing-protocol.h"
                                                                                  ^
compilation terminated. 

I am getting this error while executing my code in UBUNTU 14.04 with ns-3.26.
Can anybody help??

Konstantinos

unread,
Nov 6, 2017, 2:04:48 AM11/6/17
to ns-3-users
The error is clear. It can not find the file.
Are you sure that the file is there?
Reply all
Reply to author
Forward
0 new messages