RPATH in many modules
Hi all,
today I wanted to make the generated toolchain free of RPATH and I was a bit surprised to see that even the target libraries contain the rpath and that it is not caught by insane.bbclass.
I have added a more strict check to insane.bbclass to uncover the issue and I am fighting neon and its manual libtool usage right now... it might be just easier to use chrpath to fix the resulting libraries.
any opinion?
From 18a9dbf4d6925a789e5ecf2852e094c0b1d851fe Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <[email protected]>
Date: Sat, 2 Oct 2010 17:14:33 +0800
Subject: [PATCH] insane.bbclass: Check for RPATH to the sysroot and complain
For non-native packages having an rpath to the sysroot is considered harmful and needs to be fixed. This uncovered issues in neon and other packages.
--- classes/insane.bbclass | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
classes/insane.bbclass +4 -1
@@ -168,10 +168,13 @@ def package_qa_check_rpath(file,name,d, elf): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") + sysroot = bb.data.getVar('STAGING_DIR_HOST', d, True) + native = bb.data.inherits_class('native', d) + output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file)) txt = output.readline().split() for line in txt: - if bad_dir in line: + if bad_dir in line or (not native and sysroot in line): error_msg = "package %s contains bad RPATH %s in file %s" % (name, line, file) sane = package_qa_handle_error(1, error_msg, name, file, d)
Signature · 1 line
1.7.3.1
Quoted 11 lines · Holger Freyther
Hi all,
today I wanted to make the generated toolchain free of RPATH and I was a bit surprised to see that even the target libraries contain the rpath and that it is not caught by insane.bbclass.
I have added a more strict check to insane.bbclass to uncover the issue and I am fighting neon and its manual libtool usage right now... it might be just easier to use chrpath to fix the resulting libraries.
any opinion?
I think we should try to get the rpaths right without chrpath. so your insane patch
seems ok. May be to avoid lot of packages failing this could be turned on as a warning
and once we fix the packages failing this then we could turn it into error.
Quoted 7 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 11 lines · Khem Raj
Quoted 10 lines · Holger Freyther
Hi all,
today I wanted to make the generated toolchain free of RPATH and I was a bit surprised to see that even the target libraries contain the rpath and that it is not caught by insane.bbclass.
I have added a more strict check to insane.bbclass to uncover the issue and I am fighting neon and its manual libtool usage right now... it might be just easier to use chrpath to fix the resulting libraries.
Quoted 7 lines
Quoted 1 line
any opinion?
I think we should try to get the rpaths right without chrpath. so your insane patch
seems ok. May be to avoid lot of packages failing this could be turned on as a warning
and once we fix the packages failing this then we could turn it into error.
Initial link time $ORIGIN being correct is a lot more complex than being wrong and fixing it up. I got it being correct for the non-autoconf case and then made autotools.bbclass also get it right initially and then patched gcc/gdb/binutils (which are the difficult ones that run configure again) but it's really much more work. I'll try and RFC the patches on Monday, if I've still got the branch around.
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 5 lines · Holger Freyther
Hi all,
today I wanted to make the generated toolchain free of RPATH and I was a bit surprised to see that even the target libraries contain the rpath and that it is not caught by insane.bbclass.
Could you fix the patch to say to which (wrong) sysroot it points to?
MACHINE=beagleboard bitbake libcdio
rpath -> sysroots/x86 or rpath -> sysroots/armv7a or both?
Quoted 3 lines
I have added a more strict check to insane.bbclass to uncover the issue and I am fighting neon and its manual libtool usage right now... it might be just easier to use chrpath to fix the resulting libraries.
When we last tried chrpath didn't work in cross mode :(
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMqC+/MkyGM64RGpERAqVpAKCS2VBvuPMWQ/nMdkjSDiJVcicGaACfeXqA gT+GXn22hC1/iTEoULjZa5w=
=6ut2
-----END PGP SIGNATURE-----
Quoted 5 lines · Koen Kooi
Could you fix the patch to say to which (wrong) sysroot it points to?
MACHINE=beagleboard bitbake libcdio
rpath -> sysroots/x86 or rpath -> sysroots/armv7a or both?
ERROR: QA Issue with libgettextlib: package libgettextlib contains bad RPATH /home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib
in file /home/ich/build/arm/xscale/tmp/work/armv5te-angstrom-linux-gnueabi/gettext-0.18-r3/packages-split/libgettextlib/usr/lib/libgettextlib-0.18.so
Can you propose a better wording? From the above I try to indicate that /home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib is the bad RPATH and that it is inside the libgettextlib-0.18.so
Quoted 1 line
When we last tried chrpath didn't work in cross mode :(
hmm... maybe it is something simple... :}
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Holger Freyther
Quoted 5 lines · Koen Kooi
Could you fix the patch to say to which (wrong) sysroot it points to?
MACHINE=beagleboard bitbake libcdio
rpath -> sysroots/x86 or rpath -> sysroots/armv7a or both?
Quoted 8 lines
ERROR: QA Issue with libgettextlib: package libgettextlib contains bad RPATH
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib
in file/home/ich/build/arm/xscale/tmp/work/armv5te-angstrom-linux-gnueabi/gettext-0.18-r3/packages-split/libgettextlib/usr/lib/libgettextlib-0.18.soCan you propose a better wording? From the above I try to indicate that
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/libis the bad RPATH and that it is inside the libgettextlib-0.18.so
"Target libs and apps contain a bad RPATH to the target sysroot e.g. /tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib" ?
Quoted 3 lines
Quoted 1 line
When we last tried chrpath didn't work in cross mode :(
hmm... maybe it is something simple... :}
I certainly hope so!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMqDK4MkyGM64RGpERAntvAJ4ra8cYKuiT/QrkcB/5Jb2EHzPkZwCgq1/8 q4Hur7dh657M+0YRlRxSnRo=
=CytO
-----END PGP SIGNATURE-----
Quoted 17 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 13 lines · Holger Freyther
Quoted 5 lines · Koen Kooi
Could you fix the patch to say to which (wrong) sysroot it points to?
MACHINE=beagleboard bitbake libcdio
rpath -> sysroots/x86 or rpath -> sysroots/armv7a or both?
ERROR: QA Issue with libgettextlib: package libgettextlib contains bad RPATH
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib
in file/home/ich/build/arm/xscale/tmp/work/armv5te-angstrom-linux-gnueabi/gettext-0.18-r3/packages-split/libgettextlib/usr/lib/libgettextlib-0.18.so
Quoted 6 lines
Quoted 3 lines
Can you propose a better wording? From the above I try to indicate that
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/libis the bad RPATH and that it is inside the libgettextlib-0.18.so"Target libs and apps contain a bad RPATH to the target sysroot e.g.
/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib" ?
I am working on libtool 2.4 upgrade which has sysroot support. I am hoping it will help us in fixing this kind
of problems.
Quoted 20 lines
Quoted 4 lines
Quoted 2 lines
When we last tried chrpath didn't work in cross mode :(
hmm... maybe it is something simple... :}
I certainly hope so!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)iD8DBQFMqDK4MkyGM64RGpERAntvAJ4ra8cYKuiT/QrkcB/5Jb2EHzPkZwCgq1/8 q4Hur7dh657M+0YRlRxSnRo=
=CytO
-----END PGP SIGNATURE-----_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 22 lines · Khem Raj
Quoted 21 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 16 lines · Holger Freyther
Quoted 5 lines · Koen Kooi
Could you fix the patch to say to which (wrong) sysroot it points to?
MACHINE=beagleboard bitbake libcdio
rpath -> sysroots/x86 or rpath -> sysroots/armv7a or both?
ERROR: QA Issue with libgettextlib: package libgettextlib contains bad RPATH
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib
in file/home/ich/build/arm/xscale/tmp/work/armv5te-angstrom-linux-gnueabi/gettext-0.18-r3/packages-split/libgettextlib/usr/lib/libgettextlib-0.18.soCan you propose a better wording? From the above I try to indicate that
/home/ich/build/arm/xscale/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/libis the bad RPATH and that it is inside the libgettextlib-0.18.so
Quoted 6 lines
Quoted 2 lines
"Target libs and apps contain a bad RPATH to the target sysroot e.g.
/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib" ?I am working on libtool 2.4 upgrade which has sysroot support. I am hoping it will help us in fixing this kind
of problems.
Whoa, libtool with sysroot support! Sweet. I'm very interested in -sdk version of it... :)
Signature · 1 line
Denys