LinuxQuestions.org
Visit Jeremy's Blog.
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 09-27-2012, 06:02 AM   #1
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Rep: Reputation: Disabled
Question install ns2


I try to install ns2 2.32 in ubuntu. It show the followinf error. How to clear it.
gcc -c -O2 -pipe -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic -I/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../bitmaps -I/home/manikandan/ns2/ns-allinone-2.32/tcl8.4.15/generic -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DSTATIC_BUILD=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DSTDC_HEADERS=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c
In file included from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tkInt.h:21:0,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.h:18,
from /home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk3d.c:16:
/home/manikandan/ns2/ns-allinone-2.32/tk8.4.15/unix/../generic/tk.h:83:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.4.15 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
 
Old 09-27-2012, 01:48 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

About your error : Missing x11/Xlib files.
"libxmu-dev" will take care that they all get installed :

sudo apt-get install \
g++ autoconf automake libtool libxmu-dev patch xgraph


? More questions ? Then please specify the Ubuntu version and architecture.
Version command : cat /etc/issue
Architecture command : uname -m

.
 
Old 09-28-2012, 11:44 AM   #3
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks for supporting..

I tried that code. But it couldn't successful. It shows autoconf, automake, etc.. : No such file or directory

I am using ubuntu version : Ubuntu 11.04
Architecture : i 686
 
Old 09-28-2012, 01:04 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
No such file or directory
Doesn't look like a reply from 'apt-get install *** '

Please try one more time ...
Code:
sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph
 
Old 09-28-2012, 10:55 PM   #5
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Doesn't look like a reply from 'apt-get install *** '

Please try one more time ...
Code:
sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph

I try the above code. It give the following message.
manikandan@manikandan-TM4750:~$ sudo apt-get update && sudo apt-get install g++ autoconf automake libtool libxmu-dev patch xgraph
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
manikandan@manikandan-TM4750:~$
 
Old 09-29-2012, 12:37 AM   #6
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thank you .. for your kind help.
Now the code is working properly. I have successfully installed ns2. At the time my laptop wi-fi connection was in Off Mode.

Thank you lot........................
 
Old 10-29-2012, 01:43 AM   #7
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
install ns2 on rhel

I try to install ns2 2.27 on RHEL. It give the following error. I need the solution.


7/otcl-1.8 -I/home/ns-allinone-2.27/include -I/home/ns-allinone-2.27/include -o Tcl.o Tcl.cc
In file included from tclcl.h:48,
from Tcl.cc:47:
tclcl-mappings.h: In static member function `static int TclObjectHelper<T>::dispatch_(void*, Tcl_Interp*, int, char**)':
tclcl-mappings.h:51: error: incomplete type `Tcl' used in nested name specifier
tclcl-mappings.h:52: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
tclcl-mappings.h:57: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
make: *** [Tcl.o] Error 1
tclcl-1.15 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
 
Old 10-29-2012, 03:56 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#7 : Redhat EL 5.x and EL 6x : # yum install compat-gcc-34-c++

ns-2.27-gcc410.patch http://www.linuxquestions.org/questi...8&d=1271439105

tar xvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch
cd ns-allinone-2.27/
export CC=gcc34 CXX=g++34
./install


.
 
Old 10-30-2012, 01:30 AM   #9
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
install ns2 on rhel

I am using RHEL 4

I try to install ns2 2.27. what is the compatible gcc for RHEL4
 
Old 10-30-2012, 02:49 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 9 : RHEL 4, The default compiler is gcc/g++ version 3.4.6, i.e. OK.

tar zxvf ns-allinone-2.27.tar.gz
patch -p0 < ns-2.27-gcc410.patch
cd ns-allinone-2.27/
./install : No errors.
Probably start from scratch with a new unpacked ns-allinone-2.27.tar.gz.
... And follow the above strictly.
( The patch is applied outside ns-allinone-2.27/ ).

.

Last edited by knudfl; 10-30-2012 at 02:52 AM.
 
1 members found this post helpful.
Old 10-30-2012, 04:59 AM   #11
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
Installing ns2 - reg

Dear Sir,
I try to install ns2 2.27. But in the gcc itself shows some error..

Please find the error messages after upgrade the gcc34...
checking whether the C compiler (gcc34 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
tcl8.3.2 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.
[root@Prithvi ns-allinone-2.27]# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
[root@Prithvi ns-allinone-2.27]#
 
Old 10-30-2012, 05:09 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11 : gcc cannot be used, when gcc only is installed.
The c++ compiler is required too. Package name : 'gcc-c++'.


Why are you using the obsolete RHEL 4 for ns2 ?
Ubuntu 11.04, ref. post # 3 is better suited for ns-2.27, I think.
Ubuntu 11.04, ns226 .. ns234 compiler : gcc41-compat + g++41-compat :
http://www.linuxquestions.org/questi...571/page2.html
> Post # 17

.
 
1 members found this post helpful.
Old 10-30-2012, 05:18 AM   #13
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
In our Lab we are using RHEL. The students are accessed through Telnet. Is there possible to access the ns2 through TelNet?
 
Old 10-30-2012, 06:21 AM   #14
manikandan.h
LQ Newbie
 
Registered: Sep 2012
Location: Mayiladuthurai, TN, INDIA
Posts: 13

Original Poster
Rep: Reputation: Disabled
I have successfully installed ns2. Thank you....
 
  


Reply

Tags
ns-2.27-gcc410.patch, ns2


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
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 12:09 AM
install NS2.31 saif_ict Programming 18 03-04-2012 09:33 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
How can I install NS2 ? hoang_it Linux - Software 19 10-14-2009 06:02 AM
could not install ns2 salady86 Linux - Software 1 03-16-2008 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration