-   Linux - Software (
-   -   Installing ns2.33 in Ubuntu 11.04 (

priyanka.moon14 12-29-2011 10:31 AM

Installing ns2.33 in Ubuntu 11.04
I am trying to install ns2.33 in Ubuntu 11.04 but I am getting this error. I have made changes in the of otcl-1.13 but still getting this error. Please suggest me what should I do.

* Build OTcl-1.13
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... no
checking standard STL is available... no
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.4... -L../lib -ltcl8.4
checking for init.tcl... ../lib/tcl8.4
checking for http.tcl... ../lib/tcl8.4/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.4.18... no
checking for tclsh8.4... ../bin/tclsh8.4
checking for tk.h... -I../include
checking for libtk8.4... -L../lib -ltk8.4
checking for tk.tcl... ../lib/tk8.4
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking system version (for dynamic loading)... Linux-2.6.38-8-generic
No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
rm -f libotcl.a otcl.o
gcc-4.3 -c -g -O2 -DNDEBUG -DUSE_SHM -I. -I/home/priyanka/ns-allinone-2.33/include -I/home/priyanka/ns-allinone-2.33/include -I/home/priyanka/ns-allinone-2.33/include -I/include otcl.c
make: gcc-4.3: Command not found
make: *** [libotcl.a] Error 127
otcl-1.13 make failed! Exiting ...
See for problems

Zetec 12-29-2011 10:50 AM

Have you installed the build-essential or any gcc packages?

priyanka.moon14 12-30-2011 02:35 AM

I have executed the command,

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

But when I execute this command, this error comes.

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-4.3
E: Couldn't find any package by regex 'gcc-4.3'

What should I do now, please help me.

knudfl 12-30-2011 04:10 PM


sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3
A g++ (-4.1 or -4.2) is missing.

The gcc42- / g++42-compat for Ubuntu 11.04

gcc41- / g++41-compat for Ubuntu 11.04, post #6 here


priyanka.moon14 01-03-2012 04:08 AM

Thanks for the reply!!
gcc-4.3 doesn't work in ubuntu 11.04. So, I did the following steps and my problem is solved.

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

Edit found at this location ns-allinone-2.33/otcl-1.13/ as follows:

Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.5

knudfl 01-03-2012 05:30 AM

No old Ubuntu compilers (like gcc-4.3) will work in Ubuntu 11.04 and 11.10.

And :
a) The default gcc / g++ versions 4.4 and 4.5 for Ubuntu 11.04 cannot be used for ns2.
b) There is really no reason to edit any to gcc-?? :
The old instructions about gcc-4.3 are not valid / are for an old Ubuntu OS.

This will do : ( Read post #4 and the links )
1) sudo dpkg -i gcc42-compat-4.2.4_i386.deb g++42-compat-4.2.4_i386.deb
..... Then reboot, and the new compilers can be used.

2) cd ns-allinone-2.33/ && export CC=gcc42 CXX=g++42 && ./install

Note : The Ubuntu 11.04 compat compilers were created for a reason :
Nothing else works with ns2 in Ubuntu 11.04 .
Generally : Avoid Ubuntu 11.04 and 11.10 for ns2 and other special software.
If it must be Ubuntu : Version 10.04 Lucid should be preferred.
Note 2 : You can have as many gcc / g++ versions as you want,
installed at the same time.


priyanka.moon14 01-20-2012 08:43 AM

Sir, thank you so much for your valuable suggestions. I need your help again. I have created simple tcl scripts and have executed this in ns2. Now I need to create gateway in Wireless Mesh Network. Please suggest me how should I do this.

info_mimi 02-13-2013 04:50 AM

hi all , i try to install ns2.33 and ns2.35 in my ubuntu 11.04 , when i tape "./install" the same error for both ns2 occur in the build of tcl :

* Build tcl8.4.18
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc4.5
checking whether the C compiler works... no
configure: error: in `/home/manel/ns-allinone-2.33/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see
to see if they have a fix for your platform.

please help me , i really want to cry , cause its urgent for my study project :)

knudfl 02-13-2013 05:30 AM

# 8, @info_mimi :
Please do not just type ./install, the compiler must be set too.

But before even starting, all the prerequisites must be installed : 1)
sudo apt-get install \
g++ g++-4.4 autoconf automake make libtool patch libxmu-dev xgraph

2) Download gcc41-compat for Ubuntu 11.04
And g++41-compat
Install with :
sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
.. And : You must reboot to use the new compiler for ns-2.33.

Building the two ns-allinone-2.xx :
A) "2.35" : cd ns-allinone-2.35/ && export CC=gcc-4.4 CXX=g++-4.4 && ./install
B) "2.33" : cd ns-allinone-2.33/ && export CC=gcc41 CXX=g++41 && ./install


info_mimi 02-13-2013 07:59 AM

thank you so much , i install ns2.35 , and i dont add it to my PATH when i tape ns ; ns-version its appear ns-2.35 RC6 , i want to install also ns2.33 but i'm affraid , after that installation , how can i use one version that i want ?, for example how can i use ns2.33 and not ns2.35 and how can i change to ns2.35 ... help me if you know about this , you are the only hope for me ...

knudfl 02-13-2013 08:49 AM

# 10 : The easy way : Use ns as $ ./ns

But : It's really no problem having 20 different versions at the same time.
Just make a copy of ns to a different name, like :
cd ns-allinone-2.33/ns-2.33/ && cp ns ns233
cd ns-allinone-2.35/ns-2.35/ && cp ns ns235

.. Then the two executable ns233, ns235 can be copied to /usr/local/bin/,
.. and can be run with e.g.: $ ns235 file.tcl

In very few occasions an "ns" with it's real name is required.
Either use ./ns inside ns-2.xx, or make a link or copy of the required ns
to /usr/local/bin/.


All times are GMT -5. The time now is 03:15 PM.