From owner-freebsd-ports@FreeBSD.ORG Tue Feb 21 22:19:28 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 306471065676 for ; Tue, 21 Feb 2012 22:19:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id B5E2E8FC18 for ; Tue, 21 Feb 2012 22:19:27 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q1LIvt9i068744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Feb 2012 20:57:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q1LIvsVE031520; Tue, 21 Feb 2012 20:57:54 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q1LIvs61031519; Tue, 21 Feb 2012 20:57:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 21 Feb 2012 20:57:54 +0200 From: Konstantin Belousov To: Steve Kargl Message-ID: <20120221185754.GL55074@deviant.kiev.zoral.com.ua> References: <20120221182850.GA20768@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+svXpSx+RSEd8UhP" Content-Disposition: inline In-Reply-To: <20120221182850.GA20768@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: rtld or lang/gcc cannot find libgcc_s.so.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 22:19:28 -0000 --+svXpSx+RSEd8UhP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 21, 2012 at 10:28:50AM -0800, Steve Kargl wrote: > Sorry about the cross post, but I can't tell if this > a -current issue of a -ports issue. Unfortunately, > I updated my freebsd 10.0 systems and the lang/gcc > port during the same timeframe. >=20 > I have compiled my math library and several programs > with gfortran, which is installed by lang/gcc (pkg_info=20 > shows gcc-4.6.2_1). When I try running the program > I get >=20 > troutmask:kargl[210] halfspace > /lib/libgcc_s.so.1: version GCC_4.6.0 required by /home/kargl/bin/halfspa= ce > not foundtroutmask:kargl[211] >=20 > (Note, the annoying absense of a newline character after the error > message, which is a completely different issue.) >=20 > I see this problem on both freebsd-i386 and freebsd-amd64. >=20 > troutmask:kargl[212] ldd ~/bin/halfspace > /home/kargl/bin/halfspace: > liblapack.so.4 =3D> /usr/local/lib/liblapack.so.4 (0x2008c3000) > libblas.so.2 =3D> /usr/local/lib/libblas.so.2 (0x201463000) > libgfortran.so.3 =3D> /usr/local/lib/gcc46/libgfortran.so.3 (0x20= 175d000) > libm.so.5 =3D> /lib/libm.so.5 (0x201a70000) > libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x201c95000) > libquadmath.so.0 =3D> /usr/local/lib/gcc46/libquadmath.so.0 (0x20= 1ea2000) > libc.so.7 =3D> /lib/libc.so.7 (0x2020d6000) > troutmask:kargl[212] ldconfig -r | grep libgcc_s > 29:-lgcc_s.1 =3D> /lib/libgcc_s.so.1 > 723:-lgcc_s.1 =3D> /usr/local/lib/gcc46/libgcc_s.so.1 >=20 > So, it appears that rtld is finding the wrong libgcc_s.so.1 or=20 > the lang/gcc port is no longer providing sufficient information > for rtld to choose the correct library. >=20 > I have reverted revisions 230784, 299768, and 229508 (and > various combinitions of these revisions) from rtld-elf. The > result does not change the above error. >=20 > I can work around the problem by specifying -static during > the building of my programs. Or, I can work around the > problem by *explicitly* adding '-rpath /usr/local/lib' to the > command line, which I have never had to do. >=20 I highly suspect that you just happen to not need a symbol from the newest namespace before. The thing to look first is the library search path in the ld.so hints, which is output at the second line of ldconfig -r. I think that you have /lib before /usr/local/lib/gcc46 in your setup. This guess is confirmed by the numeration of the two instances of gcc_s above. Either change the config, or use -rpath. AFAIR, ldconfig -m adds the directory at the end of the search list. --+svXpSx+RSEd8UhP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9D6TEACgkQC3+MBN1Mb4hjugCfRXYXIAPgTsF+A2DKUq5bf1A2 A70AoMle3bjhdxU4Nw7+h5XYfzgi6/tP =PhNe -----END PGP SIGNATURE----- --+svXpSx+RSEd8UhP--