Installing NS-2 2.33 or 2.34 on Mac OS X 10.6 (aka Snow Leopard)

8 09 2011

Apply the following modifications to the file ns-allinone-2.34/install: (add what’s in red and in green*)

* the lines in green are, possibly, only necessary to Mac OS X 10.6 (aka Snow Leopard). With Mac OS X 10.5 (aka Leopard), the red lines should be enough.

Modification 1

echo "============================================================"
echo "* Build OTcl-$OTCLVER"
echo "============================================================"
cd ./otcl-$OTCLVER
blame='Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.'
if  [ "${test_cygwin}" = "true" ]; then
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include || die "otcl-$OTCLVER configuration failed! Exiting ...";
else
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include CFLAGS="-framework CoreFoundation" || die "otcl-$OTCLVER configuration failed! Exiting ...";
fi
if make
then
     echo "otcl-$OTCLVER has been installed successfully."
else
     echo "otcl-$OTCLVER make failed! Exiting ..."
     echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
     exit
fi
cd ..

Modification 2

echo "============================================================"
echo "* Build Tclcl-$TCLCLVER"
echo "============================================================"
cd ./tclcl-$TCLCLVER
if  [ "${test_cygwin}" = "true" ]; then
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include || die "tclcl-$TCLCLVER configuration failed! Exiting ...";
else
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-otcl=../otcl-$OTCLVER || die "tclcl-$TCLCLVER configuration failed! Exiting ..."
fi
if make
then
     echo "tclcl-$TCLCLVER has been installed successfully."
else
     echo "tclcl-$TCLCLVER make failed! Exiting ..."
     echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
     exit
fi    
cd ../

Modification 3

echo "============================================================"
echo "* Build ns-$NSVER"
echo "============================================================"
cd ./ns-$NSVER
if [ -f Makefile ] ; then
     make distclean
fi
if  [ "${test_cygwin}" = "true" ]; then
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include || die "Ns configuration failed! Exiting ...";
else
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include LIBS="-framework CoreFoundation" --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER || die "Ns configuration failed! Exiting ...";
fi
if make
then
     echo " Ns has been installed successfully."
else
     echo "Ns make failed!"
     echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
     exit
fi
cd ../

Modification 4

echo "============================================================"
echo "* Build nam-$NAMVER"
echo "============================================================"
ln -s otcl-$OTCLVER otcl
ln -s tclcl-$TCLCLVER tclcl
cd ./nam-$NAMVER
# XXX temporary OS X hack
if  [ "${test_darwin}" = "true" ]; then
ln -s /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation libcorefoundation.dylib
fi
if  [ "${test_cygwin}" = "true" ]; then
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tclcl=$CUR_PATH/tclcl-$TCLCLVER  || die "Nam configuration failed! Exiting ...";
else
        ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include V_LIBS="-framework CoreFoundation" --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER || die "Nam configuration failed! Exiting ...";
fi
............
cd ../

After applying those modifications, use Terminal app to go to the ns-allinone-2.3x directory and enter  ./install.

Those installation procedures were tested with Max OS X 10.6, but they should work just fine with 10.5.

STILL HAVING PROBLEMS DURING INSTALLATION?

1. If, even after applying the above modifications, your installation fails, proceed as follows:

Install first Xcode development tools. They come with Mac OS X 10.6 CD as an optional installation. After doing that, proceed as explained above.

2. Still failing? Check the following instruction:

In the configure files inside nam, ns, otcl and tclcl directories, look for xlibdirs and xincdirs and check if the following lines, respectively, can be found:

/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib \

and

/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include \

In NS-2 version 2.34, those lines are present. You should carefully  look for them when using other versions.

 

Anything to say about it? Drop a line in the comments!

 


Ações

Informação

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Sair / Alterar )

Imagem do Twitter

You are commenting using your Twitter account. Sair / Alterar )

Foto do Facebook

You are commenting using your Facebook account. Sair / Alterar )

Connecting to %s




Seguir

Obtenha todo post novo entregue na sua caixa de entrada.

Join 422 other followers