Tuesday, November 30, 2010

NS2 bugs

I have faced few bugs during installation of NS2 and its usage. I am trying to keep their record

Bug 1 :- Nam not working
-------------------------------------------------
[root@localhost Download]# nam
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..."
[root@localhost Download]#

---------------------------------
Solution:-
Add
#ifdef GenericEvent
/* GenericEvent */ 0,
#endif
at line 589 in tk8.14/generic/tkbind.c
and then install again

-------------------------
Bug 2 :- Installation Stop at OTCL
**************
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

*************

Solution
sudo apt-get install gcc-4.3
CC=gcc-4.3 CXX=g++-4.3 ./install
or
CC=gcc-4.3 ./install

---------------------------
Bug 3:- Ns pointing at some other executable
**************************
root@ubuntu:~$ ns
Usage: host [-v] [-a] [-t querytype] [options] name [server]
Listing: host [-v] [-a] [-t querytype] [options] -l zone [server]
Hostcount: host [-v] [options] -H [-D] [-E] [-G] zone
Check soa: host [-v] [options] -C zone
Addrcheck: host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options: [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options: [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage: [-x [name ...]] [-X server [name ...]]

****************************
Solution
This is due to the fact that machine has another ns command which is located in a higher priority directory (than NS2). To solve this, we can change part declaration order in ".bachrc" by
"PATH=$XGRAPH:$NS:$NAM:$PATH".
-------------------------
Bug 2 :- Installation Stop at TCL
**************
make: *** [tk3d.o] Error 1
tk8.4.14 make failed! Exiting ...
********************************************
Solution
sudo apt-get install build-essential autoconf automake libxmu-dev

2 comments:

  1. Nice work Sir g.

    Is this your official blog?

    ReplyDelete
  2. No just keeping the memory, as after every few months i have to search them again and again. So keeping my own record

    ReplyDelete