About Me

My photo
Full time Technology Geek, part time actor

Saturday, October 29, 2011

Useful Links

1. Installation Problem of ns2.33 ubuntu 9.10

http://sshukla2000.blogspot.com/2009/12/installation-problem-of-ns233-ubuntu.html

2. http://www.naduism.com/2010/09/17/an-old-post/

3. http://paulson.in/?p=29

4. How to install NS-2 with Ubuntu 10.04 By Noor Zaman

http://wsnsimulators.blogspot.com/2010/06/how-to-install-ns2-with-ubuntu-1004-by.html

Friday, October 21, 2011

NS2.31 NAM problem - "[code omitted because of length]"

Problem: While executing NAM in NS2 following error appears.

nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."

Solution:

  1. Download "tk-8.4-lastevent.patch" patch file from http://bugs.gentoo.org/show_bug.cgi?id=225999
  2. Save the file in tk8.4.x floder (remember that there could be tk8.4.14 or tk8.4.18)
  3. Patch the file with this command

patch -p1 < ./tk-8.4-lastevent.patch

4. install again (with ./install command)

Now it works perfectly.

(If there is a problem on patching, change -p1 to -p0. )

NS-2 2.34 Installing steps in Ubuntu 9.04

The procedure for installing NS-2 in Ubuntu 9.04
1. Download ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.

$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar


3. Download & install some packages from repository

$ sudo apt-get install build-essential autoconf automake libxmu-dev


4. Install the ns2

$ cd ns-allinone-2.33
$ ./install


5. Edit some paths

$ gedit ~/.bashrc


Put these lines on that file. Off course, you might change /home/programmer
for it depends on where you extract ns-allinone-2.33.tar.

# LD_LIBRARY_PATH
OTCL_LIB=/home/programmer/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/programmer/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/programmer/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/programmer/ns-allinone-2.33/bin:/home/programmer/ns-allinone-2.33/tcl8.4.18/unix:/home/programmer/ns-allinone-2.33/tk8.4.18/unix:/home/programmer/ns-allinone-2.33/xgraph-12.1/
NS=/home/programmer/ns-allinone-2.33/ns-2.33/
NAM=/home/programmer/ns-allinone-2.33/nam-1.13/
export PATH=$PATH:$XGRAPH:$NS:$NAM


6. Validate it (take very long time compare to install process)

$ cd ns-2.33
$ ./validate


7. (Optionally) Create a symlink, so that ns can be called from everywhere

$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns


8. Let it take effect immediately

$ source ~/.bashrc


9. Try to run it (and pray :) )

$ ns


10. If the installation success, you will see % at the command prompt. Type
following command to exit

% exit



Source URL http://www.techquark.com/2009/09/install-ns-2-on-ubuntu-904.html

NS-2.33 Installation on Ubuntu 10.04

Hi Folks,

I am working on Ad hoc research since more than a year and here i am summarizing some of the issues i faced during my research related to tools and technology.

1. The procedure for installing NS-2.33 in Ubuntu 10.04


The procedure for installing NS-2.33 in Ubuntu 10.04
1. Download ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.

$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar


3. Download & install some packages from repository

$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3

*Edit Makefile.in*
- $ cd ns-allinone-2.33/otcl-1.13
- $ gedit Makefile.in
- Find the line with
CC = @CC@
and Change it to
CC = gcc-4.3


4. Install the ns2.33

$ cd ns-allinone-2.33
$ ./install


5. Edit some paths

$ gedit ~/.bashrc


Put these lines on that file. Off course, you might change /home/programmer
for it depends on where you extract ns-allinone-2.33.tar.

# LD_LIBRARY_PATH
OTCL_LIB=/home/programmer/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/programmer/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/programmer/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/programmer/ns-allinone-2.33/bin:/home/programmer/ns-allinone-2.33/tcl8.4.18/unix:/home/programmer/ns-allinone-2.33/tk8.4.18/unix:/home/programmer/ns-allinone-2.33/xgraph-12.1/
NS=/home/programmer/ns-allinone-2.33/ns-2.33/
NAM=/home/programmer/ns-allinone-2.33/nam-1.13/
export PATH=$PATH:$XGRAPH:$NS:$NAM


6. Validate it (take very long time compare to install process)

$ cd ns-2.33
$ ./validate


7. (Optionally) Create a symlink, so that ns can be called from everywhere

$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns


8. Let it take effect immediately

$ source ~/.bashrc


9. Try to run it (and pray :) )

$ ns


10. If the installation success, you will see % at the command prompt. Type
following command to exit

% exit



Source URL http://www.techquark.com/2009/09/install-ns-2-on-ubuntu-904.html