Package: libapache2-mod-perl2 Version: 2.0.13-2 Severity: normal Dear maintainer,
This package, which is a sync in ubuntu, failed to build recently on armhf: arm-linux-gnueabihf-gcc -I/<<PKGBUILDDIR>>/src/modules/perl -I/<<PKGBUILDDIR>>/xs -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/apache2 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/arm-linux-gnueabihf/perl/5.38/CORE -DMOD_PERL -DMP_COMPAT_1X -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/libapache2-mod-perl2-2.0.13-1build5 -Wall -fgnu89-inline -DLINUX -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/libapache2-mod-perl2-2.0.13-1build5 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -fPIC \ -c modperl_directives.c && mv modperl_directives.o modperl_directives.lo modperl_common_util.c:57:53: error: initialization of ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long int)’} from incompatible pointer type ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)’} [-Wincompatible-pointer-types] 57 | modperl_table_magic_copy}; | ^~~~~~~~~~~~~~~~~~~~~~~~ modperl_common_util.c:57:53: note: (near initialization for ‘modperl_table_magic_prefetch.svt_copy’) Upstream committed a fix a while ago, and it's what I'm using to fix the ubuntu build failure. I can't be sure if debian is affected (because of toolchain versions), but it seems likely. I don't have a debian armhf system handy to test. This is the commit: https://github.com/apache/mod_perl/commit/ead5012b9f8bca08415f39e15226dbc6112a9538 >From ead5012b9f8bca08415f39e15226dbc6112a9538 Mon Sep 17 00:00:00 2001 From: Joe Orton <jor...@apache.org> Date: Tue, 6 Feb 2024 08:33:52 +0000 Subject: [PATCH] * src/modules/perl/modperl_common_util.c (modperl_table_magic_copy): Use I32 rather than int for 'namelen' argument, fixing an incompatible function pointer error/warning in a 32-bit build: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modperl_common_util.c:57:53: error: initialization of ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long int)’} from incompatible pointer type ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)’} [-Wincompatible-pointer-types] 57 | modperl_table_magic_copy}; | ^~~~~~~~~~~~~~~~~~~~~~~~ Checked back to Perl 5.14.x which has I32 (a typedef of long int on i686) rather than int in the prototype for the svt_copy function pointer in MGVTBL, so I32 appears to have been always correct here: int (*svt_copy)(SV *sv, MAGIC* mg, SV *nsv, const char *name, I32 namlen); per https://perldoc.perl.org/5.14.0/perlguts git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1915593 13f79535-47bb-0310-9956-ffa450edef68 --- src/modules/perl/modperl_common_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/perl/modperl_common_util.c b/src/modules/perl/modperl_common_util.c index c5f285f9d..461750f2f 100644 --- a/src/modules/perl/modperl_common_util.c +++ b/src/modules/perl/modperl_common_util.c @@ -41,7 +41,7 @@ MP_INLINE static int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, - const char *name, int namelen) + const char *name, I32 namelen) { /* prefetch the value whenever we're iterating over the keys */ MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem);