From: servantes.REMOVE.SPAM@gsmpaaiml.com
To: gentoo-embedded@lists.gentoo.org
Subject: [gentoo-embedded] cross-linker cannot find file redirected to from linker script
Date: Sat, 18 Jul 2009 20:35:35 +0200 [thread overview]
Message-ID: <op.uw90lmt52izcce@spencer.aistleitner.info> (raw)
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
next reply other threads:[~2009-07-18 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-18 18:35 servantes.REMOVE.SPAM [this message]
2009-07-19 18:11 ` [gentoo-embedded] cross-linker cannot find file redirected to from linker script Mike Frysinger
2009-07-21 20:31 ` servantes.REMOVE.SPAM
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.uw90lmt52izcce@spencer.aistleitner.info \
--to=servantes.remove.spam@gsmpaaiml.com \
--cc=gentoo-embedded@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox