* invalid removal of rpath from native binaries during installation or staging
@ 2010-07-01 22:05 Stanislav Brabec
2010-07-01 22:41 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Stanislav Brabec @ 2010-07-01 22:05 UTC (permalink / raw)
To: openembedded-devel
Hallo.
Packages like perl-native and gettext-native compile correctly, but then
stage broken binaries, that miss rpath from binaries. Such binaries work
only if the library of the same name exists in the host system, which is
not correct.
Example:
ERROR: log data follows (/OE/build/tmp/work/x86_64-linux/libxml-parser-perl-native-2.36-r2/temp/log.do_configure.27765)
| perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
Now try:
ben:/OE/build> /OE/build/tmp/sysroots/x86_64-linux/usr/bin/perl
/OE/build/tmp/sysroots/x86_64-linux/usr/bin/perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
ben:/OE/build> /OE/build/tmp/work/x86_64-linux/perl-native-5.8.8-r19/perl-5.8.8/perl
(this instance works)
Work around: simply copy binaries from work directly to sysroots and compilation continues correctly.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: invalid removal of rpath from native binaries during installation or staging
2010-07-01 22:05 invalid removal of rpath from native binaries during installation or staging Stanislav Brabec
@ 2010-07-01 22:41 ` Tom Rini
2010-07-01 23:19 ` Stanislav Brabec
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2010-07-01 22:41 UTC (permalink / raw)
To: openembedded-devel
Stanislav Brabec wrote:
> Hallo.
>
> Packages like perl-native and gettext-native compile correctly, but then
> stage broken binaries, that miss rpath from binaries. Such binaries work
> only if the library of the same name exists in the host system, which is
> not correct.
>
> Example:
> ERROR: log data follows (/OE/build/tmp/work/x86_64-linux/libxml-parser-perl-native-2.36-r2/temp/log.do_configure.27765)
> | perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
>
> Now try:
> ben:/OE/build> /OE/build/tmp/sysroots/x86_64-linux/usr/bin/perl
> /OE/build/tmp/sysroots/x86_64-linux/usr/bin/perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
> ben:/OE/build> /OE/build/tmp/work/x86_64-linux/perl-native-5.8.8-r19/perl-5.8.8/perl
> (this instance works)
>
> Work around: simply copy binaries from work directly to sysroots and compilation continues correctly.
Can you use readelf -d on your perl? The whole point of the relative
path calculation that relocatable.bbclass does is to fix the hard cases
like perl. Thanks!
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: invalid removal of rpath from native binaries during installation or staging
2010-07-01 22:41 ` Tom Rini
@ 2010-07-01 23:19 ` Stanislav Brabec
2010-07-02 12:52 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Stanislav Brabec @ 2010-07-01 23:19 UTC (permalink / raw)
To: openembedded-devel
Tom Rini wrote:
> Can you use readelf -d on your perl? The whole point of the relative
> path calculation that relocatable.bbclass does is to fix the hard cases
> like perl. Thanks!
>
I found the problem:
The runtime expansion of $ORIGIN works only if /proc is mounted!
My build environment is a minimal openSUSE 11.2 x86_64 subset inside
chroot with no /proc, /sys, and /dev with null zero and few other static
items.
Not having /proc is an advantage in most cases (cross configure cannot
check host system), but breaks in this case.
Maybe it would be nice to allow to configure to not inherit relocatable
in native.bbclass for people who don't want to mount /proc.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: invalid removal of rpath from native binaries during installation or staging
2010-07-01 23:19 ` Stanislav Brabec
@ 2010-07-02 12:52 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2010-07-02 12:52 UTC (permalink / raw)
To: openembedded-devel
On Fri, 2010-07-02 at 01:19 +0200, Stanislav Brabec wrote:
> Tom Rini wrote:
>
> > Can you use readelf -d on your perl? The whole point of the relative
> > path calculation that relocatable.bbclass does is to fix the hard cases
> > like perl. Thanks!
> >
>
> I found the problem:
>
> The runtime expansion of $ORIGIN works only if /proc is mounted!
>
> My build environment is a minimal openSUSE 11.2 x86_64 subset inside
> chroot with no /proc, /sys, and /dev with null zero and few other static
> items.
>
> Not having /proc is an advantage in most cases (cross configure cannot
> check host system), but breaks in this case.
>
> Maybe it would be nice to allow to configure to not inherit relocatable
> in native.bbclass for people who don't want to mount /proc.
As we try to improve staging, we're going to be working on the
assumption all packages are relocatable. If we allow disabling of this
it will break various assumptions in the code. I'd therefore suggest
you're free to do this locally but it shouldn't be an easily available
option. Building without /proc mounted is a rather specialist usecase.
If it really worries you, mount /proc somewhere else and symlink the
bare minimum needed.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-02 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 22:05 invalid removal of rpath from native binaries during installation or staging Stanislav Brabec
2010-07-01 22:41 ` Tom Rini
2010-07-01 23:19 ` Stanislav Brabec
2010-07-02 12:52 ` Richard Purdie
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.