arsv / perl-cross

configure and cross-compile perl
Other
81 stars 29 forks source link

build failure of perl 5.26.1 on Buildroot #55

Closed fperrad closed 7 years ago

fperrad commented 7 years ago

With perl-5.26.1 and perl-cross-1.1.7, there are build failures on Buildroot, see http://autobuild.buildroot.org/?reason=perl-5.26.1 It seems related to uclibc + STATIC_LIBS config. The module Compress-Raw-Bzip2 cannot built:

cd cpan/Compress-Raw-Bzip2/ && ../../miniperl_top -I../../lib Makefile.PL \
     INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none \
     PERL_CORE=1 LIBPERL_A=libperl.a PERL_CORE=1 PERL="../../miniperl_top"
Can't locate lib.pm in @INC (you may need to install the lib module) (@INC contains: /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cnf/stub /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cnf/cpan /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/AutoLoader/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/Exporter/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/Cwd /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/Cwd/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/ExtUtils-Command/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/ExtUtils-Install/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/ExtUtils-MakeMaker/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/ExtUtils-MakeMaker/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/ExtUtils-Manifest/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/File-Path/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/ext/File-Find/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/ext/re /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/ExtUtils-Constant/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/ExtUtils-ParseXS/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/constant/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/Getopt-Long/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/Text-Tabs/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/Carp/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/podlators/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/parent/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/cpan/version/lib /home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/dist/Pod-Simple/lib ../../lib /home/buildroot/autobuild/run/instance-0/output/host/lib/perl .) at Makefile.PL line 6.
BEGIN failed--compilation aborted at Makefile.PL line 6.
make[2]: *** [cpan/Compress-Raw-Bzip2/Makefile] Error 2
make[1]: *** [/home/buildroot/autobuild/run/instance-0/output/build/perl-5.26.1/.stamp_built] Error 2
make: *** [_all] Error 2
make: Leaving directory `/home/buildroot/autobuild/run/instance-0/buildroot'
arsv commented 7 years ago

Preliminary fix:

https://github.com/arsv/perl-cross/commit/16c18edb431794e7af8afd2c3d74191ca0d20251

It's a nasty inter-module dependency that normally gets masked by DynaLoader, which forces lib.pm to be built before all other modules. DynaLoader is not enabled in static configs, and the build fails at the first module that needs lib.pm.

I'm going to do some builds and most likely tag a new version with this fix.