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

Alexander Kabaev kabaev at gmail.com
Sat Oct 25 18:55:53 UTC 2008


On Sat, 25 Oct 2008 13:10:53 -0400
"Alexander Sack" <pisymbol at gmail.com> wrote:

> On Sat, Oct 25, 2008 at 9:57 AM, Alexander Kabaev <kabaev at gmail.com>
> wrote:
> > On Sat, 25 Oct 2008 08:49:19 -0400
> > "Alexander Sack" <pisymbol at gmail.com> wrote:
> >
> >>
> >> Is this a bug or not in FreeBSD's rtld?
> >>
> >> -aps
> >
> > It is not. In case it was not clear before, I maintain that you
> > _ask_ rtld for wrong behaviour and you get back what you asked for,
> > down to the letter. 'Tasting' libraries just because someone
> > somewhere want to screw up their configuration does not seem right
> > to me at all.
> 
> I maintain that rtld should not load 32-bit libraries for a 64-bit
> binary. That is WRONG anyway you look at it.  And again, if it checked
> the arch type and skipped libutil.so.5 in /usr/lib32 it would fall
> back to checking /lib and things would work.  Moreover, if /usr/lib
> had major number links just like /usr/lib32 has, this would again have
> worked without issue.
> 
> I believe this will be fixed on the other side of the fence (not
> setting LD_LIBRARY_PATH to include /usr/lib32 to begin wtih) but
> still, my point still stands.
> 
> -aps

It doesn't. Stop feeding 32 bit libraries and it won't try to load them.
It is as simple as that. For complex scenarious we do provide LD_32_
family of environment variables and if you refuse using them and insist
on sticking with clearly broken configuration, it your problem, not
rtld's.

-- 
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20081025/3848eb05/signature.pgp


More information about the freebsd-hackers mailing list