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

Re: cross build support in perl 5.22.1-7



On Fri, Sep 15, 2017 at 04:45:18PM +0100, Wookey wrote:

> 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:
> /usr/include/aarch64-linux-gnu_ilp32/asm/errno.h
> /usr/include/aarch64-linux-gnu_ilp32/errno.h
> /usr/include/aarch64-linux-gnu_ilp32/sys/errno.h
> /usr/include/aarch64-linux-gnu_ilp32/bits/errno.h
> /usr/include/x86_64-linux-gnu/asm/errno.h
> /usr/include/x86_64-linux-gnu/errno.h
> /usr/include/x86_64-linux-gnu/sys/errno.h
> /usr/include/x86_64-linux-gnu/bits/errno.h
> /usr/include/asm-generic/errno.h
> /usr/include/linux/errno.h

I expect it usually happily reads /usr/include/errno.h, which indeed
looks incorrect for a cross build but nobody noticed until now.

OOI, do you know why you don't have that file? I'd sort of expect the
current code to trip without one also in native builds.

Please file a bug about this and I'll look into it at some point.

> Amazingly despite hundreds of lines of config options, none is just
> 'triplet' or 'multiarch path', but 'incpath' seems closest to the right thing.

The upstream build system doesn't really know about Debian style multiarch
stuff. IIRC things like $Config{libpth} are found out by parsing 'gcc
--print-search-dirs' output or something like that. Probably this should
do something similar.

> I note that we have a 
> multiarch='undef'
> but perhaps that is for some other purpose?

That's indeed something else, introduced in 1999 or so (for perl 5.6).

> 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?

I was not aware of this issue, and I don't know the solution yet.

I think you're on the right track but it's not very beaten :)
-- 
Niko


Reply to: