Pages

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.

2.
/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: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
sri@sri-Studio-1458:~/NS_2/ns-allinone-2.31$ ^C
sri@sri-Studio-1458:~/NS_2/ns-allinone-2.31$ 

 do this :

edit the configure.in file ( in folder otcl-1.13) at 
Linux*)
         SHLIB_CFLAGS="-fpic"
         SHLIB_LD="gcc -shared"
         SHLIB_SUFFIX=".so"
         DL_LIBS="-ldl"
         SHLD_FLAGS=""
 
 and just save it .
 
do not forget to 
...otcl-1.13$ autoconf -f
 
3.
make sure the command
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18
/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix

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.

IMPORTANT NOTICES:

(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
into LD_LIBRARY_PATH.
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.."

2 comments:

Related Posts Plugin for WordPress, Blogger...