named-data-ndnSIM / ndnSIM

ndnSIM: NS-3 based NDN simulator
GNU General Public License v3.0
108 stars 165 forks source link

ndnSim build failed #78

Closed nboubakr closed 7 years ago

nboubakr commented 7 years ago

Hello,

During my configuration of ndnSIM I got the following error:

$ ./waf configure -d optimized --enable-examples --enable-tests --with-python=python2 --enable-sudo --enable-mpi -d optimized --force-planetlab
Setting top to                           : /home/boubakr/ndnSIM/ns-3
Setting out to                           : /home/boubakr/ndnSIM/ns-3/build
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking for cc version                  : 5.4.0
Checking for 'g++' (C++ compiler)        : /usr/bin/g++
Checking supported compiler CXXFLAGS     : -std=c++0x -std=c++11
Checking supported optimizations CXXFLAGS : -O3
Checking supported debug CXXFLAGS         : -g
Checking supported warnings CXXFLAGS      : -Wall -Wno-error=deprecated-declarations -fstrict-aliasing -Wstrict-aliasing
Checking for compilation flag -march=native... support : ok
Checking for compilation flag -Wl,--soname=foo... support : ok
Checking for program 'python'                             : /usr/bin/python
Checking for python version                               : (2, 7, 12, 'final', 0)
python-config                                             : /usr/bin/python-config
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Getting pyembed flags from python-config                           : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags   : yes
Getting pyext flags from python-config                             : yes
Checking for compilation flag -fvisibility=hidden... support       : ok
Checking for compilation flag -Wno-array-bounds... support         : ok
Checking for pybindgen location                                    : ../pybindgen (guessed)
Checking for python module 'pybindgen'                             : 0.17.0.post45+ng4806e4f
Checking for pybindgen version                                     : 0.17.0.post45+ng4806e4f
Checking for code snippet                                          : yes
Checking for types uint64_t and unsigned long equivalence          : no
Checking for code snippet                                          : no
Checking for types uint64_t and unsigned long long equivalence     : yes
Checking for the apidefs that can be used for Python bindings      : gcc-LP64
Checking for internal GCC cxxabi                                   : complete
Checking for python module 'pygccxml'                              : 1.0.0
Checking for pygccxml version                                      : 1.0.0
Checking for program 'gccxml'                                      : /usr/bin/gccxml
Checking for gccxml version                                        : GCC-XML compatibility CastXML wrapper
gccxml version unknown or too old, need version >= 0.9; automatic scanning of API definitions will not be possible
Checking boost includes                                            : 1_58
Checking boost libs                                                : ok
Checking for boost linkage                                         : ok
Checking for click location                                        : not found
Checking for program 'pkg-config'                                  : /usr/bin/pkg-config
Checking for 'gtk+-2.0' >= 2.12                                    : yes
Checking for 'libxml-2.0' >= 2.7                                   : yes
Checking for type uint128_t                                        : not found
Checking for type __uint128_t                                      : yes
Checking high precision implementation                             : 128-bit integer (default)
Checking for header stdint.h                                       : yes
Checking for header inttypes.h                                     : yes
Checking for header sys/inttypes.h                                 : not found
Checking for header sys/types.h                                    : yes
Checking for header sys/stat.h                                     : yes
Checking for header dirent.h                                       : yes
Checking for header stdlib.h                                       : yes
Checking for header signal.h                                       : yes
Checking for header pthread.h                                      : yes
Checking for header stdint.h                                       : yes
Checking for header inttypes.h                                     : yes
Checking for header sys/inttypes.h                                 : not found
Checking for library rt                                            : yes
Checking for header sys/ioctl.h                                    : yes
Checking for header net/if.h                                       : yes
Checking for header net/ethernet.h                                 : yes
Checking for header linux/if_tun.h                                 : yes
Checking for header netpacket/packet.h                             : yes
Checking for NSC location                                          : not found
Checking for 'mpic++'                                              : yes
Checking for program 'doxygen'                                     : /usr/bin/doxygen
Checking for program 'tar'                                         : /bin/tar
Checking for program 'sphinx-build'                                : /usr/bin/sphinx-build
Checking for std::is_default_constructible                         : yes
Checking for std::is_nothrow_move_constructible                    : yes
Checking for std::is_nothrow_move_assignable                       : yes
Checking for std::to_string                                        : yes
Checking for std::vector::insert with const_iterator               : yes
Checking for library pthread                                       : yes
Checking for 'sqlite3'                                             : yes
Checking Crypto++ lib                                              : 5.6.1
Checking if CryptoPP library works                                 : yes
Checking for OpenSSL lib                                           : "OpenSSL 1.0.2g-fips  1 Mar 2016"
Checking if OpenSSL library works                                  : yes
Checking for OpenFlow location                                     : not found
Checking for 'sqlite3'                                             : yes
Checking for header linux/if_tun.h                                 : yes
Checking for python module 'gtk'                                   : ok
Checking for python module 'goocanvas'                             : 0.14.1
Checking for python module 'pygraphviz'                            : 1.3.1
Checking for program 'sudo'                                        : /usr/bin/sudo
Checking for program 'valgrind'                                    : /usr/bin/valgrind
Checking for 'gsl'                                                 : yes
Checking for program 'doxygen'                                     : /usr/bin/doxygen
---- Summary of optional NS-3 features:
Build profile                 : optimized
Build directory               :
Python Bindings               : enabled
Python API Scanning Support   : not enabled (gccxml too old)
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
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : enabled
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : enabled
ndnSIM                        : enabled
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      : enabled
Build tests                   : enabled
Build examples                : enabled
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (8.809s)
$ sudo ./waf
Waf: Entering directory `/home/boubakr/ndnSIM/ns-3/build'
...
[1459/3229] Compiling src/spectrum/test/tv-helper-distribution-test.cc
In file included from ./ns3/test.h:24:0,
                 from ../src/spectrum/test/tv-helper-distribution-test.cc:23:
/usr/include/c++/5/sstream:300:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
       struct __xfer_bufptrs
       ^

Waf: Leaving directory `/home/boubakr/ndnSIM/ns-3/build'
Build failed
 -> task in 'ns3-spectrum-test' failed (exit status 1):
        {task 140135945432848: cxx tv-helper-distribution-test.cc -> tv-helper-distribution-test.cc.3.o}
