LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-08-2009, 06:06 AM   #1
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Rep: Reputation: 31
Question "Can't open X library" error while installing ns-2.26 in fc9


'./install' and './configure' are issuing the error:
Quote:
...
tclcl-1.0b13 has been installed successfully.
============================================================
* Build ns-2.26
============================================================
loading cache ./config.cache
...
checking for tcl2c++... ../tclcl-1.0b13
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... (cached) no
can't find X library
Ns configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
All the necessary packages are installed:
Quote:
already installed and latest version
Nothing to do message comes if I
'yum install libXmu-devel' for example
Also note:
Quote:
[root@localhost ~]# gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My system is Fedora 9. I know that latest version of ns2 is 2.34 but for aodv-uu and mobile IP (http://core.it.uu.se/core/index.php/...le_IP_for_ns-2) I have to use ns2.26. That's why I have to install this version. Kindly also note that before 'Can't open X library' I got this error :
Quote:
...
tclcl-mappings.h:52: error: invalid use of incomplete type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
...
Tcl.cc:603: warning: deprecated conversion from string constant to ‘char*’
make: *** [Tcl.o] Error 1
tclcl-1.0b13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
...
But this problem was resolved by patching:
Quote:
--- tclcl.h~ 2003-07-29 11:24:50.000000000 -0700
+++ tclcl.h 2004-12-10 08:55:34.692584936 -0800
@@ -45,8 +45,8 @@
}

#include "tclcl-config.h"
-#include "tclcl-mappings.h"
#include "tracedvar.h"
+// tclcl-mappings.h included below, AFTER definition of class Tcl

struct Tk_Window_;

@@ -158,6 +158,8 @@
Tcl_HashTable objs_;
};

+#include "tclcl-mappings.h"
+
class InstVar;

class TclObject {
[found at: http://mailman.isi.edu/pipermail/ns-...y/053623.html]
I have also read:http://www.linuxquestions.org/questi...ibrary-655310/
But it does not solve the problem. I have provided complete 'case-history' of my problem. If someone needs other specific info about my system/distribution please do ask..
Best regards
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-08-2009, 09:55 AM   #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
Quote:
can't find X library
When an application asks for (lib)<name> ,
it means lib<name>-devel :

1) su , password
2) yum install libX11-devel libXext-devel libXau-devel libXmu-devel

.. and probably also ..
2a) yum install compat-gcc-34 compat-gcc-34-c++

I am not sure the system compiler will work with ns-2.26 .
This command can be used :

' CXX=g++34 ./install '

.. and if you use './configure' :
' ./configure CXX=g++34 '
.. and for make :
' make CXX=g++34 '

Good luck .. ..
.....
Attached Files
File Type: txt 03.tclcl10b13-fix-gcc34.patch.txt (489 Bytes, 19 views)

Last edited by knudfl; 12-10-2009 at 11:52 PM.
 
Old 12-08-2009, 04:37 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you do not have the -devel rpm's installed .Seeing as fedora 9 is now UNSUPPORTED and the repos have been moved to the historical archives since fedora 10 hit it's end of life

install the current and supported version
Fedora 12
 
0 members found this post helpful.
Old 12-08-2009, 05:01 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
@ John VV : The "yum install" line is only for the
sake of completeness : The OP installed ns-2.34 on
Fedora 9 fifty days ago.
So the -devel files are probably in place.

All Fedora 9 repo's still work. The repo had some
time ago these files added automagically :
'fedora.repo.rpmnew', 'fedora-updates-newkey.repo',
'fedora-updates-testing-newkey.repo'.

Seems to be a new feature, Fedora 9 only , so far. ?
.....

Last edited by knudfl; 12-08-2009 at 08:58 PM.
 
Old 12-08-2009, 07:49 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
fedora-updates-newkey.repo
the " new key repos" were added in fedora 8 after a red hat server brake in
 
