Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 22:03:54 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Alexander Sack <pisymbol@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, Alexander Kabaev <kabaev@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?
Message-ID:  <20081024030354.GA41283@dan.emsphone.com>
In-Reply-To: <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com>
References:  <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <20081023220949.7f304bbb@kan.dnsalias.net> <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 23), Alexander Sack said:
> On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev <kabaev@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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081024030354.GA41283>