public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] cross-linker cannot find file redirected to from linker script
@ 2009-07-18 18:35 servantes.REMOVE.SPAM
  2009-07-19 18:11 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: servantes.REMOVE.SPAM @ 2009-07-18 18:35 UTC (permalink / raw
  To: gentoo-embedded

Hello,

I came across some difficulties when cross-compiling and I am unsure  
against which package to file a bug report.

On an x86_64-pc-linux-gnu system, I set up cross compiling for  
i686-elvis-linux-gnu using crossdev.
Using the emerge-wrapper scripts from sys-devel/crossdev-wrappers, I was  
trying to “emerge-i686-elvis-linux-gnu system” but after merging some  
packages, compiling fails at sys-apps/shadow for i686-elvis-linux-gnu  
(i.e.:

i686-elvis-linux-gnu-gcc -O2 -pipe -Wl,-O1 -o passwd passwd.o   
../libmisc/libmisc.a ../lib/.libs/libshadow.a -lpam -lpam_misc  
/usr/i686-elvis-linux-gnu/usr/lib/libcrack.so -lz -Wl,-rpath  
-Wl,/usr/i686-elvis-linux-gnu/usr/lib -Wl,-rpath  
-Wl,/usr/i686-elvis-linux-gnu/usr/lib

fails) with the following error:

/usr/libexec/gcc/i686-elvis-linux-gnu/ld: skipping incompatible  
/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  
/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  
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  
sane, as there is no „/usr/i686-elvis-linux-gnu”, once the system gets  
deployed on a real machine. Furthermore, the preamble of  
/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  
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=/usr/i686-elvis-linux-gnu  
[...]
so a missing --sysroot paramenter is not the problem.

Originally, I wanted to file a bug about this problem, but I am unsure to  
what package the bug belongs. Should this bug be filed against  
sys-libs/cracklib (it installs the linker script) or against  
sys-devel/binutils?

Or is the above problem a sign for a wrongly setup cross-compile  
environment (I am just beginnig to toy around with cross-compiling)?

Kind regards,
servantes

-- 
Do _not_ remove the ".REMOVE.SPAM" in the address.
It's a catch for too smart address harvesters



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-embedded] cross-linker cannot find file redirected to from linker script
  2009-07-18 18:35 [gentoo-embedded] cross-linker cannot find file redirected to from linker script servantes.REMOVE.SPAM
@ 2009-07-19 18:11 ` Mike Frysinger
  2009-07-21 20:31   ` servantes.REMOVE.SPAM
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2009-07-19 18:11 UTC (permalink / raw
  To: gentoo-embedded

[-- Attachment #1: Type: text/plain, Size: 713 bytes --]

On Saturday 18 July 2009 14:35:35 servantes.REMOVE.SPAM@gsmpaaiml.com wrote:

please refrain from the "remove spam" crap when using Gentoo mailing lists

> i686-elvis-linux-gnu-gcc -O2 -pipe -Wl,-O1 -o passwd passwd.o
> ../libmisc/libmisc.a ../lib/.libs/libshadow.a -lpam -lpam_misc
> /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so -lz -Wl,-rpath
> -Wl,/usr/i686-elvis-linux-gnu/usr/lib -Wl,-rpath
> -Wl,/usr/i686-elvis-linux-gnu/usr/lib
>
> fails) with the following error:
>
> /usr/libexec/gcc/i686-elvis-linux-gnu/ld: skipping incompatible
> /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

http://bugs.gentoo.org/275666
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-embedded] cross-linker cannot find file redirected to from linker script
  2009-07-19 18:11 ` Mike Frysinger
@ 2009-07-21 20:31   ` servantes.REMOVE.SPAM
  0 siblings, 0 replies; 3+ messages in thread
From: servantes.REMOVE.SPAM @ 2009-07-21 20:31 UTC (permalink / raw
  To: gentoo-embedded

Hi Mike,

On Sun, 19 Jul 2009 20:11:40 +0200, Mike Frysinger <vapier@gentoo.org>  
wrote:

> On Saturday 18 July 2009 14:35:35 servantes.REMOVE.SPAM@gsmpaaiml.com  
> wrote:
>
>> i686-elvis-linux-gnu-gcc -O2 -pipe -Wl,-O1 -o passwd passwd.o
>> ../libmisc/libmisc.a ../lib/.libs/libshadow.a -lpam -lpam_misc
>> /usr/i686-elvis-linux-gnu/usr/lib/libcrack.so -lz -Wl,-rpath
>> -Wl,/usr/i686-elvis-linux-gnu/usr/lib -Wl,-rpath
>> -Wl,/usr/i686-elvis-linux-gnu/usr/lib
>>
>> fails) with the following error:
>>
>> /usr/libexec/gcc/i686-elvis-linux-gnu/ld: skipping incompatible
>> /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
>
> http://bugs.gentoo.org/275666

that worked. Thank you.

Kind regards,
servantes


-- 
Do _not_ remove the ".REMOVE.SPAM" in the address.
It's a catch for too smart address harvesters



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-21 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 18:35 [gentoo-embedded] cross-linker cannot find file redirected to from linker script servantes.REMOVE.SPAM
2009-07-19 18:11 ` Mike Frysinger
2009-07-21 20:31   ` servantes.REMOVE.SPAM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox