From owner-freebsd-stable@FreeBSD.ORG Thu May 31 11:23:09 2012 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 849241065675 for ; Thu, 31 May 2012 11:23:09 +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 DCB108FC1D for ; Thu, 31 May 2012 11:23:08 +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 q4VBMq4u090607; Thu, 31 May 2012 13:23:07 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id q4VBMqca090606; Thu, 31 May 2012 13:22:52 +0200 (CEST) (envelope-from olli) Date: Thu, 31 May 2012 13:22:52 +0200 (CEST) Message-Id: <201205311122.q4VBMqca090606@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, Konstantin Belousov , Eugene Grosbein In-Reply-To: <4FC747DA.8040902@rdtc.ru> 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 13:23:07 +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, Konstantin Belousov , Eugene Grosbein 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 11:23:09 -0000 Eugene Grosbein wrote: > 31.05.2012 16:58, Konstantin Belousov writes: > > 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. > > > > Look at the olvwm binary with readelf and see whether DT_RPATH specifies > > /usr/local/lib. > > I've faced exactly same problem. What can be done other to rebuild > of all such 32bit bit binaries to make them work for transition period? > Should libmap32.conf help? It seems it does not. Does LD_32_LIBRARY_PATH not work for you? Another idea would be to modify rtld-elf to automatically replace "lib" with "lib32" inside rpath strings when executing i386 binaries on an amd64 system. This would be a rather trivial change, just one line in rtld.c. But I haven't actually tried this. LD_32_LIBRARY_PATH works for me. 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 worst thing about Perl jokes is that next morning you can't understand why they seemed so funny." (from #protolol)