Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2012 12:37:45 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG, kostikbel@gmail.com
Subject:   Re: i386 binaries on amd64: ldconfig problems
Message-ID:  <201205311037.q4VAbjLR089071@lurza.secnetix.de>
In-Reply-To: <20120531095847.GN2358@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote:
 > The library search order is LD_{32}_LIBRARY_PATH, then DT_RPATH from
 > the binary, then hints, then /lib:/usr/lib. So if rpath of the binary
 > contains /usr/local/lib, you get /usr/local/lib before hints.
 > 
 > Rtld uses only the search path from the hints file. When a library with
 > the matched name found, rtld tries to load it. Regardless of the result
 > of the load attempt, further components of the search path list are not
 > tried.

I see.  Thanks for the explanation, now I understand.
I forgot about rpath and thought that the hints would take
precedence.

 > Look at the olvwm binary with readelf and see whether DT_RPATH specifies
 > /usr/local/lib.

Yes, it does:

 0x0000000f (RPATH)           Library rpath: [/usr/local/lib]

Well, then I will just keep my LD_32_LIBRARY_PATH workaround.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

The easiest way to teach yourself C++ in 21 days:
http://abstrusegoose.com/249



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