LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-29-2011, 09:31 AM   #1
priyanka.moon14
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Rep: Reputation: Disabled
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 Makefile.in 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 http://www.isi.edu/nsnam/ns/ns-problems.html for problems
 
Old 12-29-2011, 09:50 AM   #2
Zetec
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152

Rep: Reputation: 25
Have you installed the build-essential or any gcc packages?
 
Old 12-30-2011, 01:35 AM   #3
priyanka.moon14
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-30-2011, 03:10 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Quote:
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
http://www.linuxquestions.org/questi...2/#post4562029


gcc41- / g++41-compat for Ubuntu 11.04, post #6 here
http://www.linuxquestions.org/questi...mand-916594/#6


.

Last edited by knudfl; 12-31-2011 at 07:17 AM.
 
Old 01-03-2012, 03:08 AM   #5
priyanka.moon14
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

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 Makefile.in found at this location ns-allinone-2.33/otcl-1.13/Makefile.in as follows:

Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.5
 
Old 01-03-2012, 04:30 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
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 Makefile.in 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.

..

Last edited by knudfl; 01-04-2012 at 03:13 AM.
 
Old 01-20-2012, 07:43 AM   #7
priyanka.moon14
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-13-2013, 03:50 AM   #8
info_mimi
Member
 
Registered: Dec 2012
Posts: 31

Rep: Reputation: Disabled
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 www.Scriptics.com
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

 
Old 02-13-2013, 04:30 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 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
https://docs.google.com/file/d/0B7S2...it?usp=sharing
And g++41-compat https://docs.google.com/file/d/0B7S2...it?usp=sharing
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

-

Last edited by knudfl; 02-13-2013 at 04:34 AM.
 
1 members found this post helpful.
Old 02-13-2013, 06:59 AM   #10
info_mimi
Member
 
Registered: Dec 2012
Posts: 31

Rep: Reputation: Disabled
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 ...
 
Old 02-13-2013, 07:49 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 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/.

-
 
  


Reply

Tags
g++41-compat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i have problem in installing ns2.34 on ubuntu. error is aotoconf is unable to locate nitin4c Linux - Software 1 09-23-2011 04:38 AM
Problem installing ns2 on Ubuntu Aden09 Linux - Newbie 7 04-18-2011 06:01 PM
urgent -- error installing ns2 on ubuntu 7.04 king2k Linux - Newbie 8 02-02-2011 05:28 AM
[SOLVED] problem in installing ns2.33 in ubuntu 8.10 neeraj.dwivedi Linux - Newbie 18 09-12-2009 08:00 AM
Problem Installing NS2 in Ubuntu 7.10 smetya Linux - Software 5 04-27-2008 08:27 AM


All times are GMT -5. The time now is 08:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration