Description
solar (RETIRED)
![]() After quite some time and frustration, I have finally been able to cross-compile perl on amd64 for armv4l. These ebuilds should work for most embedded platforms and possibly more. Please help test it. Created attachment 218243 [details]
sys-devel/libperl/libperl-5.8.8-r3.ebuild
Created attachment 218245 [details]
dev-lang/perl/perl-5.8.8-r9.ebuild
Created attachment 218247 [details, diff]
/files/native-perlinc.patch (for libperl and perl)
Created attachment 218249 [details, diff]
/files/perl-dynloader.patch (for perl and libperl)
Created attachment 218251 [details, diff]
/files/perl-configpm-switch.patch for (perl and libperl)
Created attachment 218253 [details, diff]
/files/Makefile.SH.patch (for perl and libperl)
Created attachment 218255 [details, diff]
/files/perl-moreconfig.patch (for perl and libperl)
Created attachment 218257 [details, diff]
/files/letgcc-find-errno.patch (for perl and libperl)
Created attachment 218259 [details, diff]
/files/config-bits (for perl and libperl)
Created attachment 218261 [details]
/files/config-bits (for perl and libperl)
Created attachment 218263 [details, diff]
Diff for libperl-5.8.8-r2 to libperl-5.8.8-r3
Created attachment 218265 [details, diff]
Diff for perl-5.8.8-r8 to perl-5.8.8-r9
Created attachment 218267 [details, diff]
Patch for perl-module.eclass to cross-compile perl modules with latest perl and libperl
thanks, perl now cross-compiles for me, which is great itself but during cross compilation I saw: Looking for nanosleep()... testing... ./tmp20523: ./tmp20523: cannot execute binary file *** The test run of './tmp20523' failed: status 32256 *** (the status means: errno = 126 or 'Required key not available') *** DO NOT PANIC: this just means that *some* functionality will be missing. NOT found. You cannot mix subsecond sleeps with signals. (It would not be portable anyway.) Looking for clock_gettime()... ./tmp20523: ./tmp20523: cannot execute binary file *** The test run of './tmp20523' failed: status 32256 *** (the status means: errno = 126 or 'Required key not available') *** DO NOT PANIC: this just means that *some* functionality will be missing. NOT found. Looking for clock_getres()... ./tmp20523: ./tmp20523: cannot execute binary file *** The test run of './tmp20523' failed: status 32256 *** (the status means: errno = 126 or 'Required key not available') *** DO NOT PANIC: this just means that *some* functionality will be missing. NOT found. Looking for clock_nanosleep()... NOT found. Looking for clock()... ./tmp20523: ./tmp20523: cannot execute binary file *** The test run of './tmp20523' failed: status 32256 *** (the status means: errno = 126 or 'Required key not available') *** DO NOT PANIC: this just means that *some* functionality will be missing. also, patches and ebuilds added to openmoko overlay (In reply to comment #15) > thanks, perl now cross-compiles for me, which is great itself but during cross > compilation I saw: > > > Looking for nanosleep()... testing... ./tmp20523: ./tmp20523: cannot execute > binary file > > *** The test run of './tmp20523' failed: status 32256 > *** (the status means: errno = 126 or 'Required key not available') > *** DO NOT PANIC: this just means that *some* functionality will be missing. > NOT found. > You cannot mix subsecond sleeps with signals. > (It would not be portable anyway.) > Looking for clock_gettime()... ./tmp20523: ./tmp20523: cannot execute binary > file > > *** The test run of './tmp20523' failed: status 32256 > *** (the status means: errno = 126 or 'Required key not available') > *** DO NOT PANIC: this just means that *some* functionality will be missing. > NOT found. > Looking for clock_getres()... ./tmp20523: ./tmp20523: cannot execute binary > file > > *** The test run of './tmp20523' failed: status 32256 > *** (the status means: errno = 126 or 'Required key not available') > *** DO NOT PANIC: this just means that *some* functionality will be missing. > NOT found. > Looking for clock_nanosleep()... NOT found. > Looking for clock()... ./tmp20523: ./tmp20523: cannot execute binary file > > *** The test run of './tmp20523' failed: status 32256 > *** (the status means: errno = 126 or 'Required key not available') > *** DO NOT PANIC: this just means that *some* functionality will be missing. > Apparently, the configure script doesn't declare the associated vars by default and passes the job to ext/Time/HiRes/Makefile.PL which (if not pre-defined in config.sh) goes through a series of "compile and run" tests. However, clock, clock_getres, clock_gettime, clock_nanosleep, and nanosleep are all POSIX.1-2001 compliant functions defined in <time.h> in glibc and, to my knowledge, uclibc. It should be safe to declare these in config.sh. Already tested on armv4tl-softfloat-linux-gnueabi. Will upload patch. Created attachment 218941 [details, diff]
new /files/config-bits (for perl and libperl)
Defines clock, clock_getres, clock_gettime, clock_nanosleep, and nanosleep to avoid unnecessary and faulty checks.
Created attachment 218947 [details, diff]
Diff between old and new config-bits
Created attachment 218949 [details]
dev-lang/perl/perl-5.8.8-r10.ebuild
Restricts the test phase if cross-compiling. Can't use the native perl to test cross-compiled libs.
Created attachment 218953 [details, diff]
Diff for perl-5.8.8-r9 to perl-5.8.8-r10
(In reply to comment #18) > Created an attachment (id=218941) [details] > new /files/config-bits (for perl and libperl) > > Defines clock, clock_getres, clock_gettime, clock_nanosleep, and nanosleep to > avoid unnecessary and faulty checks. > Thanks for update. I confirm that this perl and libperl ebuilds cross compiles (for armv4tl) and compiles natively (x86) for me. May be somebody from gentoo team should respond his opinion. (In reply to comment #22) .. > May be somebody from gentoo team should respond his opinion. I think it's great that we are starting to see activity on this bug. Note that perl patches have existed in the past that could cross build perl. But just like in this case it's a metric sh*t ton of patches. More then our very small perl team was able to handle from release to release back then. My concern there is that we might have to fork via a virtual our own perl @ gentoo if these or a refined set of patches are not accepted for longer term inclusion. Upstream would rule. But that is another uphill battle. So my opinion is that we get more testing Q/A feedback reported on this bug. Things like giving USE=perl a go while cross-compiling. Getting the prefix guys to give it a try etc.. When we are all happy let's add perl@ to the CC: for review. These ebuilds worked for me. CHOST=powerpc-unknown-linux-gnu CBUILD=x86_64-pc-linux-gnu Created attachment 229501 [details, diff]
New patch for perl-module.eclass
There was a problem with the perl-module.eclass when cross-compiling. My mips cross platform didn't use perl threading but the main gentoo perl did. When an ebuild inherited both autotools and perl-module, and called on eutoreconf, aclocal wouldn't work and would fail on a line pertaining to a check for perl threading. This is because the native autotools perl scripts were using the cross-compiled perl modules. The solution would be to set PERL_LIB, PERL_ARCHLIB, and PERL_INC from within an eclass function (in the latest perl-module.eclass, perl_set_version) instead of globally. This way, the native autotools would use native perl modules. If there is a need to set cross-perl functionality earlier than src_configure, simply call on perl_set_version or perlinfo. This patch is for perl-module.eclass,v 1.124.
well this patchbomb seems to have helped me xcompile for i686-gentoo-linux-uclibc, thank you very much sir. mv -f miniperl miniperl-target ln -s /usr/bin/perl5.8.8 miniperl ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm make: ./miniperl: Command not found make: *** [lib/Config.pod] Error 127 emake failed Failed to build for mipsel-unknown-linux-uclibc. Is there a solution to this? I get the following when I try to build perl-5.12.4-r1: /bin/sh: ./try: cannot execute binary file (In reply to comment #28) > Is there a solution to this? I get the following when I try to build > perl-5.12.4-r1: > /bin/sh: ./try: cannot execute binary file I've just hit this problem but please attach a full build.log It might be possible to use the Cross/ directory instructions to cross-compile or maybe this one http://perlcross.berlios.de/ that buildroot project uses as well. Maybe not full log, but I attached the most interesting part. Problem is easy, probably upstream should change their way of checking proper compiler flags. Other way to fix it is to check whether cross toolchain is used and then set 'n' as default when it is asking whether to abort configure or not (for now default is 'y'). The lines for this look like that in Configure (lines 5315-5317): echo "The program compiled OK, but exited with status $?." >>try.msg rp="You have a problem. Shall I abort Configure" dflt=y With sed one can change to dflt=n The output log is below. Rafal --- LOG STARTS HERE --- Checking your choice of C compiler and flags for coherency... I've tried to compile and run the following simple program: #include <stdio.h> int main() { printf("Ok\n"); return(0); } I used the command: armv6zk-hardfloat-linux-gnueabi-gcc -o try -O2 -pipe -march=armv6zk -mfpu=vfp -mfloat-abi=hard -DOVR_DBL_DIG=14 -Wl,-O1 -Wl,--as-needed try.c -lnsl -ldb -ldl -lm -lcrypt -lutil -lc ./try and I got the following output: /bin/sh: ./try: cannot execute binary file The program compiled OK, but exited with status 126. You have a problem. Shall I abort Configure [y] Ok. Stopping Configure. * ERROR: dev-lang/perl-5.16.3 failed (configure phase): * Unable to configure * * Call stack: * ebuild.sh, line 93: Called src_configure * environment, line 2752: Called eblit-run 'src_configure' 'v50160001' * environment, line 813: Called eblit-perl-src_configure * src_configure-v50160001.eblit, line 144: Called die * The specific snippet of code: * sh Configure \ * -des \ * -Duseshrplib \ * -Darchname="${myarch}" \ * -Dcc="$(tc-getCC)" \ * -Doptimize="${CFLAGS}" \ * -Dldflags="${LDFLAGS}" \ * -Dprefix="${EPREFIX}"'/usr' \ * -Dinstallprefix="${EPREFIX}"'/usr' \ * -Dsiteprefix="${EPREFIX}"'/usr/local' \ * -Dvendorprefix="${EPREFIX}"'/usr' \ * -Dscriptdir="${EPREFIX}"'/usr/bin' \ * -Dprivlib="${EPREFIX}${PRIV_LIB}" \ * -Darchlib="${EPREFIX}${ARCH_LIB}" \ * -Dsitelib="${EPREFIX}${SITE_LIB}" \ * -Dsitearch="${EPREFIX}${SITE_ARCH}" \ * -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \ * -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \ * -Dman1dir="${EPREFIX}"/usr/share/man/man1 \ * -Dman3dir="${EPREFIX}"/usr/share/man/man3 \ * -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \ * -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \ * -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \ * -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \ * -Dman1ext='1' \ * -Dman3ext='3pm' \ * -Dlibperl="${LIBPERL}" \ * -Dlocincpth="${EPREFIX}"'/usr/include ' \ * -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \ * -Duselargefiles \ * -Dd_semctl_semun \ * -Dcf_by='Gentoo' \ * -Dmyhostname='localhost' \ * -Dperladmin='root@localhost' \ * -Dinstallusrbinperl='n' \ * -Ud_csh \ * -Uusenm \ * "${myconf[@]}" || die "Unable to configure" * * If you need support, post the output of `emerge --info '=dev-lang/perl-5.16.3'`, * the complete build log and the output of `emerge -pqv '=dev-lang/perl-5.16.3'`. * The complete build log is located at '/var/tmp/portage/dev-lang/perl-5.16.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/perl-5.16.3/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/perl-5.16.3/work/perl-5.16.3' * S: '/var/tmp/portage/dev-lang/perl-5.16.3/work/perl-5.16.3' (In reply to comment #30) i half started my own port to make perl cross-compile, but i gave up long ago as i never was that interested -- it's not critical to bootstrapping a new port. things like openssl are which is why i made that pos work. (In reply to comment #31) your naïveness is so adorable Created attachment 347478 [details, diff] perl-5.16.3 cross-compile support this uses the code from http://perlcross.berlios.de/download.html. it's a little flaky (seems like it has parallel build issues). and you have to run `make` twice due to some issue with libperl.so symlink. needs more investigation. (In reply to comment #33) > Created attachment 347478 [details, diff] [details, diff] > perl-5.16.3 cross-compile support > > this uses the code from http://perlcross.berlios.de/download.html. it's a > little flaky (seems like it has parallel build issues). and you have to run > `make` twice due to some issue with libperl.so symlink. > > needs more investigation. thanks. I started working on perlcross as well but I haven't gone that far. I will try a cross-build on mips64. Created attachment 351666 [details]
build.log
Unfortunately it does not build to me as it is. I need to investigate further.
(In reply to Markos Chandras from comment #35) > Created attachment 351666 [details] > build.log > > Unfortunately it does not build to me as it is. I need to investigate > further. do you have gdbm installed in sys-root? *** Bug 383241 has been marked as a duplicate of this bug. *** *** Bug 506818 has been marked as a duplicate of this bug. *** For the record, I did get this working with a few changes and a little help from my cross-boss project. More info soon. Anything new regarding this bug? (In reply to salamanderrake from comment #40) > Anything new regarding this bug? As it happens, I used cross-boss to build perl-5.18.2-r1 just today. The necessary changes can be seen at the following URL but the evil crap that cross-boss does to not tie these fixes to a specific version may confuse you. https://github.com/chewi/cross-boss/blob/master/overlay/dev-lang/perl/ebuild.sh Basically, it calls ./configure with all the same options as Configure except for -des, plus these extra ones. --target=${CHOST} -Dinstallprefix='' -Dinstallusrbinperl='undef' -Dusevendorprefix='define' It needs a little help finding gdbm so this was added to src_prepare. if use gdbm; then sed -i 's:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g' ext/NDBM_File/Makefile.PL || die fi Finally, src_compile looks like this. export BZIP2_INCLUDE=${EROOT}usr/include export BZIP2_LIB=${EROOT}usr/$(get_libdir) export ZLIB_INCLUDE=${EROOT}usr/include export ZLIB_LIB=${EROOT}usr/$(get_libdir) emake -j1 That might be all you need but I'm not sure how much of the extra magic provided by cross-boss is also helping to make it work. It might be none. I'm currently becoming a dev with a long term goal of requiring fewer hacks in cross-boss. Actually these two configure options were already in the old ebuild but I had to pass different values. -Dinstallprefix='' -Dinstallusrbinperl='undef' (In reply to James Le Cuirot from comment #41) > (In reply to salamanderrake from comment #40) > > Anything new regarding this bug? > > As it happens, I used cross-boss to build perl-5.18.2-r1 just today. The > necessary changes can be seen at the following URL but the evil crap that > cross-boss does to not tie these fixes to a specific version may confuse you. > > https://github.com/chewi/cross-boss/blob/master/overlay/dev-lang/perl/ebuild. > sh Just looked at cross-boss, very impressive! Need to spend some more time with it though. I noticed you too have found proot, very handy tool! I use it to solve the --sysroot problem(passing --sysroot in CFLAGS etc.): proot -b ${ROOT}:/usr/${CHOST}/ emerge --root-deps=rdeps .... That way all accesses to /usr/${CHOST}/ is remapped to ${ROOT} so there is no need to pass --sysroot Similarly you can use proot to map /etc to ${ROOT}/etc in enewgroup and friends: proot -0 --bind=${ROOT}/etc:/etc /usr/sbin/groupadd -r ${opts} "${egroup}" || die see bug https://bugs.gentoo.org/show_bug.cgi?id=517712 (In reply to Joakim Tjernlund from comment #43) > I noticed you too have found proot, very handy tool! I use it to solve the > --sysroot problem(passing --sysroot in CFLAGS etc.): > proot -b ${ROOT}:/usr/${CHOST}/ emerge --root-deps=rdeps .... > That way all accesses to /usr/${CHOST}/ is remapped to ${ROOT} so > there is no need to pass --sysroot The problem with that is that it hides your cross toolchain so you can't use it to start from scratch, which is what I really wanted to do. My initial approach was to use mount --bind but I gave up on that for this reason. > Similarly you can use proot to map /etc to ${ROOT}/etc in enewgroup and > friends: > proot -0 --bind=${ROOT}/etc:/etc /usr/sbin/groupadd -r ${opts} "${egroup}" > || die > > see bug https://bugs.gentoo.org/show_bug.cgi?id=517712 Unless you map /etc/passwd and /etc/shadow (proot can map individual files) during the whole emerge process then you will get problems when / and ROOT inevitably go out of sync. I'd like a smarter solution. Thanks for the feedback though. I don't want to noise up this bug any further so if you wish to discuss cross-boss, please contact me by e-mail or IRC. I'm now going to try and build Perl without cross-boss and I'll post up the resulting ebuild patch. Created attachment 383286 [details, diff]
Working perl-5.18.2-r1 cross patch
It works without cross-boss! Tested against armv7a-hardfloat-linux-gnueabi. Also tested a native build. Here's the patch. I've noticed that src_prepare-v50180002.eblit is present but not actually used.
One more thing, I'd forgotten that I'd previously taken additional patches from https://github.com/moben/perlcross. Unfortunately I still can't remember the details. It builds okay without them but maybe they were needed to prevent odd behaviour afterwards. On closer inspection, these patches were already merged upstream so no worries there. I had submitted a couple more to fix the soname. We already patch Perl to fix this but it isn't effective for perl-cross. https://github.com/arsv/perl-cross/pull/6 *** Bug 559574 has been marked as a duplicate of this bug. *** Hi!, Is there a patch for perl 5.24.0-r1 ? (In reply to Xavier Miller from comment #49) > Hi!, > > Is there a patch for perl 5.24.0-r1 ? If you mean my ebuild patch then no but it probably hasn't changed much. Feel free to have a crack at it. Upstream perlcross supports 5.24.0. I adapted attachment 383286 [details, diff] for perl 5.24.0-r1
(CROSS_VER=1.0.3)
But I have the following error message during the configure phase:
Any additional ld flags (NOT including libraries)? [-Wl,-O1 -Wl,--as-needed]
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:
#include <stdio.h>
int main() { printf("Ok\n"); return(0); }
I used the command:
armv6j-hardfloat-linux-gnueabi-gcc -o try -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer -DOVR_DBL_DIG=14 -Wl,-O1 -Wl,--as-needed try.c -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
./try
and I got the following output:
/bin/sh: ./try: cannot execute binary file: Exec format error
The program compiled OK, but exited with status 126.
You have a problem. Shall I abort Configure [y]
Ok. Stopping Configure.
You didn't update the CROSS_VER variable. It should be 1.1.0 now. See this page. http://arsv.github.io/perl-cross/download.html If I also patch src_configure() in the ebuild like the patch in the eblit, I can configure, but not compile perl-5.24.0-r1: >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0 ... make -j5 -l2 -j1 patch -p1 -i cnf/diffs/test-checkcase.patch && touch cnf/diffs/test-checkcase.applied patching file t/porting/checkcase.t patch -p1 -i cnf/diffs/makemaker.patch && touch cnf/diffs/makemaker.applied patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm patch -p1 -i cnf/diffs/posix-makefile.patch && touch cnf/diffs/posix-makefile.applied patching file ext/POSIX/Makefile.PL patch -p1 -i cnf/diffs/installscripts.patch && touch cnf/diffs/installscripts.applied patching file installman patching file installperl patch -p1 -i cnf/diffs/liblist.patch && touch cnf/diffs/liblist.applied patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm patching file t/porting/customized.dat Hunk #1 FAILED at 3. 1 out of 1 hunk FAILED -- saving rejects to file t/porting/customized.dat.rej make: *** [Makefile:60: cnf/diffs/liblist.applied] Error 1 * ERROR: dev-lang/perl-5.24.0-r1::local failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-lang/perl-5.24.0-r1::local'`, * the complete build log and the output of `emerge -pqv '=dev-lang/perl-5.24.0-r1::local'`. * The complete build log is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0' * S: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0' >>> Failed to emerge dev-lang/perl-5.24.0-r1 for /usr/armv6j-hardfloat-linux-gnueabi/, Log file: >>> '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/build.log' * Messages for package dev-lang/perl-5.24.0-r1 merged to /usr/armv6j-hardfloat-linux-gnueabi/: * ERROR: dev-lang/perl-5.24.0-r1::local failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-lang/perl-5.24.0-r1::local'`, * the complete build log and the output of `emerge -pqv '=dev-lang/perl-5.24.0-r1::local'`. * The complete build log is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0' * S: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0' It doesn't work with perl-cross 1.1.0:
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0 ...
./configure --target=armv6j-hardfloat-linux-gnueabi -Dinstallprefix= -Dinstallusrbinperl=undef -Dusevendorprefix=define -Duseshrplib -Darchname=armv6j-linux -Dcc=armv6j-hardfloat-linux-gnueabi-gcc -Doptimize=-O2\ -pipe\ -march=armv6j\ -mfpu=vfp\ -mfloat-abi=hard\ -fomit-frame-pointer -Dldflags=-Wl\,-O1\ -Wl\,--as-needed -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dscriptdir=/usr/bin -Dprivlib=/usr/lib/perl5/5.24.0 -Darchlib=/usr/lib/perl5/5.24.0/armv6j-linux -Dsitelib=/usr/local/lib/perl5/5.24.0 -Dsitearch=/usr/local/lib/perl5/5.24.0/armv6j-linux -Dvendorlib=/usr/lib/perl5/vendor_perl/5.24.0 -Dvendorarch=/usr/lib/perl5/vendor_perl/5.24.0/armv6j-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dlibperl=libperl.so.5.24.0 -Dlocincpth=/usr/include\ -Dglibpth=/lib\ /usr/lib\ -Duselargefiles -Dd_semctl_semun -Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root@localhost -Ud_csh -Dsh=/bin/sh -Dtargetsh=/bin/sh -Uusenm -Ui_ndbm -Ui_gdbm -Ui_db -DDEBUGGING=none -Dnoextensions=ODBM_File\ GDBM_File\ NDBM_File
/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/environment: line 2731: ./configure: No such file or directory
* ERROR: dev-lang/perl-5.24.0-r1::local failed (configure phase):
* Unable to configure
*
* Call stack:
* ebuild.sh, line 115: Called src_configure
* environment, line 2731: Called die
* The specific snippet of code:
* "${@}" || die "Unable to configure"
*
* If you need support, post the output of `emerge --info '=dev-lang/perl-5.24.0-r1::local'`,
* the complete build log and the output of `emerge -pqv '=dev-lang/perl-5.24.0-r1::local'`.
* The complete build log is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-lang/perl-5.24.0-r1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0'
* S: '/var/tmp/portage/dev-lang/perl-5.24.0-r1/work/perl-5.24.0'
Just picked this up again after a long time. The tarball structure has changed. If you copy/move the files from the perl-cross-1.1.0 directory then configure starts. It then fails with the same patch issue you had with the earlier version. This is because one of their patches collide with one of ours but the workaround is simple enough. sed -i 's/MakeMaker\.pm 830acdc810e2974d7fd4ec408ea1bfa825c75b69/MakeMaker.pm effd272b3c9224af6fd0f6cae7183f33ec4b1106/' cnf/diffs/perl5-5.24.0/liblist.patch || die After that, it gets quite far but eventually fails with the following. Don't know why yet. ./miniperl_top make_ext_Makefile.pl cpan/CPANPLUS/Makefile.PL cpan/CPANPLUS: can't find module source Created attachment 447926 [details, diff]
Working perl-5.24.0-r1 cross patch
I got it to work. The CPANPLUS thing was due to something we had patched in. perl-cross was looking for a CPANPLUS.pm file that we had omitted but simply creating an empty file was enough to fool it.
touch cpan/CPANPLUS/lib/CPANPLUS.pm
Attached is a working patch against 5.24.0-r1. make -j1 is no longer needed, which is nice. I'm less sure about the EROOT stuff since discussions about SYSROOT but that hasn't been cemented yet so I've left it as EROOT for now. I tried using the new -Dusesoname option but that broke it. I probably need an extra option but I haven't had time to experiment with that.
Hi! I have one other issue: perl modules that I cross-emerge are installed in /usr/lib64 in place in the right lib directory (e.g /usr/lib for arm, i686). Do I need to open a new bug ? same issue for python modules (In reply to Xavier Miller from comment #57) > Hi! > > I have one other issue: perl modules that I cross-emerge are installed in > /usr/lib64 in place in the right lib directory (e.g /usr/lib for arm, i686). I never said other Perl packages would work. ;) I cooked up a nasty hack for cross-boss that has never failed as far as I recall. The configure phase typically invokes perl and if you do this via proot+qemu then the rest of the ebuild succeeds with the help of these additional overrides passed to emake. "PERL_ARCHLIB=${ROOT%/}${ARCH_LIB}" "PERL_ARCHLIBDEP=${ROOT%/}${ARCH_LIB}" "PERL_INC=${ROOT%/}${ARCH_LIB}/CORE" "PERL_INCDEP=${ROOT%/}${ARCH_LIB}/CORE" "XSUBPPDIR=${ROOT%/}${SITE_LIB/\/local}/ExtUtils" "XSUBPPDEPS=\$(XSUBPPDIR)/typemap \$(XSUBPP)" "XSUBPPARGS=-typemap \$(XSUBPPDIR)/typemap" These overrides could be added to perl-module.eclass easily enough but the proot+qemu stuff is probably a step too far. There's a glitch in perl-cross somewhere as installsitelib and installsitehtml1dir end up with a trailing space. This screws with installation of modules later. I shall investigate. Created attachment 450836 [details, diff]
Working perl-5.24.0-r1 cross patch
The issue has gone in perl-cross 1.1.1 but a new patch is needed.
(In reply to James Le Cuirot from comment #61) > Created attachment 450836 [details, diff] [details, diff] > Working perl-5.24.0-r1 cross patch > > The issue has gone in perl-cross 1.1.1 but a new patch is needed. Thanks a lot, applied in 5.24.0-r2. Would be grateful for any help keeping it uptodate. :) As said on IRC, didn't expect this to get merged any time soon so thanks! For anyone following along, here is my updated snippet of the above for building modules. "PERL_ARCHLIB=${ROOT%/}${ARCH_LIB}" "PERL_ARCHLIBDEP=${ROOT%/}${ARCH_LIB}" "PERL_INC=${ROOT%/}${ARCH_LIB}/CORE" "PERL_INCDEP=${ROOT%/}${ARCH_LIB}/CORE" "XSUBPPDIR=${ROOT%/}${SITE_LIB/\/local}/ExtUtils" "XSUBPPDEPS=\$(XSUBPPDIR)/typemap \$(XSUBPPDIR)/xsubpp" "XSUBPPARGS=-typemap \$(XSUBPPDIR)/typemap" I've already forgotten why but using $(XSUBPP) doesn't always work. |