Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?

Dan Nelson dnelson at allantgroup.com
Thu Oct 23 20:03:59 PDT 2008


In the last episode (Oct 23), Alexander Sack said:
> On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev <kabaev at gmail.com> wrote:
> > LD_LIBRARY_PATH is for native 64bit rtld. If you want a specific
> > path added for use by 32-bit ld-elf.so.1 only, use
> > LD_32_LIBRARY_PATH.
> >
> > Said that, your problem is likely caused by the fact that there is
> > no /lib32, only /usr/lib32. So if 64-bit library lives in /lib,
> > your LD_LIBRARY_PATH will cause loader to find its 32-bit
> > equivalent in /usr/lib32 first.
> >
> > Try LD_LIBRARY_PATH=/lib:/usr/lib:/usr/lib32:/usr/lib64 for better
> > results.
> 
> Yes I figured that out on my own but my question still exists, why
> isn't /usr/lib similar in format to /usr/lib32 though with respect to
> major numbers?

Ever since the switch from static to dynamic-linked /bin and /sbin,
some shared libraries are needed during the boot process.  Those
libraries live in /lib, and since there are no 32-bit binaries required
to boot a 64-bit system, there is no need for a /lib32.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list