Patchwork perl: strip RPATH from libxml-parser-perl Expat.so

login
register
mail settings
Submitter Paul Gortmaker
Date June 18, 2014, 10:48 p.m.
Message ID <1403131683-28758-1-git-send-email-paul.gortmaker@windriver.com>
Download mbox | patch
Permalink /patch/74035/
State New
Headers show

Comments

Paul Gortmaker - June 18, 2014, 10:48 p.m.
To fix:

ERROR: QA Issue: package libxml-parser-perl contains bad RPATH /home/paul/poky/build/tmp/sysroots/intel-corei7-64/usr/lib64 in file /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/packages-split/libxml-parser-perl/usr/lib64/perl/vendor_perl/5.14.3/auto/XML/Parser/Expat/Expat.so
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/temp/log.do_package.28544
ERROR: Task 4102 (/home/paul/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb, do_package) failed with exit code '1'

...which showed up when enabling a multilib build.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Koen Kooi - June 19, 2014, 1:26 p.m.
Op 19 jun. 2014, om 00:48 heeft Paul Gortmaker <paul.gortmaker@windriver.com> het volgende geschreven:

> To fix:
> 
> ERROR: QA Issue: package libxml-parser-perl contains bad RPATH /home/paul/poky/build/tmp/sysroots/intel-corei7-64/usr/lib64 in file /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/packages-split/libxml-parser-perl/usr/lib64/perl/vendor_perl/5.14.3/auto/XML/Parser/Expat/Expat.so
> ERROR: QA run found fatal errors. Please consider fixing them.
> ERROR: Function failed: do_package_qa
> ERROR: Logfile of failure stored in: /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/temp/log.do_package.28544
> ERROR: Task 4102 (/home/paul/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb, do_package) failed with exit code '1'
> 
> ...which showed up when enabling a multilib build.
> 
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> index 43a8a84518d3..2488aacb682c 100644
> --- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> +++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> @@ -27,6 +27,7 @@ do_configure_append() {
> do_compile() {
> 	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
> 	cpan_do_compile
> +	chrpath -d ${S}/blib/arch/auto/XML/Parser/Expat/Expat.so

That only works for x86 builds.
João Henrique Freitas - July 16, 2014, 3 a.m.
Hi Paul,


I got this error.

On daisy branch, I was using a MACHINE=genericx86 then I changed to 
MACHINE=crownbay and build my image. libxml-parser-perl shows the same 
problem.

So I did 'bitbake perl -c cleansstate' and 'bitbake libxml-parser-perl'. 
No problems anymore, until I change back to genericx86.

But this is odd and I am trying to figure out what is the problem.


Em 18-06-2014 19:48, Paul Gortmaker escreveu:
> To fix:
>
> ERROR: QA Issue: package libxml-parser-perl contains bad RPATH /home/paul/poky/build/tmp/sysroots/intel-corei7-64/usr/lib64 in file /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/packages-split/libxml-parser-perl/usr/lib64/perl/vendor_perl/5.14.3/auto/XML/Parser/Expat/Expat.so
> ERROR: QA run found fatal errors. Please consider fixing them.
> ERROR: Function failed: do_package_qa
> ERROR: Logfile of failure stored in: /home/paul/poky/build/tmp/work/corei7-64-poky-linux/libxml-parser-perl/2.41-r3/temp/log.do_package.28544
> ERROR: Task 4102 (/home/paul/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb, do_package) failed with exit code '1'
>
> ...which showed up when enabling a multilib build.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>
> diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> index 43a8a84518d3..2488aacb682c 100644
> --- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> +++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
> @@ -27,6 +27,7 @@ do_configure_append() {
>   do_compile() {
>   	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
>   	cpan_do_compile
> +	chrpath -d ${S}/blib/arch/auto/XML/Parser/Expat/Expat.so
>   }
>   
>   do_compile_class-native() {
Richard Purdie - July 16, 2014, 8:33 a.m.
On Wed, 2014-07-16 at 00:00 -0300, João Henrique Ferreira de Freitas
wrote:
> Hi Paul,
> 
> 
> I got this error.
> 
> On daisy branch, I was using a MACHINE=genericx86 then I changed to 
> MACHINE=crownbay and build my image. libxml-parser-perl shows the same 
> problem.
> 
> So I did 'bitbake perl -c cleansstate' and 'bitbake libxml-parser-perl'. 
> No problems anymore, until I change back to genericx86.
> 
> But this is odd and I am trying to figure out what is the problem.

I've seen this happen before with a half built perl recipe where you've
switched machines half way through a build of perl. Stripping out the
RPATH is not the right fix though.

Cheers,

Richard
João Henrique Freitas - July 17, 2014, 1:12 a.m.
Em 16-07-2014 05:33, Richard Purdie escreveu:
> On Wed, 2014-07-16 at 00:00 -0300, João Henrique Ferreira de Freitas
> wrote:
> I've seen this happen before with a half built perl recipe where you've
> switched machines half way through a build of perl. Stripping out the
> RPATH is not the right fix though.
>
> Cheers,
>
> Richard
>
>

I agree. And what is the right way to fix it?

Is an issue from perl recipes ? I want to get an start point.

Thanks.
Richard Purdie - July 17, 2014, 12:51 p.m.
On Wed, 2014-07-16 at 22:12 -0300, João Henrique Ferreira de Freitas
wrote:
> Em 16-07-2014 05:33, Richard Purdie escreveu:
> > On Wed, 2014-07-16 at 00:00 -0300, João Henrique Ferreira de Freitas
> > wrote:
> > I've seen this happen before with a half built perl recipe where you've
> > switched machines half way through a build of perl. Stripping out the
> > RPATH is not the right fix though.
> >
> > Cheers,
> >
> > Richard
> >
> >
> 
> I agree. And what is the right way to fix it?
> 
> Is an issue from perl recipes ? I want to get an start point.

First we need to understand the problem exactly. Do you have a
reproducer that always works?

I'm not sure how to fix it at this point, we need to work on
understanding it first.

Cheers,

Richard
João Henrique Freitas - July 25, 2014, 1:33 a.m.
Hi,

On 17-07-2014 09:51, Richard Purdie wrote:
> First we need to understand the problem exactly. Do you have a
> reproducer that always works?

This happens on daisy. And my test case was:

1) add meta-intel and meta-crownbay layers
2) build MACHINE=qemux86 bitbake libxml-parser-perl
3) build MACHINE=genericx86 bitbake libxml-parser-perl
4) build MACHINE=crownbay-noemgd bitbake libxml-parser-perl

The step 4 wont complete because rpath issues.

To get it work:

  MACHINE=crownbay-noemgd bitbake libxml-parser-perl perl -c cleanssate

Then

  MACHINE=crownbay-noemgd bitbake libxml-parser-perl

Until now master is not affected.

I am working to fix the libxml-parser-perl 
(http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=joaohf/daisy-libxml-parser-perl-rpath). 
But I am not sure if it solves the root problem. Because OE should build 
using three differents MACHINEs using the same workdir, sstate-cache.


Thanks.

Patch

diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
index 43a8a84518d3..2488aacb682c 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
@@ -27,6 +27,7 @@  do_configure_append() {
 do_compile() {
 	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
 	cpan_do_compile
+	chrpath -d ${S}/blib/arch/auto/XML/Parser/Expat/Expat.so
 }
 
 do_compile_class-native() {