Welcome to LQ. ..
General for all ns2 versions :
sudo apt-get install g++ autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev
.....
.....
Assume ns-allinone-2.27
You will need ns-allinone-2.34 too.
Edit ns-allinone-2.27/ns-2.27/Makefile.in , line 36-37 to :
CC = gcc-3.3
CPP = g++-3.3
.. and ns-allinone-2.27/nam-1.10/Makefile.in , line 44-45 :
The same.
The required g++-3.3 : sudo apt-get install g++-3.3
For that, hardy must be added to /etc/apt/sources.list
Code:
deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe
The g++-3.3 packages can also be found here
http://packages.ubuntu.com/hardy/g++-3.3
to do : sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb
Having ns-allinone-2.27/ and ns-allinone-2.34/ in the same directory
e.g. /home/"username"/ns2/ :
cd ns-allinone-2.27/
mv otcl-1.8/ back-otcl-1.8
mv tcl8.4.5/ back-tcl8.4.5
mv tclcl-1.15/ back-tclcl-1.15
mv tk8.4.5/ back-tk8.4.5
ln -s ../ns-allinone-2.34/tcl8.4.18/
ln -s ../ns-allinone-2.34/tcl8.4.18/ tcl8.4.5
ln -s ../ns-allinone-2.34/tk8.4.18/
ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5
ln -s ../ns-allinone-2.34/otcl-1.13/
ln -s ../ns-allinone-2.34/otcl-1.13/ otcl-1.8
ln -s ../ns-allinone-2.34/tclcl-1.19/
ln -s ../ns-allinone-2.34/tclcl-1.19/ tclcl-1.15
mkdir -p include
cd include/
ln -s ../tcl8.4.18/generic/tclInt.h
ln -s ../tcl8.4.18/generic/tclIntDecls.h
( These two links may already be present.)
Apply the
tk-8.4-lastevent.patch in tk8.4.14.
Apply the
otcl-113-configure.in.patch in otcl-1.13.
Then : ./install , in the ns-allinone-2.27/ top directory.
For more info : '
LQ Search' > "Tag Name" = ns2 ,
'
LQ Search' > "Tag Name" = leach .