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

Alexander Kabaev kabaev at gmail.com
Thu Oct 23 19:50:52 PDT 2008


On Thu, 23 Oct 2008 22:31:40 -0400
"Alexander Sack" <pisymbol at gmail.com> wrote:
> 
> 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?  Actually now that I re-read your paragraph I suppose
> this isn't such a bad idea but for some reason I believe that if you
> have /usr/lib before /usr/lib32 it should *just* work.
> 
<trimmed hackers@ from CC as this question does not belong there>

The last statement is as wrong as it gets. I tried but I still fail to
see the reason why you would possibly expect that to work reliably. By
setting LD_LIBRARY_PATH to /usr/lib:/usr/lib32, you cause dynamic
linker to look for libraries in /usr/lib, usr/lib32 and /lib in that
exact order, so if library in /usr/lib32 shadows one in /lib, it will
be rightly picked up and you will get exactly what you asked for.

-- 
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-questions/attachments/20081024/e6fabd28/signature.pgp


More information about the freebsd-questions mailing list