This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does $LIB not work on Ubuntu?


On Thu, Aug 4, 2011 at 4:16 AM, Florian Weimer <fweimer@bfk.de> wrote:
> I'm pretty sure that at least on some Ubuntu versions, /lib64 is a
> symlink to /lib. ?Then $LIB will not work as expected.

Florian,

Thanks, that does appear to be the case at least for Ubuntu 10.10
64-bit. However, it's not directly related to this problem. My app has
its own shared library which is installed into <install-dir>/lib
(32-bit version) and <install-dir>/lib64 (64-bit), and the $LIB token
is supposed to switch between them as required. The system libraries
can take care of themselves as far as I'm concerned; I only need $LIB
to deal with my own shared lib.

However, this fact may at least partly explain what the Ubuntu people
were thinking. Since /lib64 is a link to /lib and /lib is filled with
64-bit libraries, that seems pretty clearly a statement that  32-bit
binaries will never run on this build. Given that, I can check for the
existence of a /lib64 -> /lib link and force LD_PRELOAD to point
directly to the 64-bit version of my library. Similarly, if no /lib64
exists at all, I can assume no 64-bit binaries will run and point
exclusively to the 32-bit version.

None of this makes sense to me - I don't see why Ubuntu needed to turn
off the $LIB feature even if they do the symlink dance mentioned, and
I don't know why they'd choose a structure which makes multilib setups
impossible. But at least I (may) have a workaround for their baffling
behavior.

Thanks,
AK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]