LinuxQuestions.org
Visit Jeremy's Blog.
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 08-27-2013, 02:07 PM   #1
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Rep: Reputation: 16
RHEL 6 - Can't link to X11 libraries


I have a workstation and a server. Both running RHEL 6. I have a user who is trying to compile on the server a piece of code that uses X11 libraries. This same code compiles on the workstation, but complains it:
Quote:
/usr/bin/ld: cannot find -lX11
The Makefile has:

Quote:
-L/usr/lib64 -lX11
Everything is identical as far as the source code on both machines. I even tried it on a second workstation, and it compiles there too. I have looked in /usr/lib64 on both machines and compared the contents, as well as using "yum list installed" to compare the machines. I have an executable on one machine, the other creates all of the object files, but doesn't link becuase it can't find the x11 library. So my question is, how can I find the exact library the Makefile is looking for?
 
Old 08-27-2013, 05:20 PM   #2
PECONET009
Member
 
Registered: Sep 2006
Location: Finland.
Distribution: kali linux.
Posts: 156

Rep: Reputation: 21
Exclamation Depending where you have it installed..

Quote:
Originally Posted by brownwrap View Post
I have a workstation and a server. Both running RHEL 6. I have a user who is trying to compile on the server a piece of code that uses X11 libraries. This same code compiles on the workstation, but complains it:


The Makefile has:



Everything is identical as far as the source code on both machines. I even tried it on a second workstation, and it compiles there too. I have looked in /usr/lib64 on both machines and compared the contents, as well as using "yum list installed" to compare the machines. I have an executable on one machine, the other creates all of the object files, but doesn't link becuase it can't find the x11 library. So my question is, how can I find the exact library the Makefile is looking for?
Depending on where you installed it.
As in the example: -L/usr/X11R6.4/lib -lX11 -lICE -lSM
 
Old 08-27-2013, 05:30 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
to build software you need the -devel rpm's

did you read the README and INSTALL files for this unknown software you are trying to build

also servers normally DO NOT have x11/xorg installed , there is no need for a GUI and having a GUI installed is a HUGE security risk

the easiest way is to use the rhel RHN repo and do a groupinstall
Code:
su -
yum grouplist
---- then from that list -----
yum groupinstall "X Window System" 
 and likely gcc
yum groupinstall "Development Tools"
but this is a big , VERY BIG security risk on a server
having a GUI ( xorg) AND HAVING GCC INSTALLED is not recommended
so REMOVE GCC AND THE XORG AS SOON AS POSSIBLE !!!
 
Old 08-27-2013, 06:10 PM   #4
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Original Poster
Rep: Reputation: 16
Actually we are using Portland Group compilers

We are not using gcc to compile the software, we are using Portland Group compilers. Here is what I did find with some more work. The software didn't come with a readme. It compiles on two workstations, but not on the server. This server was purchased to replace an only ROCKS cluster that the software also compiles on called bean. So I tarred up the sources from bean and moved them to my machine, compiled it, and ran it. I'm a system administrator, not a programer. The user's original request was to install the missing X11 libraries. So after I was able to build the executable on my machine, I was able to run it on the server. I still need to find out what the software expect as an input, but I ran ldd on the executable and all of the libraries are there:

Quote:
ldd ramos-bean-vernew.exe
linux-vdso.so.1 => (0x00007fffbb600000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003b77000000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003b74800000)
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003b7a800000)
libz.so.1 => /lib64/libz.so.1 (0x0000003b75400000)
libpgf90.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgf90.so (0x00007f0b95be8000)
libpgf90_rpm1.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgf90_rpm1.so (0x00007f0b95ae0000)
libpgf902.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgf902.so (0x00007f0b959c8000)
libpgf90rtl.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgf90rtl.so (0x00007f0b958a0000)
libpgftnrtl.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgftnrtl.so (0x00007f0b95770000)
libpgc.so => /software/depot/pgi-8.0/linux86-64/8.0-4/libso/libpgc.so (0x00007f0b95628000)
librt.so.1 => /lib64/librt.so.1 (0x0000003b74c00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b75000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b74400000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003b77800000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003b74000000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b73c00000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003b77400000)
Is there something else I can try to narrow it down to what it is looking for? Thanks.
 
Old 08-27-2013, 06:49 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Code:
ldd ramos-bean-vernew.exe
are you running this Microsoft Windows program through wine ?
what version and how was wine installed ?
 
Old 08-27-2013, 06:54 PM   #6
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by John VV View Post
Code:
ldd ramos-bean-vernew.exe
are you running this Microsoft Windows program through wine ?
what version and how was wine installed ?
No, this in on a Linux system. When the Portland Compiler, in this case Fortran, produces an executable, it gives it the .exe entension, why, I have no idea, but it run directly on the Linux machine.
 
Old 08-27-2013, 06:59 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
so it is FORTRAN and not C++
i have never had any 77 or 95 or current F code build with a microsoft file extension except on a MS operating system
 
Old 08-27-2013, 07:02 PM   #8
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Original Poster
Rep: Reputation: 16
Here is their website:

http://www.pgroup.com

I have nothing to do with them, just an end user.
 
  


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
[SOLVED] problems with x11 libraries after updates rosanna.sordo Ubuntu 7 02-03-2012 05:21 AM
linking X11 libraries samqazi1 Linux - Software 2 01-04-2006 01:14 AM
x11 libraries are optional? kgustaf Linux - Software 4 09-06-2005 05:42 PM
X11 libraries not found dannymacom Linux - Software 6 02-22-2004 06:31 PM
X11 libraries? eduac Linux - Software 4 07-11-2003 11:51 AM

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

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