amd64/171250: ldd32 cannot find some i386 libraries

David Naylor naylor.b.david at
Mon Sep 3 12:10:15 UTC 2012

The following reply was made to PR amd64/171250; it has been noted by GNATS.

From: David Naylor <naylor.b.david at>
To: Konstantin Belousov <kostikbel at>
Cc: freebsd-gnats-submit at
Subject: Re: amd64/171250: ldd32 cannot find some i386 libraries
Date: Mon, 3 Sep 2012 14:01:43 +0200

 Content-Type: Text/Plain;
 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
 > 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
 entry: 9
         d_tag: DT_RPATH
         d_val: /usr/lib:/usr/local/lib
 # elfdump -a | grep DT_RUNPATH
 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=
 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=
 happy to continue using LD_32_LIBRARY_PATH to enduce the correct behaviour.=
 Thanks for your quick reply.
 Content-Type: application/pgp-signature; name=signature.asc 
 Content-Description: This is a digitally signed message part.
 Version: GnuPG v2.0.19 (FreeBSD)

More information about the freebsd-amd64 mailing list