Wednesday, September 05, 2012

Installing ns-2.30 on Ubuntu 11.10 (for using EURANE)

I wanted to install ns-2.30 on my Ubuntu 11.10 so that I can use the EURANE (3G module) patch for ns2. I ran into some simple issues, which I thought might be worth sharing. This is my first technical post, so if you are not interested in ns2 simulations you can skip this post :-)

If you come across the following error 

" ns-allinone-2.30/otcl-1.12/otcl.c:2284: undefined reference to `__stack_chk_fail_local' " refer to the following blog post 

http://erl1.wordpress.com/2009/11/16/reinstallingmaking-ns-2-on-ubuntu-9-10/

If you get the following error 

"tclcl-1.18 make failed! Exiting ..." 

then cast the “const char*” to “char*” in line 566 in Tcl.cc like this: char *p = (char*)strchr(localName, ‘(‘)

Do the same with all other lines that fail
in queue/red.cc 876-879: (char*)strstr(v->name(), “ave”)
in queue/rio.cc line 565 to 571: (char *)strstr(v->name(), “ave”)…
in queue/pi.cc line 316 and 317: (char *)strstr(v->name(), “prob”)…
in queue/vq.cc line 333: (char *)strstr(v->name(), “curq”)
in queue/rem.cc line 335-337: (char *)strstr(v->name(), “ave”)…
in queue/gk.cc line 207: (char *)strstr(v->name(), “curq”)

Cast all lines that fail due to the  const char * error to  char *

This blog post is derived from