From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/5] gnu: gnupg: Fixed cross-compile issues. Date: Sun, 15 Dec 2013 22:14:24 +0100 Message-ID: <87ppoxolzj.fsf@gnu.org> References: <1387043002-6138-1-git-send-email-john@darrington.wattle.id.au> <1387043002-6138-2-git-send-email-john@darrington.wattle.id.au> <87y53nthwo.fsf@gnu.org> <20131214190218.GA8061@intra> <8761qrta62.fsf@gnu.org> <20131215082427.GA5093@intra> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsJ1Q-0002nc-QI for guix-devel@gnu.org; Sun, 15 Dec 2013 16:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsJ1K-0001zi-NJ for guix-devel@gnu.org; Sun, 15 Dec 2013 16:14:44 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:12816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsJ1K-0001zS-GX for guix-devel@gnu.org; Sun, 15 Dec 2013 16:14:38 -0500 In-Reply-To: <20131215082427.GA5093@intra> (John Darrington's message of "Sun, 15 Dec 2013 09:24:28 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: John Darrington Cc: guix-devel@gnu.org John Darrington skribis: > However, is --with-gpg-error-prefix really needed? By default the c= ross > gcc will find the target libgpg-error in its search path, and not the > native one, so I would guess this is OK. >=20=20=20=20=20=20 > > Without --with-gpg-error-prefix I get the following error when cross comp= iling: > > libtool: link: mips64el-linux-gnu-gcc -shared -fPIC -DPIC .libs/libgcry= pt_la-visibility.o .libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o .l= ibs/libgcrypt_la-sexp.o .libs/libgcrypt_la-hwfeatures.o .libs/libgcrypt_la-= stdmem.o .libs/libgcrypt_la-secmem.o .libs/libgcrypt_la-missing-string.o .l= ibs/libgcrypt_la-module.o .libs/libgcrypt_la-fips.o .libs/libgcrypt_la-hmac= 256.o .libs/libgcrypt_la-ath.o -Wl,--whole-archive ../cipher/.libs/libciph= er.a ../random/.libs/librandom.a ../mpi/.libs/libmpi.a ../compat/.libs/libc= ompat.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/nix/store/c3crv7mdmbc5sib7v= znf0183n5xxa8kv-libgpg-error-1.12/lib -Wl,-rpath -Wl,/nix/store/c3crv7mdmbc= 5sib7vznf0183n5xxa8kv-libgpg-error-1.12/lib -L/nix/store/c3crv7mdmbc5sib7vz= nf0183n5xxa8kv-libgpg-error-1.12/lib /nix/store/c3crv7mdmbc5sib7vznf0183n5x= xa8kv-libgpg-error-1.12/lib/libgpg-error.so -O2 -Wl,--version-script=3D./l= ibgcrypt.vers -Wl,-soname -Wl,libgcrypt.so.11 -o .libs/libgcrypt.so.11.8.2 > /nix/store/c3crv7mdmbc5sib7vznf0183n5xxa8kv-libgpg-error-1.12/lib/libgpg-= error.so: could not read symbols: File in wrong format > collect2: error: ld returned 1 exit status > Makefile:493: recipe for target 'libgcrypt.la' failed > make[2]: *** [libgcrypt.la] Error 1 Actually libgcrypt=E2=80=99s =E2=80=98configure=E2=80=99 reports this above: --8<---------------cut here---------------start------------->8--- configure: WARNING: *** *** The config script /nix/store/j47ldsz3p5mc3k5yp00lx1jwkan88k53-libgpg-er= ror-1.12/bin/gpg-error-config was *** built for x86_64-unknown-linux-gnu and thus may not match the *** used host mips64el-unknown-linux-gnu. *** You may want to use the configure option --with-gpg-error-prefix *** to specify a matching config script. *** --8<---------------cut here---------------end--------------->8--- So CROSS_LIBRARY_PATH and LIBRARY_PATH are correct (no confusion between target and native libraries). However =E2=80=98configure=E2=80=99 uses the =E2=80=98gpg-error-config=E2=80=99 tool to determine the library=E2=80=99s = location, and it gets the run that of the native libgpg-error (because the target libgpg-error isn=E2=80=99t in $PATH), which returns the location of the native libgpg-er= ror. So indeed, --with-gpg-error-prefix is needed. Could you send the patch with just a comment above explaining that? Thanks, and sorry for taking so long! Ludo=E2=80=99.