블로그 이미지
ooos

카테고리

분류 전체보기 (227)
스마트폰 (4)
삽질방지 (27)
Tips (21)
Freeware (12)
Music (1)
Have Fun (5)
Photo (11)
Stuff (54)
English (17)
Research (6)
Web (2)
Wish List (6)
Temp (1)
보고 듣고 느끼고 (0)
Do (0)
Total300,986
Today0
Yesterday9

달력

« » 2020.1
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

공지사항

http://sites.google.com/site/pengjungwu/install-ns2-31-on-osx


Install ns2-2.31 on OS X 10.5.5

The following are software versions I used.
  • MacOS X 10.5.5
  • Xcode 3.1.1
  • NS2.31 (all in one version) Also works on NS2.29
SETPS:

1. Install Xcode (read this). 
Note: don't just install gcc because you will need X11 as well. In my case, I download Xcode (3.1.1) from Apple.com and installed the whole packages.

2. modify "ns-allinone-2.31\install" file (insert red sentence)

Modification 1

echo "============================================================"
echo "* Build Tk$TKVER"
echo "============================================================"

cd ./tk$TKVER/unix
if [ -f Makefile ] ; then
make distclean
fi

blame='Tk is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.'
./configure --enable-gcc --disable-shared --prefix=$CUR_PATH --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include || die "tk8.3.2 configuration failed! Exiting ..."
if make 
then
echo "tk$TKVER build succeeded."
make install || die "tk$TKVER installation failed."
echo "tk$TKVER installation succeeded."
else
echo "tk$TKVER make failed! Exiting ..."
echo "For problems with Tcl/Tk see http://www.scriptics.com"
exit
fi

cd ../../

Modification 2

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=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include || 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 3

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=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/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 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 --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include || die "Nam configuration failed! Exiting ...";
fi

3. Install NS2

./install

4. PATH
echo "PATH=/Users/username/ns2/ns-allinone-2.31/bin:$PATH" > .bashrc




Posted by ooos
TAG ,

댓글을 달아 주세요