Sunday, January 30, 2011

Installing ns-2.31 on Ubuntu 10.10 for novice, from a novice

Here are the errors I encountered while installing ns-2.31 on Ubuntu 10.10 
1. Make sure the packages libxt-dev, libx11-dev and libxmu-dev are installed. Synaptic Package Manager is the best place to start - just mark these packages and say apply.

/home/sri/NS_2/ns-allinone-2.31/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/sri/NS_2/ns-allinone-2.31/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [] Error 1
otcl-1.13 make failed! Exiting ...
See for problems
sri@sri-Studio-1458:~/NS_2/ns-allinone-2.31$ ^C

 do this :

edit the file ( in folder otcl-1.13) at 
         SHLIB_LD="gcc -shared"
 and just save it .
do not forget to 
...otcl-1.13$ autoconf -f
make sure the command

is on a single line. Otherwise it throws an error saying "path not found" or something like that, I do not remember...

Finally, after your ns2.31 is successfully installed you get a a message  
Please put /home/sri/NS_2/ns-allinone-2.31/bin:/home/sri/NS_2/ns-allinone-2.31/tcl8.4.14/unix:/home/sri/NS_2/ns-allinone-2.31/tk8.4.14/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.


(1) You MUST put /home/sri/NS_2/ns-allinone-2.31/otcl-1.13, /home/sri/NS_2/ns-allinone-2.31/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH (paths)
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=paths

(2) You MUST put /home/sri/NS_2/ns-allinone-2.31/tcl8.4.14/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

After these steps, you can now run the ns validation suite with
cd ns-2.31; ./validate
sri@sri-Studio-1458:~/NS_2/ns-allinone-2.31$ cd NS_2/ns-allinone-2.31/ns-2.31/

Before doing anything, just check the environment variables i.e., echo $variable_name
Most probably the environment variables would have been updated automatically. You wouldn't need to set up separately. 

Then, smile and relax!

Current Thought :
How did they teach us Digital Communication without teaching us Stocahstics in Undergrad??? The first lecture of about two hours Prof. Masoud Salehi gave, covered the entire DC we were supposed to study in UG. And I finally understood complex numbers and communication engineering!

Current Song:

Dil Haare by Jal from the album Aadat
"hoh hooo hooo
hoh hooo hooo
hoh hooo hooo.."


Related Posts Plugin for WordPress, Blogger...