Bug#1040386: libdata-swap-perl: FTBFS with Perl 5.38: undefined reference to `Perl_hv_backreferences_p'

Niko Tyni ntyni at debian.org
Tue Jul 18 15:43:18 BST 2023


Control: tag -1 patch

On Wed, Jul 05, 2023 at 01:21:15PM +0300, Niko Tyni wrote:
> Source: libdata-swap-perl
> Version: 0.08-2
> Severity: important
> Tags: ftbfs trixie sid
> Forwarded: https://rt.cpan.org/Ticket/Display.html?id=144619
> User: debian-perl at lists.debian.org
> Usertags: perl-5.38-transition
> 
> This package fails to build from source with Perl 5.38 (currently in
> experimental):
> 
>   x86_64-linux-gnu-gcc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now  -shared -L/usr/local/lib -fstack-protector-strong  Swap.o  -o blib/arch/auto/Data/Swap/Swap.so  \
>         \
>     
>   /usr/bin/ld: Swap.o: in function `extract_backrefs':
>   ././Swap.c:63: undefined reference to `Perl_hv_backreferences_p'
>   /usr/bin/ld: Swap.o: in function `install_backrefs':
>   ././Swap.c:88: undefined reference to `Perl_hv_backreferences_p'
>   /usr/bin/ld: blib/arch/auto/Data/Swap/Swap.so: hidden symbol `Perl_hv_backreferences_p' isn't defined
>   /usr/bin/ld: final link failed: bad value
>   collect2: error: ld returned 1 exit status
>   make[1]: *** [Makefile:474: blib/arch/auto/Data/Swap/Swap.so] Error 1

This is because 5.38 hides internal C API functions with with __attribute__((hidden)).
Perl_hv_backreferences_p was never part of the official API.

That said, the attached patch works around this by duplicating the
functionality from the core function. It's not a proper solution but I
guess it could buy some time. The module is clearly abandoned upstream
so I suppose we should aim for its eventual removal from Debian?

I've no idea how bad form this is but it seems to work for me on perls
at least from 5.20 up to 5.38.

Tentatively adding the patch tag...
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Work-around-Perl_hv_backreferences_p-hidden-in-5.38.patch
Type: text/x-diff
Size: 1458 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20230718/4aa2716b/attachment.patch>


More information about the pkg-perl-maintainers mailing list