2 members found this post helpful.
Old 12-09-2009, 12:07 AM   #6
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Thanks a lot to both of you..
All the libs are installed already:
Quote:
[root@localhost ns-Installation]# yum install libX11-devel
Loaded plugins: refresh-packagekit
rpmfusion-nonfree-updates | 2.4 kB 00:00
fedora | 2.4 kB 00:00
rpmfusion-free-updates | 2.4 kB 00:00
rpmfusion-free | 951 B 00:00
adobe-linux-i386 | 951 B 00:00
adobe-linux-i386/primary | 12 kB 00:00
adobe-linux-i386 17/17
updates-newkey | 3.4 kB 00:00
freshrpms | 2.8 kB 00:00
rpmfusion-nonfree | 951 B 00:00
updates | 2.6 kB 00:00
Setting up Install Process
Parsing package install arguments
Package libX11-devel-1.1.4-1.fc9.i386 already installed and latest version
Nothing to do
[root@localhost ns-Installation]# yum install libXext-devel
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package libXext-devel-1.0.4-1.fc9.i386 already installed and latest version
Nothing to do
[root@localhost ns-Installation]# yum install libXau-devel
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package libXau-devel-1.0.3-5.fc9.i386 already installed and latest version
Nothing to do
[root@localhost ns-Installation]# yum install libXmu-devel
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package libXmu-devel-1.0.4-1.fc9.i386 already installed and latest version
Nothing to do
[root@localhost ns-Installation]# yum install compat-gcc-34
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package compat-gcc-34.i386 0:3.4.6-9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================== ==========================================================
Package Arch Version Repository Size
==================================================================================================== ==========================================================
Installing:
compat-gcc-34 i386 3.4.6-9 fedora 4.0 M

Transaction Summary
==================================================================================================== ==========================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 4.0 M
Is this ok [y/N]: y
Downloading Packages:
compat-gcc-34-3.4.6-9.i386.rpm | 4.0 MB 00:40
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : compat-gcc-34 1/1

Installed:
compat-gcc-34.i386 0:3.4.6-9

Complete!
[root@localhost ns-Installation]# yum install compat-gcc-34-c++
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package compat-gcc-34-c++.i386 0:3.4.6-9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================== ==========================================================
Package Arch Version Repository Size
==================================================================================================== ==========================================================
Installing:
compat-gcc-34-c++ i386 3.4.6-9 fedora 11 M

Transaction Summary
==================================================================================================== ==========================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 11 M
Is this ok [y/N]: y
Downloading Packages:
compat-gcc-34-c++-3.4.6-9.i386.rpm | 11 MB 01:45
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : compat-gcc-34-c++ 1/1

Installed:
compat-gcc-34-c++.i386 0:3.4.6-9

Complete!
Even now, at
Quote:
CXX=g++34 ./install
I get:
Quote:
...
checking for X11 library archive
checking for XOpenDisplay in -lX11... (cached) no
can't find X library
Ns configuration failed! Exiting ...
 
Old 12-09-2009, 03:10 AM   #7
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
Fedora 9 ... ns 2.26 ..

'libX11' error ? ? I get no errors like that.
And isn't ' tk8.3.2' using libX11 too ?

May be show the output of the command
' file /usr/lib/libX11.so '

.....
.....
I can get ns-2.26 compiled some of the way with g++34. EDIT, please see post # 22.
But the final result : I used g++-2.95 on Debian Etch.
May be it can be compiled on CentOS 3.9 too → g++296 .

Ns-2.xx is only creating one file = ' ns '.
You can get a copy of my binary 'ns' :
Click my name and send an email.
.....

And 'nam' : You can use the nam binary from ns-allinone-2.34 .
.. Can be used as /usr/local/bin/nam .
.....

Last edited by knudfl; 04-09-2010 at 08:07 AM.
 
