I got a question yesterday concerning compiling ns-2.30 on Ubuntu 10.04 Lucid Lynx. I sent a reply with my “recipe” for making the ns-2.30 compile, and thought I would share it with you too. Here it goes:

1) installing the dependencies: sudo apt-get install xorg-dev g++ xgraph
2) mending the otcl configure-file problem (found in line 5514 in ns-2.30): https://erl1.wordpress.com/2009/11/16/reinstallingmaking-ns-2-on-ubuntu-9-10/
3) cast the “const char*” to “char*” in line 566 in Tcl.cc like this: char *p = (char*)strchr(localName, ‘(‘);
4) Do the same with all other lines that fail in queue/red.cc 876-879: (char*)strstr(v->name(), “ave”) etc. for the next lines
5) and in queue/rio.cc line 565 to 571: (char *)strstr(v->name(), “ave”)…
6) and in queue/pi.cc line 316 and 317: (char *)strstr(v->name(), “prob”)…
7) and in queue/vq.cc line 333: (char *)strstr(v->name(), “curq”)
Eight) and in queue/rem.cc line 335-337: (char *)strstr(v->name(), “ave”)…
9) and in queue/gk.cc line 207: (char *)strstr(v->name(), “curq”)

So, it is really only a matter of casting all lines that fail due to the    const char * error to      char *

But with new compiler versions I am sure more problems will appear with the older ns-2 versions.