Control: tag -1 patch On Wed, Oct 09, 2019 at 11:45:39PM +0300, Niko Tyni wrote: > Package: libmarisa-perl > Version: 0.2.5-3 > Severity: grave > Control: block 935737 with -1 > > As noticed by the autopkgtest checks, the marisa Perl bindings are > totally broken in sid after the recent Perl 5.30 rebuild:
> It looks like this regressed with the gcc 8 -> 9 move. Linking the > DSO manually with gcc-8 makes it go away, as seen below. > > I have no idea what goes wrong here, but I noticed that broken versions > of blib/arch/auto/marisa/marisa.so have no NEEDED entry for libmarisa.so.0 > (as seen with 'objdump -p'). There seem to be several conflated issues here: - debian/rules overrids LIBS to '-L../../lib/marisa/.libs' but doesn't include '-lmarisa' - debian/rules setting of LDDLFLAGS used to mask this by including '-L../../lib/marisa/.libs -lmarisa', but this ends up too early in the linking command, so gcc-9 ignores it for the objects later in the command - the LDDFLAGS part of this would not be needed and ExtUtils::MakeMaker would do the right thing if the marisa library was already built when Makefile.PL was run Proposed patch attached. -- Niko Tyni nt...@debian.org
>From f715c42ea44727eee6e7971bcc5270c409f01321 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Tue, 15 Oct 2019 08:36:22 +0100 Subject: [PATCH] Fix debian/rules for perl bindings We need to run Makefile.PL only after the library is built. Closes: 942073 --- debian/rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 4e2b6cf..01f9db9 100755 --- a/debian/rules +++ b/debian/rules @@ -33,18 +33,18 @@ override_dh_auto_configure: dh_auto_configure make -C bindings cd bindings/python; sed -i "s/__version__/$(DEB_VERSION_UPSTREAM)/" setup.py + +override_dh_auto_build: + dh_auto_build cd bindings/perl; perl Makefile.PL \ INSTALL_BASE=$(CURDIR)/debian/libmarisa-perl/usr \ INSTALLARCHLIB=$(CURDIR)/debian/libmarisa-perl$(PERL_VENDOR_ARCH) \ INSTALLSITEARCH=$(CURDIR)/debian/libmarisa-perl$(PERL_VENDOR_ARCH) \ INSTALLVENDORARCH=$(CURDIR)/debian/libmarisa-perl$(PERL_VENDOR_ARCH) \ INC="-I../../include" \ - LIBS="-L../../lib/marisa/.libs" \ + LIBS="-L../../lib/marisa/.libs -lmarisa" \ CCFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \ - LDDLFLAGS="-shared -L/usr/local/lib -L../../lib/marisa/.libs -lmarisa -fstack-protector $(shell dpkg-buildflags --get LDFLAGS)" - -override_dh_auto_build: - dh_auto_build + LDDLFLAGS="-shared -L/usr/local/lib -fstack-protector $(shell dpkg-buildflags --get LDFLAGS)" # Build for each Python 3 version cd bindings/python; \ set -ex; for python in $(PYTHON3); do \ -- 2.23.0.rc1