Installing ns-2.35 on Mountain Lion, Mavericks, Yosemite and El Capitan (OS X 10.8/10.9/10.10/10.11)
Here i will provide step by step procedure for you to install ns-2.35 on mac OS X 10.8/9/10 which i successfully installed on my mac (fully tested by me and its working)
Credits:-
- Brain Adamson(for great patch)
- Henrique Zelak Leite Bastos for the right help.
- APPLE for Mac OS X.(the best a dev. can get)
Step 1. Software Requirements (Pre-requisites).
- Download ns-2.35 from http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download
- Go through this tutorial to install command line tools via terminal http://leviathan37.tumblr.com/post/76618063571/how-to-install-command-line-tools-on-osx-mavericks
- Download XQuartz from http://xquartz.macosforge.org/ (this installs X11 libraries) install and reboot/logout .
Step 2. Choose install directory.
- Place the downloaded ns-allione-2.35.tar.gz file in the location you want to install it.
Step 3. Extract ns files.
- Go to location where you have put your downloaded .tar.gz file and run
- tar zxvf ns-allinone-2.35.tar.gz
Step 4. Get into the Directory.
- Execute cd ns-allinone-2.35
Step 5. Download Patch.
- Download zip file from https://github.com/aemreunal/ns-allinone-2.35-Mac-OS-10.9-install-patch.
- Extract and put these files in ns-allinone-2.35 directory.
Step 6. Execute install command
- Execute ./install64 (will give paths after completion. Copy them)
Step 7. Save Paths.
- So now we save the paths returned by successful execution of install command.
- This step is the most critical step as requires proper attention.
- Come back to your user/home directory and run
- touch ~/.bash_profile (if you don't have a bash_profile file in your home directory).
- open ~/.bash_profile (opens bash_profile file in textEdit).
- Now add paths like
- similarly add LD Library paths like
- and add paths also for TCL Library
- Save and Exit.
- Now run source ~/.bash_profile.
- Type nam and .... Bingo!!! if you see the nam window (installation successful !!!)
- else recheck 7th step again as most mistakes are done during this step only (i.e. saving the paths correctly).
Comments
^
10 warnings and 2 errors generated.
make: *** [mdart/mdart_adp.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
bash-3.2# sudo nano /etc/paths
bash-3.2#
Hi .. this is the error which i have got after going through all you mentioned steps..
what shall i do now?
//error 1
mdart/mdart_adp.cc:108:21: error: reference to 'hash' is ambiguous
nsaddr_t dstAdd_ = hash(reqId);
//error 2
mdart/mdart_adp.cc:396:21: error: reference to 'hash' is ambiguous
nsaddr_t dstAdd_ = hash(mdart_->id_);
Try this:
https://github.com/aemreunal/ns-allinone-2.35-Mac-OS-10.9-install-patch
It worked by me.
checking whether the C compiler works... no
configure: error: in `/Users/sanjaykumar/ns-allinone-2.35/ns-2.35':
configure: error: C compiler cannot create executables
See `config.log' for more details
Ns configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
nam: no display name and no $DISPLAY environment variable
child process exited abnormally
I want to ask you if I can translate your post in Spanish por my classmate, with the respective reference.
Thanks you
Thanks,
Nelson
./install64: line 409: autoconf: command not found
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc-4.4
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
tcl8.5.10 configuration failed! Exiting ...
The error was because I did not logout/restart after installing xQuartz
When I run ./install64, I dnt get any paths. Could you please help me.
I get following:
Last login: Thu Mar 3 13:00:38 on ttys002
Rahuls-MacBook-Pro-2:~ Rahul$ /Users/Rahul/Documents/ns/ns-allinone-2.35/install64 ; exit;
============================================================
* Testing for Darwin (OS X) environment
============================================================
Darwin detected
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
============================================================
FreeBSD not detected
============================================================
* Build XGraph-12.2
============================================================
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 270: cd: ./xgraph-12.2: No such file or directory
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 271: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 290: cd: ./cweb: No such file or directory
ns-allinone unable to install cweb for you. Please install it manually. cweb is used by sgb to create sgblibrary needed by scenario-generator. But this will not affect the use of ns as such, so continue..
============================================================
* Build Stanford GraphBase
============================================================
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 321: cd: ./sgb: No such file or directory
Unable to create sgb library. This library is used by gt-itm and so for scenario generators. If you already have sgblib (possible if you are on solaris,sunos or freebsd platforms) you may still be able to run gt-itm. so continuing..
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 380: cd: ./zlib-1.2.3: No such file or directory
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 382: ./configure: No such file or directory
Zlib-1.2.3 configuration failed, but it's optional, so continuing ...
============================================================
* Build tcl8.5.10
============================================================
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 402: cd: ./tcl8.5.10/unix: No such file or directory
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 409: autoconf: command not found
/Users/Rahul/Documents/ns/ns-allinone-2.35/install64: line 410: ./configure: No such file or directory
tcl8.5.10 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]