From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MdsK8-0000kQ-3X for garchives@archives.gentoo.org; Wed, 19 Aug 2009 21:04:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77ECAE0334; Wed, 19 Aug 2009 21:03:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 34CA7E0334 for ; Wed, 19 Aug 2009 21:03:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id C63A864D2B for ; Wed, 19 Aug 2009 21:03:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.83 X-Spam-Level: X-Spam-Status: No, score=-2.83 required=5.5 tests=[AWL=-0.231, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PZ-29Hoh-q7s for ; Wed, 19 Aug 2009 21:03:48 +0000 (UTC) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by smtp.gentoo.org (Postfix) with SMTP id 8D9ED64CEE for ; Wed, 19 Aug 2009 21:03:46 +0000 (UTC) Received: (qmail invoked by alias); 19 Aug 2009 21:03:44 -0000 Received: from 91-67-162-127-dynip.superkabel.de (EHLO [192.168.1.62]) [91.67.162.127] by mail.gmx.net (mp060) with SMTP; 19 Aug 2009 23:03:44 +0200 X-Authenticated: #620707 X-Provags-ID: V01U2FsdGVkX18bM+dcT2wbl21kRWajx4ypqrDiAG3YaqYYXp+CvI VK605mOboVg0t+ Message-ID: <4A8C6827.1000901@gmx.de> Date: Wed, 19 Aug 2009 23:01:27 +0200 From: Thomas Kahle User-Agent: Thunderbird 2.0.0.22 (X11/20090818) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Development-related help X-BeenThere: gentoo-devhelp@gentoo.org X-BeenThere: gentoo-devhelp@lists.gentoo.org MIME-Version: 1.0 To: gentoo-devhelp@lists.gentoo.org Subject: Re: [gentoo-devhelp] autotools and as-needed References: <4A81EAAC.3060906@gmx.de> <1250449375.2185.13911.camel@localhost> In-Reply-To: <1250449375.2185.13911.camel@localhost> X-Enigmail-Version: 0.95.7 OpenPGP: id=A214B7B3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6EFD0B8E14C6D61FA3595C5D" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 X-Archives-Salt: fae0e40e-4e06-4438-9a9f-cc6734edc8ff X-Archives-Hash: 51e76e7339aa0ea26416776e4c311579 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6EFD0B8E14C6D61FA3595C5D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Peter Volkov wrote: > =D0=92 =D0=A1=D1=80=D0=B4, 12/08/2009 =D0=B2 00:03 +0200, Thomas Kahle = =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> the following check in configure.ac fails with --as-needed but works >> without it. Any hints what is wrong ? Thanks / Thomas >=20 > Common reason for failure with --as-needed is the order of libraries. I= n > you previous mail you wrote that with=20 >=20 > sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac" >=20 > it works but here:=20 >=20 >> for lib in "" "-lntl" "-lntl -lgf2x" >=20 > I see different order. Try to change order of -lgf2x and -lntl inside > ebuild. Also=20 This change of order is actually since I tried what you suggested. I find that this check fails just because the compile fails. It has nothing to do with configure. So here is my problem stripped down: $cat ntlcheck.c #include int main () { _ntl_GetTime(); } g++ ntlcheck.c -lntl -lgf2x works $g++ -Wl,--as-needed ntlcheck.c -lntl -lgf2x /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../libntl.so: undefined reference to `gf2x_mul' collect2: ld returned 1 exit status $ g++ -Wl,--as-needed ntlcheck.c -lgf2x -lntl /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../libntl.so: undefined reference to `gf2x_mul' collect2: ld returned 1 exit status BTW, installing ntl without gf2x support makes $g++ -Wl,--as-needed ntlcheck.c -lntl work ! It feels like it has something to do with ntl-headers having gf2x include= s. > sed 's/"-lntl"/"-lntl" "-lgf2x -lntl"/' -i "${S}/configure.ac" good point. No need to escape the ' " ' :) thanks Thomas --=20 Thomas Kahle The fundamental theorem of algebra is open source. Like any other mathematical theorem it can be applied free of charge and everybody has access to its proof and can convince himself how it works. Why should software be any different? --------------enig6EFD0B8E14C6D61FA3595C5D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqMaCcACgkQrpEWPKIUt7MTyACePLEyOYV/97bu2zOVz9Wji7/9 pBIAniMlIDzugjGIpFV44ugepzGig3aA =z1pH -----END PGP SIGNATURE----- --------------enig6EFD0B8E14C6D61FA3595C5D--