[vox-tech] CentOS 5.10: Finding the right libX11

ACaffeineAddict . p at dirac.org
Fri Apr 18 07:03:04 PDT 2014


Need to use CentOS 5.10 for work.  libX11-devel is installed for both 32
and 64 bit.  Wrote a hello world program and compiled:

$ gcc -L/usr/lib64 hello.c -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for
-lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

Took me a second to figure out why:

$ ll /usr/lib/libX11.so*
lrwxrwxrwx 1 root root      15 Apr 17 18:52 /usr/lib/libX11.so ->
libX11.so.6.2.0
lrwxrwxrwx 1 root root      15 Apr 12 13:59 /usr/lib/libX11.so.6 ->
libX11.so.6.2.0
-rwxr-xr-x 1 root root 1062108 Oct  5  2011 /usr/lib/libX11.so.6.2.0

$ ll /usr/lib64/libX11*
lrwxrwxrwx 1 root root      15 Apr 12 13:59 /usr/lib64/libX11.so.6 ->
libX11.so.6.2.0
-rwxr-xr-x 1 root root 1099816 Oct  5  2011 /usr/lib64/libX11.so.6.2.0


Of course, after making the appropriate symbolic link in /usr/lib64, my
little hello world program compiled and linked.

I'm curious.  Why does CentOS (and presumably rhel, fedora) make the
libX11.so -> libX11.so.6.2.0 link in /usr/lib but not /usr/lib64?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lugod.org/pipermail/vox-tech/attachments/20140418/16dc4b47/attachment.htm 


More information about the vox-tech mailing list