From owner-freebsd-questions@FreeBSD.ORG Wed Jul 2 19:32:05 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 063E8B2A for ; Wed, 2 Jul 2014 19:32:05 +0000 (UTC) Received: from archeo.suszko.eu (archeo.unixguru.pl [IPv6:2001:41d0:1:f47a::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D3F82948 for ; Wed, 2 Jul 2014 19:32:04 +0000 (UTC) Received: from archeo (localhost [127.0.0.1]) by archeo.suszko.eu (Postfix) with ESMTP id DAE672063809; Wed, 2 Jul 2014 21:32:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at archeo.local Received: from archeo.suszko.eu ([127.0.0.1]) by archeo (archeo.local [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id elwS1RqM9Ana; Wed, 2 Jul 2014 21:32:00 +0200 (CEST) Received: from leo.lan (89-66-16-9.dynamic.chello.pl [89.66.16.9]) by archeo.suszko.eu (Postfix) with ESMTPSA id 282E42063807; Wed, 2 Jul 2014 21:32:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=suszko.eu; s=dkim; t=1404329520; bh=pmQzuPDiUp+so6oHFp53AsBHmhCUfDZBls+wRF6mu2o=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=YqI6gNllmsbcGV+u30P/KrCCydm0690GPEYT8HzE+RQKPOlk9SCj5nW9NHXhIw3SM 0X/SViKe7XNQZCTXRZSlQocVCfbWVIOk/leO/qJLk6ymKqoDvua+dTIIi40EOBDkVt YpfEYiD/mmZc3yIUbIYCfNxWXx5W6KVyLL2VEAIQ= Date: Wed, 2 Jul 2014 21:31:52 +0200 From: Maciej Suszko To: Mike Clarke Subject: Re: /usr/local/lib/compat/pkg/ cleanup ? Message-ID: <20140702213152.52897e3b@leo.lan> In-Reply-To: <2862326.RiQ9aP1WQA@curlew.lan> References: <20140627161801.GA38362@admin.sibptus.tomsk.ru> <20140628135325.GA55592@admin.sibptus.tomsk.ru> <20140702084125.50882034@helium> <2862326.RiQ9aP1WQA@curlew.lan> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/e8r1RLQ3dE0rbaNuncaDjiz"; protocol="application/pgp-signature" Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 19:32:05 -0000 --Sig_/e8r1RLQ3dE0rbaNuncaDjiz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Mike Clarke wrote: > On Wednesday 02 July 2014 08:41:25 Maciej Suszko wrote: >=20 > > 1) find /usr/local -type f -print0 | xargs -0 ldd > /tmp/ldds > > 2 ) search the ldds file for "not found" or "compat" > > 3) find what packages affected files belongs to > > 4) recompile affected packages >=20 > Thanks for that very useful tip. >=20 > I've just done those steps and confirmed that it's OK for me to > remove everything in /usr/local/lib/compat/pkg. Interestingly it also=20 > highlighted several hundred instances of "not found". Rebuilding a=20 > couple of ports and setting LD_LIBRARY_PATH to =20 > /usr/local/openjdk6/jre/lib/amd64:/usr/local/openjdk6/jre/lib/amd64/serve= r:/usr/local/openoffice-4.0.1/openoffice4/program=20 > before re-running ldd sorted out most of them but I was still left=20 > with 128 "not found" objects all of which were related to items in=20 > /usr/local/lib32. For Open/LibreOffice, OpenJDK I just omit "not found" ldd messages, because those packages provide libs which are linked against other libs located outside well known locations (probably specified via /var/run/ld*.so.conf according to ldconfig(8)): /usr/local/openjdk7/jre/lib/amd64/libzip.so: libz.so.6 =3D> /lib/libz.so.6 (0x801608000) libjava.so =3D> /usr/local/openjdk7/jre/lib/amd64/libjava.so (0x80181e000) libjvm.so =3D> not found (0) libc.so.7 =3D> /lib/libc.so.7 (0x80081e000) libjvm.so =3D> not found (0) libverify.so =3D> /usr/local/openjdk7/jre/lib/amd64/libverify.so (0x801a46000) libjvm.so =3D> not found (0) /usr/local/openjdk7/jre/lib/amd64/server/libjvm.so: libm.so.5 =3D> /lib/libm.so.5 (0x8020da000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x802300000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x8025c0000) libthr.so.3 =3D> /lib/libthr.so.3 (0x8027dc000) libc.so.7 =3D> /lib/libc.so.7 (0x80081e000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x802a01000) Setting LD_LIBRARY_PATH do the trick, but in my opinion you can ignore that. > For example: >=20 > curlew:/tmp% uname -a > FreeBSD curlew.lan 9.1-RELEASE-p14 FreeBSD 9.1-RELEASE-p14 #0: Tue > Jun 3 08:56:12 UTC 2014 root@amd64- > builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >=20 > curlew:/tmp% ldd /usr/local/bin32/wmc > /usr/local/bin32/wmc: > libgettextpo.so.5 =3D> /usr/local/lib32/libgettextpo.so.5=20 > (0x281ea000) > libc.so.7 =3D> /usr/lib32/libc.so.7 (0x2822f000) > libintl.so.9 =3D> not found (0) > libiconv.so.3 =3D> not found (0) >=20 > But libintl.so.9 and libiconv.so.3 do exist. Accroding to rtld(1): (...) On 64-bit architectures, the linker for 32-bit objects recognizes all the environment variables listed below, but is being prefixed with LD_32_ It's been quite a long time since I last used i386 binaries (except those ran via linuxulator), but your /usr/local/bin32/wmc is compiled against 32-bit libintl.so.9 and libiconv.so.3 (located in /usr/local/lib32) and ldd probably see some architecture mismatch, showing "not found (0)". You can always try to use truss(1) and check what is going on, where all libraries are searched. Maybe some developer can shed some light on this topic and explain us how it's all organized :) --=20 regards, Maciej Suszko. --Sig_/e8r1RLQ3dE0rbaNuncaDjiz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlO0Xi4ACgkQCikUk0l7iGrOfACfYmeF63g2KKEIA/CnDVs4Bb7G QzsAn16sScSj1mpo1ynffhplwK9NnFPG =YzhA -----END PGP SIGNATURE----- --Sig_/e8r1RLQ3dE0rbaNuncaDjiz--