Bug 120278 - gcc cannot link to X11 shared library
Summary: gcc cannot link to X11 shared library
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
(Show other bugs)
Version: 1
Hardware: x86_64 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-07 15:19 UTC by Deane Peterson
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-07 15:24:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Deane Peterson 2004-04-07 15:19:18 UTC
Description of problem:I can no longer link against the X11 library. 
It finds the library all right, but rejectes it as incompatible. 
Typical text is:

g77 -fno-backslash -fPIC -o pgdemo1
/data/src/pgplot/pgplot/examples/pgdemo1.f -L`pwd` -lpgplot -lpng -lz
-L/usr/X11R6/lib -lX11
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

The other libraries indicated were all compiled with the -fPIC option.
 I tried this with and without.

I should say this is the new version of Fedora.Core 1 for the AMD-64
bit processor.  I'm running it on a Compaq Presario R3000Z.

Version-Release number of selected component (if applicable):
gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.3.2/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
Thread model: posix
gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)

How reproducible:
I have other makefiles that also fail.  They all use the pgplot
package (which I recompiled here, fresh) which is why I need Xll.

Steps to Reproduce:
1. shown above
Actual results:

Expected results:
clean complication and an executable

Additional info:

Comment 1 Jakub Jelinek 2004-04-07 15:24:31 UTC
If this is on x86-64 and you're not using -m32 option to create
a 32-bit program, then you obviously have to use -L/usr/X11R6/lib64/
instead of -L/usr/X11R6/lib/.

Note You need to log in before you can comment on or make changes to this bug.