Bug#950297: libyaml-syck-perl FTCBFS: compiler check too strict

Helmut Grohne helmut at subdivi.de
Fri Jan 31 05:22:37 GMT 2020


Source: libyaml-syck-perl
Version: 1.32-1
Tags: upstream
User: debian-cross at lists.debian.org
Usertags: ftcbfs

libyaml-syck-perl fails to cross build from source even after you
updated its Build-Depends. It happens to fail while running its
Makefile.PL:

|    dh_auto_configure -a
|         perl -I/usr/lib/aarch64-linux-gnu/perl/cross-config-5.30.0 Makefile.PL INSTALLDIRS=vendor "OPTIMIZE=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "LD=aarch64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now"
| Couldn't load HASCOMPILERsEl9/TESTr0el.so: /<<PKGBUILDDIR>>/HASCOMPILERsEl9/TESTr0el.so: cannot open shared object file: No such file or directory at ./inc/ExtUtils/HasCompiler.pm line 141.
|  at Makefile.PL line 8.
| Sorry! YAML::Syck requires a compiler in order to be built.
| dh_auto_configure: error: perl -I/usr/lib/aarch64-linux-gnu/perl/cross-config-5.30.0 Makefile.PL INSTALLDIRS=vendor "OPTIMIZE=-g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "LD=aarch64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now" returned exit code 1
| make: *** [debian/rules:6: build-arch] Error 25
| dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2

libyaml-syck-perl has a inc/ExtUtils/HasCompiler.pm that is used for
checking whether the compiler can build a loadable module. That fails. I
think the failure is to be expected, because a cross compiled object
cannot be loaded into the native perl. Once removing the "exit 1;" from
Makefile.PL line 11, libyaml-syck-perl cross builds just fine. So it
really is just this check.

I'd assume that simply patching it out does not suit well with upstream.
After all, they put it there for a reason. Unfortunately, I have little
clue how to express a "if cross compiling" in perl. Do you have any idea
on how to fix this?

I was also wondering about many warnings during the build:
| warning: incompatible implicit declaration of built-in function ‘malloc’
The source does #include <stdlib.h> if HAVE_STDLIB_H is set. This macro
is set if I_STDLIB is set somewhere, but nothing ever sets it. This
behaviour is also present in native builds, see e.g.:
https://buildd.debian.org/status/fetch.php?pkg=libyaml-syck-perl&arch=ppc64el&ver=1.32-1&stamp=1580299988&raw=0
This hints that something else is broken about configuration of
libyaml-syck-perl. I'm merely reporting it as this observation here and
hope that it helps somehow.

Can you think of a good way to disable or fix this test for cross
compilation? Given that I don't have a good answer here, I don't have a
patch this time.

Helmut



More information about the pkg-perl-maintainers mailing list