/prime/apps/gcc/8.1.0/gcc/
└ xgcc
└ xg++
$ cd ~/NS3-Workspace
$ tar xjf ns-allinone-3.29.tar.bz2
$ cd ns-allinone-3.29/ns-3.29
$ PATH=$PATH":/prime/apps/gcc/8.1.0/gcc"
$ CXX="xg++" CC="xgcc" ./waf configure --build-profile=optimized --enable-examples --enable-tests
Setting top to : /prime/users/ricardo/NS3-Workspace/ns-allinone-3.29/ns-3.29 Setting out to : /prime/users/ricardo/NS3-Workspace/ns-allinone-3.29/ns-3.29/build Checking for 'gcc' (C compiler) : xgcc Checking for cc version : 8.1.0 Checking for 'g++' (C++ compiler) : xg++ Checking for compilation flag -march=native support : ok Checking for compilation flag -Wl,--soname=foo support : ok Checking for compilation flag -std=c++11 support : ok Checking for program 'python' : /usr/bin/python Checking for python version >= 2.3 : 2.7.5 python-config : /usr/bin/python-config Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes Testing pyembed configuration : Could not build a python embedded interpreter Testing pyembed configuration : Could not build a python embedded interpreter Checking boost includes : headers not found, please provide a --boost-includes argument (see help) Checking boost includes : headers not found, please provide a --boost-includes argument (see help) Checking for click location : not found Checking for program 'pkg-config' : /usr/bin/pkg-config Checking for 'gtk+-3.0' : not found Checking for 'libxml-2.0' : not found checking for uint128_t : not found checking for __uint128_t : not found Checking high precision implementation : cairo 128-bit integer (default) Checking for header stdint.h : not found Checking for header inttypes.h : not found Checking for header sys/inttypes.h : not found Checking for header sys/types.h : not found Checking for header sys/stat.h : not found Checking for header dirent.h : not found Checking for header stdlib.h : not found Checking for header signal.h : not found Checking for header pthread.h : Could not find pthread support (build/config.log for details) Checking for header stdint.h : not found Checking for header inttypes.h : not found Checking for header sys/inttypes.h : not found Checking for library rt : not found Checking for NSC location : not found Checking for 'sqlite3' : not found Checking for program 'sudo' : /usr/bin/sudo Checking for program 'valgrind' : not found Checking for 'gsl' : not found python-config : not found Checking for compilation flag -fstrict-aliasing support : ok Checking for compilation flag -fstrict-aliasing support : ok Checking for compilation flag -Wstrict-aliasing support : ok Checking for compilation flag -Wstrict-aliasing support : ok Checking for program 'doxygen' : not found ---- Summary of optional NS-3 features:Build profile : optimizedBuild directory : BRITE Integration : not enabled (BRITE not enabled (see option --with-brite))DES Metrics event collection : not enabled (defaults to disabled)Examples : enabledFile descriptor NetDevice : not enabled (needs threading support which is not available)GNU Scientific Library (GSL) : not enabled (GSL not found)Gcrypt library : not enabled (libgcrypt not found: you can use libgcrypt-config to find its location.)GtkConfigStore : not enabled (library 'gtk+-3.0 >= 3.0' not found)MPI Support : not enabled (option --enable-mpi not selected)NS-3 Click Integration : not enabled (nsclick not enabled (see option --with-nsclick))NS-3 OpenFlow Integration : not enabled (Required boost libraries not found)Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc))PyViz visualizer : not enabled (Python Bindings are needed but not enabled)Python Bindings : not enabled (Python library or headers missing)Real Time Simulator : not enabled (librt is not available)SQlite stats data output : not enabled (library 'sqlite3' not found)Tap Bridge : not enabled (needs threading support which is not available)Tests : enabledThreading Primitives : not enabled (<pthread.h> include not detected)Use sudo to set suid bit : not enabled (option --enable-sudo not selected)XmlIo : not enabled (library 'libxml-2.0 >= 2.7' not found)'configure' finished successfully (1.436s)
/usr/include/stdlib.h:32:10: fatal error: stddef.h: No such file or directory
#include <stddef.h>
...
/usr/include/signal.h:350:11: fatal error: stddef.h: No such file or directory
# include <stddef.h>
...
/usr/include/limits.h:124:26: error: no include path in which to search for limits.h
# include_next <limits.h>
...
(etc)
$ ./waf
Waf: Entering directory `/prime/users/ricardo/NS3-Workspace/ns-allinone-3.29/ns-3.29/build'[ 1/2539] Compiling install-ns3-header: ns3/angles.h[ 2/2539] Compiling install-ns3-header: ns3/antenna-model.h[ 3/2539] Compiling install-ns3-header: ns3/cosine-antenna-model.h[ 4/2539] Compiling install-ns3-header: ns3/isotropic-antenna-model.h[ 5/2539] Compiling install-ns3-header: ns3/parabolic-antenna-model.h
...
...
[ 883/2539] Processing gen-module-header: ns3/wave-module.h[ 884/2539] Processing gen-module-header: ns3/wifi-module.h[ 885/2539] Processing gen-module-header: ns3/wimax-module.h[ 886/2539] Compiling src/core/model/time.ccIn file included from ../src/core/model/nstime.h:24, from ../src/core/model/time.cc:22:../src/core/model/attribute.h:23:10: fatal error: string: No such file or directory #include <string> ^~~~~~~~compilation terminated.
Waf: Leaving directory `/prime/users/ricardo/NS3-Workspace/ns-allinone-3.29/ns-3.29/build'Build failed -> task in 'ns3-core' failed with exit status 1 (run with -v to display more information)
Hi,
I'm trying to install NS-3 in a server at my school.
The server has installed CentOS version 7.6.1810 and I don't have sudo privileges.
The server has installed gcc and g++ version 4.8.5-36. So, if I try to build NS-3.29 with those compilers it complains that it needs the minimum version 4.9.2.
Yes, 4.8 series or earlier will no longer work.
Although you are not an admin on this server, someone may have
installed a newer compiler via the software collections framework,
in which case it may exist on a different path. Check this path,
for instance:
/opt/rh/devtoolset-8/root/usr/bin/gcc
To read more about it, please consult https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/
If it exists, you can try 'scl enable devtoolset-8 bash' and it
should extend your environment variables so that you can
preferentially use that alternative version.
Not all headers are in /usr/include; stddef.h typically is not.
I don't know whether your problems stem from not having done the
'make install' step on gcc.
Here is a wiki page that lists how to build a different version
of gcc and how to modify environment variables to get Waf to
default to it. Please let us know if it doesn't work for you:
https://www.nsnam.org/wiki/HOWTO_use_latest_gcc_release
- Tom
On 12/20/19 6:10 PM, Ricardo wrote:
Hi,
I'm trying to install NS-3 in a server at my school.
The server has installed CentOS version 7.6.1810 and I don't have sudo privileges.
The server has installed gcc and g++ version 4.8.5-36. So, if I try to build NS-3.29 with those compilers it complains that it needs the minimum version 4.9.2.Yes, 4.8 series or earlier will no longer work.
Although you are not an admin on this server, someone may have installed a newer compiler via the software collections framework, in which case it may exist on a different path. Check this path, for instance:
/opt/rh/devtoolset-8/root/usr/bin/gcc
To read more about it, please consult https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/
If it exists, you can try 'scl enable devtoolset-8 bash' and it should extend your environment variables so that you can preferentially use that alternative version.
=== gcc Summary ===
# of expected passes 138393
# of unexpected failures 49
# of unexpected successes 20
# of expected failures 433
# of unsupported tests 2293