From owner-freebsd-amd64@FreeBSD.ORG Mon Sep 3 12:10:15 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3562B106564A for ; Mon, 3 Sep 2012 12:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06E828FC16 for ; Mon, 3 Sep 2012 12:10:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q83CAEAR079756 for ; Mon, 3 Sep 2012 12:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q83CAEKE079744; Mon, 3 Sep 2012 12:10:14 GMT (envelope-from gnats) Date: Mon, 3 Sep 2012 12:10:14 GMT Message-Id: <201209031210.q83CAEKE079744@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org From: David Naylor X-Mailman-Approved-At: Mon, 03 Sep 2012 12:31:49 +0000 Cc: Subject: Re: amd64/171250: ldd32 cannot find some i386 libraries X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Naylor List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2012 12:10:15 -0000 The following reply was made to PR amd64/171250; it has been noted by GNATS. From: David Naylor To: Konstantin Belousov Cc: freebsd-gnats-submit@freebsd.org Subject: Re: amd64/171250: ldd32 cannot find some i386 libraries Date: Mon, 3 Sep 2012 14:01:43 +0200 --nextPart4535589.M6IlXmkH34 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sunday, 2 September 2012 17:57:55 Konstantin Belousov wrote: > On Sun, Sep 02, 2012 at 12:42:43PM +0000, David Naylor wrote: > > ldd32 does not find libraries, yet ldconfig lists them as known. > >=20 > > # ldconfig -32 -r | grep directories > >=20 > > search directories: > > /usr/lib32:/usr/local/lib32:/usr/local/lib32/wine >=20 > You should also look at the DT_RPATH and DT_RUNPATH tags in your binary. > I suspect that there is some path hardcoded which points to the > native 64bit libraries dir. # elfdump -d libcups.so.2 entry: 9 d_tag: DT_RPATH d_val: /usr/lib:/usr/local/lib # elfdump -a libcups.so.2 | grep DT_RUNPATH =2E.. As you suspected the paths are hardcoded. However, since this is a 32bit=20 library (and compiled in a i386 chroot) on a 64bit system I would have=20 expected the dynamic linker to translate /usr/lib to /usr/lib32, or to prep= end=20 it. =20 > If my theory holds, ths explicit use of LD_32_LIBRARY_PATH helps because > the env var path has precedence over the path from tag. If my expectation, mentioned above, is wrong then please close this bug. I= 'm=20 happy to continue using LD_32_LIBRARY_PATH to enduce the correct behaviour.= =20 Thanks for your quick reply. --nextPart4535589.M6IlXmkH34 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEABECAAYFAlBEnCoACgkQUaaFgP9pFrJ+rACdFEfZkMQrm75Bs0B5+zY83c/4 Y3MAoI62Ygvi/hl8hJ/44NOp2sNbw+5J =dpVu -----END PGP SIGNATURE----- --nextPart4535589.M6IlXmkH34--