From owner-freebsd-stable@FreeBSD.ORG Thu May 31 10:38:03 2012 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EA721065672 for ; Thu, 31 May 2012 10:38:03 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8B46C8FC15 for ; Thu, 31 May 2012 10:38:02 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id q4VAbjwF089072; Thu, 31 May 2012 12:38:00 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id q4VAbjLR089071; Thu, 31 May 2012 12:37:45 +0200 (CEST) (envelope-from olli) Date: Thu, 31 May 2012 12:37:45 +0200 (CEST) Message-Id: <201205311037.q4VAbjLR089071@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, kostikbel@gmail.com In-Reply-To: <20120531095847.GN2358@deviant.kiev.zoral.com.ua> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.9.6-20101126 ("Burnside") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (lurza.secnetix.de [127.0.0.1]); Thu, 31 May 2012 12:38:00 +0200 (CEST) Cc: Subject: Re: i386 binaries on amd64: ldconfig problems X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, kostikbel@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 10:38:03 -0000 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