ns-2.33 and nsnam finally on Solaris 10
==============================================
Instructions to install
-- download the ns-allinone package from here (direct download link:
http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.33.tar.gz) if you don't have.
-- Extract it or apply following command and cd to the directory
# gtar xzvf
http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.33.tar.gz
# cd ns-allinone-2.33
-- download all attached files in this directory
-- # chmod a+x ns_fix.sh
# ./ns_fix.sh
-- say yes if it asks to over-write any file
Internals
==============
I chose ns-allinone-2.33 package which contains
* Tcl release 8.4.18 (required component)
* Tk release 8.4.18 (required component)
* Otcl release 1.13 (required component)
* TclCL release 1.19 (required component)
* Ns release 2.33 (required component)
* Nam release 1.13 (optional component)
* Xgraph version 12 (optional component)
* CWeb version 3.4g (optional component)
* SGB version 1.0 (?) (optional component, builds sgblib for all UNIX type platforms)
* Gt-itm gt-itm and sgb2ns 1.1 (optional component)
* Zlib version 1.2.3 (optional, but required should Nam be used)
Make your system gnu compatible (fix cc, make)
-----------------------------------------------------------------------------------------------------
I have seen cases where setting enveronmental variables does not help. Still you can try.
$ CC=gcc
$ MAKE=gmake
Better try this,
# ln -s /usr/sfw/bin/gcc /usr/sfw/bin/cc
# ln -s /usr/sfw/bin/gmake /usr/sfw/bin/make
Put /usr/sfw/bin in PATH variable.
# export PATH=/usr/sfw/bin/:$PATH
To make it permanent add it to .bashrc in your home directory if you are using bash (to know which shell: give this command "echo $SHELL").
Else add to .profile.
After doing this gcc will be used instead of Sun's default compiler. And gnu make will be default make.
If there were no problems if you just extracted the package installed them using ./install command inside the dir it was enough. But it is actually not enough.
There is a problem with the Solaris MIN MAX macros. To fix it I have provided files: config.h and mobile/mip-reg.cc
Finally provide tcp_cong.c (modified strsep to getToken from
http://does-not-exist.org/mail-archives/mutt-dev/msg10335.html) where replaced strsep with getToken function because strsep is not in Solaris 10 thought it is included with later releases of Solaris. So you might find it easier to install ns in Solaris Express versions (OpenSolaris, SXCE).
(Note: Architecture dependant fix: config.h and mip-reg.cc, OS dependant fix: tcp_cong.c)
Related Links:
http://www.winehq.org/pipermail/wine-patches/2001-November/001322.html
http://docs.sun.com/app/docs/doc/819-2243/strsep-3c?a=view http://www.isi.edu/nsnam/ns/ns-build.html
http://www.isi.edu/nsnam/ns/ns-problems.html http://unix.ittoolbox.com/groups/technical-functional/hp-ux-l/how-to-know-which-shell-147662