Bug#875921: perl: Perl cross-build does not search correct paths for errno.h

Niko Tyni ntyni at debian.org
Sat Sep 16 08:16:13 UTC 2017


On Sat, Sep 16, 2017 at 01:06:48AM +0100, Wookey wrote:
> Package: perl
> Version: 5.24.1-3+deb9u1
> Severity: normal
> Tags: upstream patch

> There is no obvious variable in the config file to set up this
> search. The closest is incpth, and using that does work, which is what
> the attached patch does. I'm not sure that it is really the optimum
> include path set to search. Possibly yet another config option for
> this would be the right thing to do. Better would be defining one for
> $DEB_HOST_MULTIARCH so the path can be composed. 

Hi, incpth is set in Configure based on what the preprocessor reports
as its search path. Using that seems quite correct and robust to me.

Getting this upstream so that incpth is searched before the sysroot
prefixed dirs (which degrade to normal /usr/include and /usr/local/include
for us as sysroot is empty) may be hard. The sysroot stuff was added in
 https://perl5.git.perl.org/perl.git/commitdiff/98b12e44bdf730698c03a5a4d8fc93c41d931637
and is presumably still used by other cross compiling efforts.

Possibly the logic that could go upstream would be

1) look in $sysroot/usr/{,local/}include but only if $sysroot is set
2) look in incpth
3) look in locincpth
4) if all fails, try /usr/include and /usr/local/include last

-- 
Niko




More information about the Perl-maintainers mailing list