Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2008 03:05:38 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "Alexander Sack" <pisymbol@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-questions@freebsd.org
Subject:   Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?
Message-ID:  <86hc72x0nx.fsf@ds4.des.no>
In-Reply-To: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> (Alexander Sack's message of "Thu, 23 Oct 2008 20:31:05 -0400")
References:  <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Alexander Sack" <pisymbol@gmail.com> writes:
> I have some weird behavior I'm trying to figure out and was wondering
> if someone can point me in the right direction.  I'm running a FreeBSD
> 6.1-RELEASE-amd64 machine.  If I add /usr/lib32 to my LD_LIBRARY_PATH
> it breaks all of my binaries on my 64-bit machine.
> [...]
> LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64

I'm surprised you have /usr/bin in there...

> I would ASSUME that rtld would look at my LD_LIBRARY_PATH and use
> /usr/lib to find libraries, not /usr/lib32.  Why does it insist on
> picking /usr/lib32 when "/bin/ls" is CLEARLY a 64-bit binary?  This
> doesn't make complete sense to me just yet.

If you look at the rtld(1) man page, there are a number of environment
variables you can set to debug the loader.  I'm not sure how helpful
they are, though.

> Someone I'm sure is going "don't do that" and I agree.

Well, yeah, but it should (at the very least) fail in a more graceful
manner.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



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