I am a beginner to ns3 and I encountered the following problems when installing ns3 and quagga using ubuntu16:
My installation instructions are:
“git clone https://gitlab.com/tomhenderson/bake.git
cd bake
git checkout -b dce-1.12 origin/dce-1.12
export PATH=$PATH:`pwd`/build/bin
export DCE_PATH=`pwd`/build/bin_dce:`pwd`/build/sbin
export LD_LIBRARY_PATH=`pwd`/build/lib
export PYTHONPATH=`pwd`/build/lib
./bake.py configure -e dce-linux-1.12 -e dce-quagga-1.12
./bake.py download
sudo ./bake.py build -vvv
”
After running "sudo./bake.py build-vvv", problems are encountered:
>> Building dce-linux-1.12 - /home/lhj/anaconda3/envs/py38/bin/python3 /home/lhj/dce/bake/source/ns-3-dce/waf configure --prefix=/home/lhj/dce/bake/build --with-ns3=/home/lhj/dce/bake/build --with-elf-loader=/home/lhj/dce/bake/build/lib --with-glibc=/home/lhj/dce/bake/build/glibc --with-libaspect=/home/lhj/dce/bake/build --enable-kernel-stack=/home/lhj/dce/bake/source/ns-3-dce/../net-next-nuse-4.4.0/arch dir=/home/lhj/dce/bake/source/ns-3-dce
Setting top to : /home/lhj/dce/bake/source/ns-3-dce
Setting out to : /home/lhj/dce/bake/source/ns-3-dce/build
Checking for 'gcc' (C compiler) : /usr/local/bin/gcc
Checking for cc version : 10.3.0
Checking for 'g++' (C++ compiler) : /usr/local/bin/g++
Checking for program 'pkg-config' : /usr/bin/pkg-config
Checking for pkg-config version >= '0.0.0' : yes
Checking for -Wl,--soname=foo : yes
Checking for libns3.35-core-debug (mandatory) : yes
Checking for libns3.35-network-debug (mandatory) : yes
Checking for libns3.35-internet-debug (mandatory) : yes
Checking for libns3.35-point-to-point-debug (optional) : yes
Checking for libns3.35-tap-bridge-debug (optional) : yes
Checking for libns3.35-netanim-debug (optional) : yes
Checking for libns3.35-wifi-debug (optional) : yes
Checking for libns3.35-csma-debug (optional) : yes
Checking for libns3.35-mobility-debug (optional) : yes
Checking for libns3.35-point-to-point-layout-debug (optional) : yes
Checking for libns3.35-mpi-debug (optional) : not found
Checking for libns3.35-lte-debug (optional) : yes
Checking for libns3.35-visualizer-debug (optional) : not found
Checking for libns3.35-applications-debug (optional) : yes
Checking for libns3.35-fd-net-device-debug (optional) : yes
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 library dl : yes
Checking for glibc get_cpu_features : yes
Checking for glibc secure_getenv : yes
Checking for glibc explicit_bzero : no
Checking for header valgrind/valgrind.h : yes
Checking for header valgrind/memcheck.h : yes
Checking for header sim.h : yes
Checking for 'gcc' (C compiler) : /usr/local/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/local/bin/g++
Checking for libns3.35-flow-monitor-debug (mandatory) : yes
Checking for 'gcc' (C compiler) : /usr/local/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/local/bin/g++
Checking for libns3.35-topology-read-debug (optional) : yes
Checking for libns3.35-internet-apps-debug (optional) : yes
Checking for libns3.35-visualizer-debug (optional) : not found
Checking for library dl : yes
---- Summary of optional NS-3 features:
Static build : not enabled (option --enable-static not selected)
Logging : enabled
Assert checks : enabled
Code coverage : not enabled (option --enable-gcov not selected)
Example programs : enabled
Test programs : enabled
Debug Symbols : enabled
elf-loader does not exist
Checking for header hook-manager.h : yes
Checking for program 'valgrind' : /usr/bin/valgrind
Checking for program 'doxygen' : not found
Checking for header netinet/sctp.h : not found
Checking for 'gcc' (C compiler) : /usr/local/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/local/bin/g++
Checking for program 'python' : /home/lhj/anaconda3/envs/py38/bin/python3
Checking for python version >= 2.3 : 3.8.19
python-config : /home/lhj/anaconda3/envs/py38/bin/python3-config
Asking python-config for pyembed '--cflags --libs --ldflags --embed' flags : yes
Testing pyembed configuration : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
Testing pyext configuration : yes
Checking for pybindgen location : ../pybindgen (guessed)
Checking for python module 'pybindgen' : 0.22.0.post0+gfbb74e6.d20240620
Checking for pybindgen version : 0.22.0.post0+gfbb74e6.d20240620
PyBindGen : ok
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' : not found
---- Summary of optional NS-3 features:
Static build : not enabled (option --enable-static not selected)
Logging : enabled
Assert checks : enabled
Code coverage : not enabled (option --enable-gcov not selected)
Example programs : enabled
Test programs : enabled
Debug Symbols : enabled
ELF magic loader : not enabled (elf-loader not found)
Aspect-based tracing : enabled
sctp-tools-dev : not enabled (sctp-tools (netinet/sctp.h) not found)
Python Bindings : enabled
Python API Scanning Support : not enabled (Missing 'pygccxml' Python module)
'configure' finished successfully (3.586s)
/home/lhj/anaconda3/envs/py38/bin/python3 /home/lhj/dce/bake/source/ns-3-dce/waf dir=/home/lhj/dce/bake/source/ns-3-dce
Waf: Entering directory `/home/lhj/dce/bake/source/ns-3-dce/build'
Building library netlink
Building library dce
Building library dce-quagga
Building library dce-quagga-test
Building library dce-test
Building library dce-test-netlink
[ 19/380] Linking build/lib/libns3-netlink.so
[ 20/380] Compiling model/unix-file-fd.cc
[ 21/380] Compiling model/dce-umask.cc
[ 22/380] Compiling model/kernel-socket-fd.cc
/usr/bin/ld: not found crti.o: That file or directory is not found
collect2: Error: ld returns 1
Waf: Leaving directory `/home/lhj/dce/bake/source/ns-3-dce/build'
Build failed
-> task in './lib/ns3-netlink' failed with exit status 1 (run with -v to display more information)
>> Building dce-linux-1.12 - Problem
> Subprocess failed with error 1: ['/home/lhj/anaconda3/envs/py38/bin/python3', '/home/lhj/dce/bake/source/ns-3-dce/waf']
> Error: Critical dependency, module "dce-linux-1.12" failed
For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)
I use the “find /usr/-name crti*”directive
The output is:
/usr/libx32/crti.o
/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib/crti.o
/usr/lib32/crti.o
/usr/arm-linux-gnueabihf/lib/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
Guess that the configuration path is not added, so use:
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
But it didn't work.
So I want to ask why ??????
Thank you for your reply.
I may not have fully expressed my environment, I am using x86-64 linux environment, I use the "find /usr/-name crti*" command output:
/usr/libx32/crti.o
/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib/crti.o
/usr/lib32/crti.o
/usr/arm-linux-gnueabihf/lib/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
Some of these are cross-compilers that I have installed in the linux environment, this is my system's original crti.o (/usr/lib/x86_64-linux-gnu/crti.o)
I use the "uname -m" command to output "x86_64" to prove that I am using x86_64, not ARM64.