['/usr/bin/g++', '-std=c++0x', '-std=c++11', '-O3', '-g', '-Wall', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-march=native', '-fstrict-overflow', '-I../src/spectrum', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_OPTIMIZED', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IS_DEFAULT_CONSTRUCTIBLE=1', '-DHAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE=1', '-DHAVE_IS_NOTHROW_MOVE_ASSIGNABLE=1', '-DHAVE_STD_TO_STRING=1', '-DHAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR=1', '-DHAVE_PTHREAD=1', '-DHAVE_SQLITE3=1', '-DHAVE_OPENSSL=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DNS_TEST_SOURCEDIR="src/spectrum/test"', '../src/spectrum/test/tv-helper-distribution-test.cc', '-c', '-o', '/home/boubakr/ndnSIM/ns-3/build/src/spectrum/test/tv-helper-distribution-test.cc.3.o']

Please, I hope you can contribute to fix this problem.

Best regards, Boubakr

cawka commented 7 years ago

I see you're using gcc 5.4. What is your Linux distro (or what is OS if not Linux).

As an immediate workaround, you can try to disable spectrum module (actually, enabling only needed module, e.g., ./waf configure --enable-modules=ndnSIM).

You can also try an older compiler if it is available on your system.


I also have a small request to you. Can you check that the latest release of NS-3 (upstream NS-3, not the base for ndnSIM) has the same issue?

nboubakr commented 7 years ago

Thank's for your reply, I'm using Ubuntu 16.04 (x64) Linux ubuntu 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux. I'll test it with NS-3 and keep you in touch.

pengminjiong commented 7 years ago

Actually, I suggest you to use docker because ndnsim is a simulator and the docker image of ndnsim saves your time .

elhussenkaz commented 7 years ago

Hello, am new on ndnSIM having headache with installation processes, searching for a solution found this conversation which is somehow related to my problems, especially this:

pybindgen (found '0.17.0.post45+g4806e4f'), (need '0.17.0.post45+ng4806e4f')

and the following: [2787/2787] Linking build/src/tap-bridge/ns3-dev-tap-creator-debug Waf: Leaving directory `/home/muktar/ndnSIM/ns-3/build' Build commands will be stored in build/compile_commands.json 'build' finished successfully (38m10.667s)

Modules built: antenna aodv applications
bridge buildings config-store
core csma csma-layout
dsdv dsr energy
fd-net-device flow-monitor internet
lr-wpan lte mesh
mobility mpi ndnSIM
netanim (no Python) network nix-vector-routing
olsr point-to-point point-to-point-layout
propagation sixlowpan spectrum
stats tap-bridge test (no Python)
topology-read uan virtual-net-device
wave wifi wimax

Modules not built (see ns-3 tutorial for explanation): brite click openflow
visualizer

pls, I dont know how to locate the needed Pybidgen at the same time visualizer can not be run.

spirosmastorakis commented 7 years ago

I do not see anything wrong with the latest comment.

fadedreamz commented 7 years ago

@spirosmastorakis (found '0.17.0.post45+g4806e4f'), (need '0.17.0.post45+ng4806e4f') compare fails because one 'n' is missing

BabarShahzaad commented 6 years ago

I am using Ubuntu 16.04 and and facing the following issues:

./waf configure --enable-examples
Setting top to                           : /home/babarshahzaad/ndnSIM/ns-3 
Setting out to                           : /home/babarshahzaad/ndnSIM/ns-3/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for cc version                  : 5.4.0 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking supported compiler CXXFLAGS     : -std=c++0x -std=c++11 
Checking supported optimizations CXXFLAGS : -O0 
Checking supported debug CXXFLAGS         : -ggdb -g3 
Checking supported warnings CXXFLAGS      : -Wall -Wno-error=deprecated-declarations -fstrict-aliasing -Wstrict-aliasing 
Checking for compilation flag -Wl,--soname=foo... support : ok 
Checking for program 'python'                             : /usr/bin/python 
Checking for python version                               : (2, 7, 12, 'final', 0) 
python-config                                             : /usr/bin/python-config 
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes 
Getting pyembed flags from python-config                           : yes 
Asking python-config for pyext '--cflags --libs --ldflags' flags   : yes 
Getting pyext flags from python-config                             : yes 
Checking for compilation flag -fvisibility=hidden... support       : ok 
Checking for compilation flag -Wno-array-bounds... support         : ok 
Checking for pybindgen location                                    : ../pybindgen (guessed) 
Checking for python module 'pybindgen'                             : 0.17.0.post45+g4806e4f 
Checking for pybindgen version                                     : 0.17.0.post45+g4806e4f 
Checking for code snippet                                          : yes 
Checking for types uint64_t and unsigned long equivalence          : no 
Checking for code snippet                                          : no 
Checking for types uint64_t and unsigned long long equivalence     : yes 
Checking for the apidefs that can be used for Python bindings      : gcc-LP64 
Checking for internal GCC cxxabi                                   : complete 
Checking for python module 'pygccxml'                              : 1.0.0 
Checking for pygccxml version                                      : 1.0.0 
Checking for program 'gccxml'                                      : /usr/bin/gccxml 
Checking for gccxml version                                        : GCC-XML compatibility CastXML wrapper 
gccxml version unknown or too old, need version >= 0.9; automatic scanning of API definitions will not be possible
Checking boost includes                                            : 1_58 
Checking boost libs                                                : ok 
Checking for boost linkage                                         : ok 
Checking for click location                                        : not found 
Checking for program 'pkg-config'                                  : /usr/bin/pkg-config 
Checking for 'gtk+-2.0' >= 2.12                                    : not found 
Checking for 'libxml-2.0' >= 2.7                                   : not found 
Checking for type uint128_t                                        : not found 
Checking for type __uint128_t                                      : yes 
Checking high precision implementation                             : 128-bit integer (default) 
Checking for header stdint.h                                       : yes 
Checking for header inttypes.h                                     : yes 
Checking for header sys/inttypes.h                                 : not found 
Checking for header sys/types.h                                    : yes 
Checking for header sys/stat.h                                     : yes 
Checking for header dirent.h                                       : yes 
Checking for header stdlib.h                                       : yes 
Checking for header signal.h                                       : yes 
Checking for header pthread.h                                      : yes 
Checking for header stdint.h                                       : yes 
Checking for header inttypes.h                                     : yes 
Checking for header sys/inttypes.h                                 : not found 
Checking for library rt                                            : yes 
Checking for header sys/ioctl.h                                    : yes 
Checking for header net/if.h                                       : yes 
Checking for header net/ethernet.h                                 : yes 
Checking for header linux/if_tun.h                                 : yes 
Checking for header netpacket/packet.h                             : yes 
Checking for NSC location                                          : not found 
Checking for program 'doxygen'                                     : /usr/bin/doxygen 
Checking for program 'tar'                                         : /bin/tar 
Checking for program 'sphinx-build'                                : /usr/bin/sphinx-build 
Checking for std::is_default_constructible                         : yes 
Checking for std::is_nothrow_move_constructible                    : yes 
Checking for std::is_nothrow_move_assignable                       : yes 
Checking for std::to_string                                        : yes 
Checking for std::vector::insert with const_iterator               : yes 
Checking for library pthread                                       : yes 
Checking for 'sqlite3'                                             : yes 
Checking Crypto++ lib                                              : 5.6.1 
Checking if CryptoPP library works                                 : yes 
Checking for OpenSSL lib                                           : "OpenSSL 1.0.2g-fips  1 Mar 2016" 
Checking if OpenSSL library works                                  : yes 
Checking for OpenFlow location                                     : not found 
Checking for 'sqlite3'                                             : yes 
Checking for header linux/if_tun.h                                 : yes 
Checking for python module 'gtk'                                   : ok 
Checking for python module 'goocanvas'                             : 0.14.1 
Checking for python module 'pygraphviz'                            : 1.3.1 
Checking for program 'sudo'                                        : /usr/bin/sudo 
Checking for program 'valgrind'                                    : not found 
Checking for 'gsl'                                                 : not found 
Checking for program 'doxygen'                                     : /usr/bin/doxygen 
---- Summary of optional NS-3 features:
Build profile                 : debug
Build directory               : 
Python Bindings               : enabled
Python API Scanning Support   : not enabled (gccxml too old)
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                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : not enabled (library 'libxml-2.0 >= 2.7' not found)
Threading Primitives          : enabled
Real Time Simulator           : 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)
ndnSIM                        : enabled
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                   : not enabled (defaults to disabled)
Build examples                : enabled
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (23.359s)

The installed version of gccxml is 0.9 but it is not being shown and after python binding enabled the issues of not enabled are not being resolved.

I hope that I will find the solution there.

batoul-44 commented 3 years ago

hello everyone..i watched this valuable conversation and i hope you can help me to solve this problem.... i installed ndnSIM on ubuntu 16.04 too many times and i still have the same problem in build.... please help me ./waf

Several tasks use the same identifier. Please check the information on
https://waf.io/apidocs/Task.html?highlight=uid#waflib.Task.Task.uid
    object 'SuidBuild_task' (
    {task 140598946003768: SuidBuild_task -> }) defined in 'tap-creator'
    object 'SuidBuild_task' (
    {task 140598946004216: SuidBuild_task -> }) defined in 'tap-creator'
    object 'SuidBuild_task' (
    {task 140598946004328: SuidBuild_task -> }) defined in 'tap-creator'
    object 'SuidBuild_task' (
    {task 140598948750392: SuidBuild_task -> }) defined in 'tap-creator'
    Waf: Leaving directory `/home/batoul/ndnSIM/ns-3/build'
    Build failed
    -> task in 'ns3-ndnSIM' failed with exit status 1:
    {task 140598943249016: cxx forwarder.cpp -> forwarder.cpp.5.o}
    ['/usr/bin/g++', '-std=c++14', '-O3', '-g', '-Wall', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-march=native', '-fstrict-overflow', '-Wstrict-overflow=2', '-std=c++14', '-fPIC', '-pthread', '-pthread', '-I.', '-I..', '-Ins3/ndnSIM/NFD', '-I../ns3/ndnSIM/NFD', '-Isrc/ndnSIM/NFD/core', '-I../src/ndnSIM/NFD/core', '-Isrc/ndnSIM/NFD/daemon', '-I../src/ndnSIM/NFD/daemon', '-Isrc/ndnSIM/NFD/rib', '-I../src/ndnSIM/NFD/rib', '-Ins3/ndnSIM', '-I../ns3/ndnSIM', '-Ins3/ndnSIM/ndn-cxx', '-I../ns3/ndnSIM/ndn-cxx', '-I.', '-I..', '-I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent', '-I/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include', '-I/usr/lib/openmpi/include', '-I/usr/lib/openmpi/include/openmpi', '-I/usr/include', '-DNS3_BUILD_PROFILE_OPTIMIZED', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_MPI=1', '-DHAVE_STD_TO_STRING=1', '-DHAVE_PTHREAD=1', '-DHAVE_SQLITE3=1', '-DHAVE_OPENSSL=1', '-DHAVE_IF_TUN_H=1', '-DNS3_OPENMPI', '-DNS3_MPI', '../src/ndnSIM/NFD/daemon/fw/forwarder.cpp', '-c', '-o/home/batoul/ndnSIM/ns-3/build/src/ndnSIM/NFD/daemon/fw/forwarder.cpp.5.o']
fadedreamz commented 3 years ago

@batoul-44 better create a new issue, this is 3 yo post

batoul-44 commented 3 years ago

@fadedreamz i created new issue...i hope to find solution