LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2013, 12:41 AM   #1
sryzdn
Member
 
Registered: Feb 2013
Posts: 273

Rep: Reputation: 9
libX11.so.6: could not read symbols: Invalid operation


Hi,

I want to install a package on fedora 19, x86-64 with gcc. When I type make, I receive the following error:
Quote:
/usr/bin/ld: note: 'XGetWindowAttributes' is defined in DSO /lib64/libX11.so.6 so try adding it to the linker command line
/lib64/libX11.so.6: could not read symbols: Invalid operation
The complete compiling report is as enclosed. I would be very grateful if you kindly help me solve this problem.
Attached Files
File Type: txt foxerror.txt (3.5 KB, 38 views)
 
Old 07-24-2013, 05:05 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
What does "file /lib64/libX11.so.6" indicate?
 
Old 07-25-2013, 08:57 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Quote:
Fox-1.9.8-R1352/Fox/src/../../\
static-libs/lib/libwx_gtk2_core-2.8.a(corelib_utilsx11.o):
undefined reference to symbol 'XGetWindowAttributes'
Free Objects for Crystallography : Fox - 20 Dec 2011.
... Seems not to like any contemporary OS.
No luck either with Fedora 19, 32bits and Debian 7, 64bits.
EDIT : OK, Slackware64-14 with the fix, post # 7.

But OK with the Fedora 12 based Scientific Linux SL 6.4 (a RHEL6 copy.)

Result : Fox-1.9.8.R1352-1.SL6.x86_64.rpm, 3 MB
https://docs.google.com/file/d/0B7S2...it?usp=sharing

Install : # yum localinstall Fox-1.9.8.R1352-1.SL6.x86_64.rpm
Provides /usr/local/bin/Fox , and works OK on Fedora 19 - 64.

-

Last edited by knudfl; 07-26-2013 at 04:16 AM.
 
Old 07-25-2013, 09:23 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
Actually, I think there is a path wrong someplace - libX11.so.6 should be in /usr/lib64, not /lib64.
 
Old 07-25-2013, 09:34 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
# 4. "... a path wrong someplace"

Not really. Fedora 19 has no directories /lib/ and /lib64/ .
But there are links : /lib/ -> /usr/lib/ and /lib64/ -> /usr/lib64/.

And besides that, it doesn't matter which OS is used for Fox.
The exact same error will appear in the mentioned examples. See #3.

-
 
Old 07-25-2013, 11:17 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
It still exists... in libX11. Being unable to read the file is something else.
 
Old 07-25-2013, 05:12 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
# 1 . Fedora 19, etc.: A fix for Fox ...
Quote:
is defined in DSO /lib64/libX11.so.6 so try adding it to the linker command line
Please add -lX11 to Fox-1.9.8-R1352/ObjCryst/rules-gnu.mak , line 104 :
Code:
GL_WX_LIB = `$(WXCONFIG) --gl-libs` -lGL -lGLU -lX11 $(GLUT_LIB)
 
Old 07-25-2013, 06:04 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,170

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
I was just about to post about adding -lx11

that program is in fedora terms ANCIENT , belongs in a museum

gcc has changed a lot and inheritance has gotten rather strict

for the new version of gcc in fedora ( and almost all new os's )
you MUST explicitly state the library's needed in linking , they are no longer inherited from the code

this issue is compounded in Fedora , with it's use of the newest of the new

--- get used to this , this is very normal for fedora ,and it is almost guarantied that this will come up again .
 
Old 07-26-2013, 03:14 AM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
I don't remember it EVER "inheriting" a link directive from the code.

The only link directives ever defaulting was libc, and the language specific runtime libraries, and that isn't any form of inheritance, but happens to be from the invocation of the link - in this case, gcc has whatever is listed for "defaultlibs" and "stdlib", which I believe is only libc. Anything else requires a specific library reference. Now, various options will define/modify a "linker script" that can add libraries, but I never ran across one that specified any X library.

I've been linking X based utilities since about 1995 on Linux; always had to have any X libraries I needed on the command line... and in the proper order (THAT has changed at various times)
 
  


Reply

Tags
fox-crystallography


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
what is invalid operation? mazdad Programming 2 03-13-2011 04:41 PM
[SOLVED] Installed repositories for sudo apt-get. E: Invalid operation wakrein Linux - Newbie 2 09-08-2009 01:21 AM
can't install opera, invalid operation howarddevore Ubuntu 8 07-17-2005 09:22 PM
Could not read symbols atlep Programming 0 09-09-2004 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration