funky library linking problems in Fedora Core 2 x86_64

Phil Dybvig fedora at ducksoup.afree.net
Sun Jul 11 01:26:36 UTC 2004


Nicholas --

>While running Fedora Core 2 x86_64 on AMD Opterons I have noticed 
>something odd about compiling programs which link to shared libraries...

  This is a pet peeve of mine.

  The athlon 64 chips can run either 64-bit or 32-bit programs at will, and the 
modern kernels are set up to run either -- this is called biarch.  The two 
architectures have separate shared library directories (e.g. /usr/X11R6/lib for 
32-bit and /usr/X11R6/lib64 for 64-bit) which is necessary because, for example, 
function calls with addresses as arguments do not look the same.  A lot of the 
time this works fine, but some packages have configuration information that is 
different for the two architectures in the same place; for example, gdk-pixbuf 
has configuration information in /etc/gtk-2.0 that conflicts between the two 
versions.  Perhaps the x86_64 RPMs should be arranged to include both with 
suitable configuration files that handle both as well as some sort of flag that 
tells rpm that this package satisfies the i386 dependencies as well.  Another 
possibility is that making rpm edit the config files in /etc rather than just 
installing them (like rpm does for kernel installation of grub.conf) could give 
you a good config file whether you install the i386 version, the x86_64 version, 
or both.
  
  Anyway, I think we should think of the current biarch configuration as being 
broken until there is a better way of handling both sets of all the 
commonly-used shared libraries.  I'm sorry this has turned into a rant,* but 
this has been brewing for a while...
  
  In terms of practical advice, sometimes it is possible to edit a badly formed 
Makefile to look at the correct library (e.g. change /usr/X11R6/lib to 
/usr/X11R6/lib64).  Justin Forbes' FC2 x86_64 FAQ page 
http://www.linuxtx.org/amd64faq.html and his posts here have additional 
suggestions that can help for packages with well-enough formed ./configure;make.

-- Phil

*well, maybe not very sorry :-)





More information about the fedora-list mailing list