From: Paulius Zaleckas <paulius.zaleckas@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] RFC: Libtool and wrong rpath
Date: Mon, 17 May 2010 23:43:23 +0300 [thread overview]
Message-ID: <4BF1AA6B.50109@gmail.com> (raw)
Hi,
I have noticed with strace that strange path is being probed by dynamic linker
on the target. This makes applications to start slower, since each library is
probed with wrong path first!
Problem is that ELF dynamic section (readelf -d) has RPATH set to absolute path
of the satging dir on the host:
0x0000000f (RPATH) Library rpath:
[/home/paulius/buildroot/output/build/staging_dir/usr/i386-unknown-linux-uclibc/lib]
I have put some simple script to discover ELF files with this WRONG path:
#!/bin/sh
for file in `find $@ -type f -executable`; do
if [ -n "`file $file | grep ELF`" ]; then
if [ -n "`readelf -d $file | grep staging`" ]; then
echo $file
fi
fi
done
On my target directory it found 119 occurrences. Mostly X11 and GTK related.
The source of this problem seems to be buggy libtool script...
I failed to fix/identify libtool lines responsible for this, but I think we can
use chrpath utility to remove wrong RPATH from these executables.
If we use chrpath, then should we add package or require it from host?
I guess we will have to run it after all packages are installed?
next reply other threads:[~2010-05-17 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 20:43 Paulius Zaleckas [this message]
2010-05-18 10:08 ` [Buildroot] RFC: Libtool and wrong rpath Lionel Landwerlin
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=4BF1AA6B.50109@gmail.com \
--to=paulius.zaleckas@gmail.com \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.