Source: libmemcached-libmemcached-perl Version: 1.001801+dfsg-5 Severity: important Tags: ftbfs forky sid patch User: [email protected] Usertags: perl-5.42-transition
This package fails to build with Perl 5.42 (currently in experimental.) https://perl.debian.net/rebuild-logs/perl-5.42/libmemcached-libmemcached-perl_1.001801+dfsg-5/libmemcached-libmemcached-perl_1.001801+dfsg-5+b3_amd64-2025-08-23T12:42:44Z.build "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- libmemcached.bs blib/arch/auto/Memcached/libmemcached/libmemcached.bs 644 Substitution replacement not terminated at (eval 459) line 8, <GEN0> line 994. mv libmemcached.xsc libmemcached.c [...] Not a CODE reference at /build/libmemcached-libmemcached-perl-0Dp8aB/libmemcached-libmemcached-perl-1.001801+dfsg/blib/lib/Memcached/libmemcached.pm line 492. # Looks like your test exited with 255 before it could output anything. t/10-set-get.t ................... 1..14 Dubious, test returned 255 (wstat 65280, 0xff00) Failed 14/14 subtests It turns out that the package bundles a customized fork of an old ExtUtils::ParseXS version, which is no longer quite compatible with the main typemap file bundled with Perl core. See the description in the attached proposed patch for details. This seems to work for me with both Perl 5.40 and 5.42. While we modify the Debian package build quite a bit by linking against the system libmemcached, I suspect (but haven't tested) that this issue also happens with an unmodified upstream build. The test suite needs a running memcached server for the most part, so CPAN testers don't really cover the full functionality. Also, they don't show the full build log, so the "Substitution replacement not terminated" symptom is not visible. I also briefly tried removing the bundled EU::ParseXS stuff, but the test suite totally blew up because the module typemap file relies on the customizations (at least $length_var). So I suppose the best we can do is patch the bundled one to keep it working. If you want to test changes against Perl 5.42 in experimental and run into uninstallability problems, there is a test repository of rebuilt Debian sid packages for amd64 available at <https://perl.debian.net/>. Thanks for your work on Debian, -- Niko Tyni [email protected]
>From 9d4c0f0a9042678786ff58243b8fe91f8e90596e Mon Sep 17 00:00:00 2001 From: Niko Tyni <[email protected]> Date: Sat, 23 Aug 2025 15:27:12 +0100 Subject: [PATCH] Adapt to ExtUtils::ParseXS changes in Perl 5.42 The bundled ExtUtils::ParseXS is a customized fork of an old upstream version from 2007 or so. However, it still relies on the typemap file bundled with Perl itself. This typemap changed in Perl 5.41.1 with https://github.com/Perl/perl5/commit/42cf75238c3687c1b1fad9263614036f7059c2dc so that double quote characters are no longer escaped. This broke custom EU::ParseXS eval qq/"$expr;"/ style calls with code interpolated from the typemap when generating code for the walk_stats() function. The end result was that the callback argument in the function never got set and the test suite failed with 'not a CODE reference'. Work around this by using qq{} instead of "". Not sure if this is any more robust, but it least it works with both Perl 5.40 and 5.42. --- t/lib/ExtUtils/ParseXS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib/ExtUtils/ParseXS.pm b/t/lib/ExtUtils/ParseXS.pm index 401034d..642b785 100644 --- a/t/lib/ExtUtils/ParseXS.pm +++ b/t/lib/ExtUtils/ParseXS.pm @@ -1778,7 +1778,7 @@ sub generate_init { eval qq/print "\\t$var;\\n"/; warn $@ if $@; } - $deferred{post_input} .= eval qq/"\\n$expr;\\n"/; + $deferred{post_input} .= eval qq/qq{\\n$expr;\\n}/; warn $@ if $@; } else { die "panic: do not know how to handle this branch for function pointers" -- 2.49.0

