I'm trying to install NS2 on Ubuntu 14.04. I followed the steps that are recommended and in this answer. But I'm still facing lots of errors.
/home/smallko/ns-allinone-2.28/sgb/gb_io.w:576: undefined reference to `_fclose' collect2: error: ld returned 1 exit status make: *** [test_io] Error 1 Unable to create sgb library, but it's optional, so continuing... ============================================================ * Build GT-ITM ============================================================ sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing.. ============================================================ * Build zlib ============================================================ ./install: 382: ./install: ./configure: Permission denied Zlib-1.1.4 configuration failed, but it's optional, so continuing ... ============================================================ * Build tcl8.4.5 ============================================================ make: *** No rule to make target `/home/smallko/ns-allinone-2.28/tcl8.4.5/unix/dltest/Makefile.in', needed by `Makefile'. Stop. ./install: 409: ./install: ./configure: Permission denied tcl8.3.2 configuration failed! Exiting ... Tcl is not part of the ns project. Please see to see if they have a fix for your platform. I tried a lot but I can't fix this Permission denied error. Or is there another problem?
1 Answer
Ubuntu 14.04 : libc6, libc6-dev was "updated", and can no longer be used to build old ns2. Ubuntu 12.04.5 can be used for the most versions. But not for certain patches / changes containing old code.
The usually recommended OS for ns2 is CentOS 6.8 - i386 ... except for the ~4 patches requiring a 64bits OS.
ns-allinone-2.28, Ubuntu 12.04.5, CentOS , etc. :
tar xvf ns-allinone-2.28.tar.gz cd ns-allinone-2.28/ patch -p0 < ns228-gcc41-64_2016-1.patch export CC=gcc34 CXX=g++34 ./install cd ns-2.28/ sudo make install cp ns ns228-orig (This is your backup of the original 'ns') sudo cp ns228-orig /usr/local/bin/ And do not add any *PATH to .bashrc . Not required.
Links :