Old 12-09-2009, 07:34 AM   #8
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Thanks knudfl..
The output of 'file /usr/lib/libX11.so' is:
Quote:
[mq15@localhost ~]$ file /usr/lib/libX11.so
/usr/lib/libX11.so: symbolic link to `libX11.so.6.2.0'
 
Old 12-10-2009, 11:49 PM   #9
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
Ns-allinone-2.26

CentOS 3.9 makes a perfect result using the
system compiler = gcc, g++, c++ version 3.2.3
No patching was required.

.....
 
Old 12-16-2009, 07:48 AM   #10
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
Thanks knudfl
Friends please notice one more thing:
Before applying the patch (mentioned in my first post):
Quote:
[mq15@localhost ns-allinone-2.26]$ ./install
...
otcl-1.0a8 has been installed successfully.
============================================================
* Build Tclcl-1.0b13
============================================================
No .configure file found in current directory
Continuing with default options...
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes

No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
...
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 incomplete type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
tclcl-mappings.h:57: error: invalid use of incomplete type ‘struct Tcl’
tclcl-mappings.h:41: error: forward declaration of ‘struct Tcl’
Tcl.cc: In member function ‘void Tcl::eval(char*)’:
Tcl.cc:180: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc: In member function ‘int TclObject::traceVar(const char*, TclObject*)’:
Tcl.cc:419: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc: In static member function ‘static int TclClass::create_shadow(void*, Tcl_Interp*, int, char**)’:
Tcl.cc:507: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc:509: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc: In static member function ‘static int TclClass::dispatch_instvar(void*, Tcl_Interp*, int, char**)’:
Tcl.cc:569: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc: In member function ‘virtual void TclClass::bind()’:
Tcl.cc:601: warning: deprecated conversion from string constant to ‘char*’
Tcl.cc:603: warning: deprecated conversion from string constant to ‘char*’
make: *** [Tcl.o] Error 1
tclcl-1.0b13 make failed! Exiting ...
After applying the patch:
Quote:
tclcl-1.0b13 has been installed successfully.
============================================================
* Build ns-2.26
============================================================
loading cache ./config.cache
No .configure file found in current directory
Continuing with default options...
...
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... (cached) no
can't find X library

Ns configuration failed! Exiting ...
Please note the difference. I have also installed compat-gcc-34 but I think ns is being compiled by gcc4.3 as:
Quote:
[mq15@localhost ns-allinone-2.26]$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Also:
Quote:
CXX=g++34 ./install
does not make any difference. Best Regards
 
Old 12-18-2009, 05:23 AM   #11
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:
tclcl-1.0b13 make failed! Exiting ...
tclcl-1.0b13 :
No errors on my Fedora 9 using gcc / g++ version 4.3.0.
.....
Quote:
can't find X library
Ns configuration failed! Exiting ...
I do not get that error either, see post # 7.

Something is wrong with your Fedora 9, or you have
a corrupted ns-allinone-2.26 .

Ns-2.26 can not be compiled on Fedora 9. See post # 7. EDIT, please see post # 22.
Ns-allinone-2.26 was made for Redhat 9 , it seems.
A long term version of Redhat 9 is CentOS 3.9 (Redhat EL 3.9).

CentOS 3.9 : Creates a perfect ns-2.26, see post # 9. EDIT, see post # 22.
.....
.....

If you want to be absolute sure, that ns-2.26 uses g++34 :
Edit Makefile.in, line 36-37 from
Code:
CC	= @CC@
CPP	= @CXX@

to

CC	= gcc34
CPP	= g++34
.....
The patch, "ns-2.26-aodv-uu-mip" which isn't a patch,
but a patched version of ns-2.26 meant to replace
ns-allinone-2.26/ns-2.26 :

Using g++34 it stops with the same errors as 2.26-orig :
Code:
webcache/webtraf.cc: In member function `virtual int WebTrafPool::command(int, const char* const*)':
webcache/webtraf.cc:415: fejl: ISO C++ forbids ....
make: *** [webcache/webtraf.o] Error 1
I will see, what I can do about it on CentOS 3.9.
.....

Last edited by knudfl; 04-19-2010 at 02:23 AM.
 
Old 12-20-2009, 02:58 PM   #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
My "CentOS 3.9" computer has been down for a couple of days.

I got a new 'CentOS 3.9' up running today, and ns-allinone-2.26
with the modified 'ns-2.26' = 'ns-2.26-aodv-uu-mip' compiled OK.

I will send you an email with the resultant binaries attached :
'ns' and 'nse'.

.....
EDIT
P.S. : May be I have to redo, so you can use it with the new
dependency = libpcap.so.Xx
( CentOS39 libpcap.so.0.6.2 , Fedora 9 libpcap.so.0.9 ).
.....

Last edited by knudfl; 12-20-2009 at 11:57 PM.
 
Old 12-21-2009, 12:54 AM   #13
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
.. OK .. did a rebuild of the libpcap-0.9.8-2.fc9.src.rpm
Fedora 9 source code, and it worked fine with 'ns-2.26-aodv-uu-mip'

So a new result, 'ns' + 'nse' is available.
 
Old 12-21-2009, 05:35 AM   #14
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Linux Mint Cinnamon
Posts: 224

Original Poster
Rep: Reputation: 31
This is so kind of you knudfl..
In fact there is one more confusion: I don't know how to make use of the binaries you are sending to me.
 
Old 12-21-2009, 01:51 PM   #15
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
Using 'ns' : just like you would do, if you had compiled
the application yourself .. or unpacked it as a binary
application.
The binaries have their location in ns-allinone-2.26/ns-2.26/
If any doubt : look at the ns-allinone-2.34, you have.
No difference. Example command : 'ns file.tcl' ( like 2.34 ).

.....
 
  


Reply



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
script using "/usr/bin/cat error" produces "cannot open" in cron Dcrusoe Programming 6 07-22-2009 03:30 PM
"Failed Dependency error" while installing RPM for "DateTime" perl modules giridhargopal.cj Linux - Newbie 7 11-19-2008 12:05 AM
FC9 installing Nvidia driver "Unable to find Kernel Source Tree" ampace Fedora 3 05-18-2008 10:38 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Installing Firefox "Fatel error [-618] Couldnt open xpistub library" Nukem Linux - General 8 02-11-2005 11:50 AM

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

All times are GMT -5. The time now is 09:47 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