[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cross build support in perl 5.22.1-7

On 2017-09-15 09:11 +0300, Niko Tyni wrote:
> On Fri, Sep 15, 2017 at 02:12:28AM +0100, Wookey wrote:
> > 
> > It seems to me that if generate_uudmap is to be run when crossing then
> > it needs to be built for the BUILD arch, not the HOST arch. Am I misunderstanding what's going on here?
> You're quite correct; this is #872471 fixed in 5.26.0-6 with
>  https://anonscm.debian.org/cgit/perl/perl.git/commit/?id=665d463005116562dbce0e8c3b886af7ab706dc6
> That seems to apply to 5.24 as-is, but let me know if you have trouble
> with that.

Aha. Cheers for that. I should have looked for such a bug.

OK. so that works nicely. Now we get to:
Generating a Unix-style Makefile
Writing Makefile for Errno
make[2]: Entering directory '/tmp/buildd/perl/perl-5.24.1/ext/Errno'
"../../build-miniperl" "-I../../lib" "-I../../lib" Errno_pm.PL Errno.pm
Cannot find errno.h at Errno_pm.PL line 138.
Makefile:430: recipe for target 'Errno.pm' failed

because whilst we have lots of errno.h files:

Errno_pm.PL is assuming a sysroot, and non multiarch, layout:
  my ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" }
      "$sysroot/usr/include", "$sysroot/usr/local/include",
      split / / => $Config{locincpth} or
          die "Cannot find errno.h"

Amazingly despite hundreds of lines of config options, none is just
'triplet' or 'multiarch path', but 'incpath' seems closest to the right thing.
However using that:
       "$Config{incpth}", "$sysroot/usr/local/include",

 doesn't work, probably due to multiple paths (my perl foo is very rusty).
      "$sysroot/usr/include/aarch64-linux-gnu_ilp32", "$sysroot/usr/local/include",
does work, so this is the issue, but we seem to be in need of a config option for 'multiarch path'
I note that we have a 
but perhaps that is for some other purpose?

Again, is this a known issue? Am I on the right track, or confused about what is going on?
What is the right way to get perl/miniperl to find the right headers?

Principal hats:  Linaro, Debian, Wookware, ARM

Attachment: signature.asc
Description: Digital signature

Reply to: