Skip to contentSkip to conversation

cpan_build.bbclass: adopt to recent EU::MM

PATCH In review Jens Rehsack 2 participants 4 messages May 28, 2018 – Jun 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cpan_build.bbclass: adopt to recent EU::MM

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
 meta/classes/cpan.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes/cpan.bbclass +1 -2
index 8e079e0d55..926c6358a6 100644
@@ -16,8 +16,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
 export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
 
 cpan_do_configure () {
-	export PERL5LIB="${PERL_ARCHLIB}"
-	yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor ${EXTRA_CPANFLAGS}
+	yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 ${EXTRA_CPANFLAGS}
 
 	# Makefile.PLs can exit with success without generating a
 	# Makefile, e.g. in cases of missing configure time

--
Jens Rehsack - [email protected]

#1 lore raw
Quoted 6 lines · Jens Rehsack

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Quoted 9 lines

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
 meta/classes/cpan.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

I put this in for testing but I see:

$ SDKMACHINE="i686" bitbake nativesdk-libxml-parser-perl
[...]
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: nativesdk-libxml-parser-perl: chrpath command failed with exit code 7:
b'/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/package/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib/perl/vendor_perl/5.24.1/auto/XML/Parser/Expat/Expat.so: RPATH=/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib\n'b"new rpath '$ORIGIN/../../../../../../../../../../../../../../media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib' too large; maximum length 176\n"
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/temp/log.do_package.23783
ERROR: Task (virtual:nativesdk:/media/build1/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb:do_package) failed with exit code '1'

which seems to reproduce fairly readily both locally and on the autobuilders. Reverting this patch resolves it.

Cheers,

Richard

#2 lore raw
Quoted 30 lines

Am 05.06.2018 um 10:43 schrieb Richard Purdie <[email protected]>:

Quoted 6 lines · Jens Rehsack

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Quoted 9 lines

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
meta/classes/cpan.bbclass | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)

I put this in for testing but I see:

$ SDKMACHINE="i686" bitbake nativesdk-libxml-parser-perl
[...]
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: nativesdk-libxml-parser-perl: chrpath command failed with exit code 7:
b'/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/package/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib/perl/vendor_perl/5.24.1/auto/XML/Parser/Expat/Expat.so: RPATH=/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib\n'b"new rpath '$ORIGIN/../../../../../../../../../../../../../../media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib' too large; maximum length 176\n"
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/temp/log.do_package.23783
ERROR: Task (virtual:nativesdk:/media/build1/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb:do_package) failed with exit code '1'
Quoted 2 lines

which seems to reproduce fairly readily both locally and on the autobuilders. Reverting this patch resolves it.

Without having tested that - this seems to come from

- export PERL5LIB="${PERL_ARCHLIB}"

which is, when do not causing above build failure, kind-of bug-using :)

Always prepending ${PERL_ARCHLIB} causes for cross-building the attempt of loading sdk-modules, which is evil.

I'll try to have a detailed look later today or tomorrow.

Cheers
--
Jens Rehsack - [email protected]

#3 lore raw
Quoted 41 lines

Am 05.06.2018 um 14:37 schrieb Jens Rehsack <[email protected]>:

Quoted 28 lines

Am 05.06.2018 um 10:43 schrieb Richard Purdie <[email protected]>:

Quoted 6 lines · Jens Rehsack

The modern the time, the improvements in ExtUtils::MakeMaker.

Nowadays, .packlist and perllocal.pod aren't touched anymore when appropriate flags set during configure stage. Controlling the flags globally avoids dual-life recipes need share patching.

Quoted 9 lines

Further: remove prepending ${PERL_ARCHLIB} in PERL5LIB - it's wrong (search order is site_lib, vendor_lib, core) - and ${PERL_ARCHLIB} contains core libpath only ...

---
meta/classes/cpan.bbclass | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)

I put this in for testing but I see:

$ SDKMACHINE="i686" bitbake nativesdk-libxml-parser-perl
[...]
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: nativesdk-libxml-parser-perl: chrpath command failed with exit code 7:
b'/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/package/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib/perl/vendor_perl/5.24.1/auto/XML/Parser/Expat/Expat.so: RPATH=/media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib\n'b"new rpath '$ORIGIN/../../../../../../../../../../../../../../media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib' too large; maximum length 176\n"
ERROR: nativesdk-libxml-parser-perl-2.44-r0 do_package: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/temp/log.do_package.23783
ERROR: Task (virtual:nativesdk:/media/build1/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb:do_package) failed with exit code '1'
Quoted 2 lines

which seems to reproduce fairly readily both locally and on the autobuilders. Reverting this patch resolves it.

Without having tested that - this seems to come from

meta/classes/cpan.bbclass +0 -1
-	export PERL5LIB="${PERL_ARCHLIB}"
Quoted 1 line

which is, when do not causing above build failure, kind-of bug-using :)

Indeed ...

I could debug the error message

Quoted 1 line

b"new rpath '$ORIGIN/../../../../../../../../../../../../../../media/build1/poky/build/tmp-222/work/i686-nativesdk-pokysdk-linux/nativesdk-libxml-parser-perl/2.44-r0/recipe-sysroot/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-linux/usr/lib' too large; maximum length 176\n"

down to perform_packagecopy(d)
-> rpath_replace (d.getVar('PKGD'), d)
-> process_dir (d.getVar('PKGD'), d.getVar('PKGD') + bindir, d)
-> process_file_linux(d.expand('${CHRPATH_BIN}'), '...usr/lib/perl/vendor_perl/5.24.1/auto/XML/Parser/Expat/Expat.so', d.getVar('PKGD'), d.getVar('PKGD') + bindir, os.path.normpath(d.getVar('TMPDIR', False)), d) # with d.getVar('PKGD') as rootdir and d.getVar('PKGD') + bindir as baseprefix -> new_rpaths.append("$ORIGIN/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/"))))

I think, that overflow of RPATH is now detected but could happen (depending on configuration even with a shortened PERL5LIB to PERL_ARCHLIB -- so it should be fixed by computing a better relpath for $ORIGIN instead of hiding the bug again.

Quoted 4 lines

Always prepending ${PERL_ARCHLIB} causes for cross-building the attempt of loading sdk-modules, which is evil.

I'll try to have a detailed look later today or tomorrow.

Sorry for being a bit late - hope it helps to figure out the root cause.

Cheers
--
Jens Rehsack - [email protected]