Ubuntu – NS2 compilation errror in ubuntu


gcc-4.4 -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I. -I/home/akhil/ns-allinone-2.35/include -I/home/akhil/ns-allinone-2.35/include -I/home/akhil/ns-allinone-2.35/include -I/include  otcl.c
make: gcc-4.4: Command not found
Makefile:91: recipe for target 'libotcl.a' failed
make: *** [libotcl.a] Error 127
otcl-1.14 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

Best Answer

"ns2" is usually built from source code, when you want to add an extra protocol. All ~300 patches (extra protocols) https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing

'ns-2.35' Ubuntu 17.10 example: sudo apt install g++-5 → I.e. no later than g++-5 (<=5.4) can be used. Note : You can have as many gcc versions as you want, installed at the same time.

tar xvf ns-allinone-2.35_gcc5.tar.gz           // 2014 - 2017 update  → →


cd ns-allinone-2.35/
export CC=gcc-5 CXX=g++-5 && ./install
                   // if Ubuntu 16.04, the build command is './install' only
cd ns-2.35/
sudo make install

The ~2500 simulations https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing

Related Question