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 1MSEl6-0003rP-IA for garchives@archives.gentoo.org; Sat, 18 Jul 2009 18:35:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 79C36E048F; Sat, 18 Jul 2009 18:35:42 +0000 (UTC) Received: from spencer.aistleitner.info (mail.aistleitner.info [85.193.129.95]) by pigeon.gentoo.org (Postfix) with ESMTP id 35060E048F for ; Sat, 18 Jul 2009 18:35:42 +0000 (UTC) Received: from localhost.aistleitner.info ([127.0.0.1] helo=spencer.aistleitner.info) by spencer.aistleitner.info with esmtp (Exim 4.69) (envelope-from ) id 1MSEl2-0003M5-K9 for gentoo-embedded@lists.gentoo.org; Sat, 18 Jul 2009 20:35:40 +0200 Date: Sat, 18 Jul 2009 20:35:35 +0200 To: gentoo-embedded@lists.gentoo.org Subject: [gentoo-embedded] cross-linker cannot find file redirected to from linker script From: servantes.REMOVE.SPAM@gsmpaaiml.com Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.64 (Linux) Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ca0c1520-2c68-45ec-851d-9f0f7adffc2d X-Archives-Hash: a8d592cf64501461d8a53615590804b0 Hello, I came across some difficulties when cross-compiling and I am unsure =20 against which package to file a bug report. On an x86_64-pc-linux-gnu system, I set up cross compiling for =20 i686-elvis-linux-gnu using crossdev. Using the emerge-wrapper scripts from sys-devel/crossdev-wrappers, I was = =20 trying to =E2=80=9Cemerge-i686-elvis-linux-gnu system=E2=80=9D but after = merging some =20 packages, compiling fails at sys-apps/shadow for i686-elvis-linux-gnu =20 (i.e.: i686-elvis-linux-gnu-gcc -O2 -pipe -Wl,-O1 -o passwd passwd.o =20 ../libmisc/libmisc.a ../lib/.libs/libshadow.a -lpam -lpam_misc =20 /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so -lz -Wl,-rpath =20 -Wl,/usr/i686-elvis-linux-gnu/usr/lib -Wl,-rpath =20 -Wl,/usr/i686-elvis-linux-gnu/usr/lib fails) with the following error: /usr/libexec/gcc/i686-elvis-linux-gnu/ld: skipping incompatible =20 /lib/libcrack.so.2 when searching for /lib/libcrack.so.2 /usr/libexec/gcc/i686-elvis-linux-gnu/ld: cannot find /lib/libcrack.so.2 Hunting down the problem, I came across the linker script =20 /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so, a linker script containing OUTPUT_FORMAT ( elf32-i386 ) GROUP ( /lib/libcrack.so.2 ) and belonging to sys-libs/cracklib. As far as I understand it, it should = =20 point the linker to the real shared object, which is /usr/i686-elvis-linux-gnu/lib/libcrack.so.2 . The missing sysroot /usr/i686-elvis-linux-gnu in the linker script looks = =20 sane, as there is no =E2=80=9E/usr/i686-elvis-linux-gnu=E2=80=9D, once th= e system gets =20 deployed on a real machine. Furthermore, the preamble of =20 /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so tells me: And yes, this works in the cross-compiling scenario as the sysroot-ed linker will prepend the real path. It fails to work for my cross-compile setup, because replacing /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so in the above call to gcc by /usr/i686-elvis-linux-gnu/lib/libcrack.so.2 (the file the linker script should redirect the linker to) succeeds. So =20 does replacing /lib/libcrack.so.2 by /usr/i686-elvis-linux-gnu/lib/libcrack.so.2 within /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so ) The above gcc call results in /usr/bin/i686-elvis-linux-gnu-ld --sysroot=3D/usr/i686-elvis-linux-gnu= =20 [...] so a missing --sysroot paramenter is not the problem. Originally, I wanted to file a bug about this problem, but I am unsure to= =20 what package the bug belongs. Should this bug be filed against =20 sys-libs/cracklib (it installs the linker script) or against =20 sys-devel/binutils? Or is the above problem a sign for a wrongly setup cross-compile =20 environment (I am just beginnig to toy around with cross-compiling)? Kind regards, servantes --=20 Do _not_ remove the ".REMOVE.SPAM" in the address. It's a catch for too smart address harvesters