[Debian-med-packaging] Bug#1126477: libzerg-perl FTCBFS: uses the build architecture compiler as linker
Helmut Grohne
helmut at subdivi.de
Sun Jan 25 19:31:08 GMT 2026
Source: libzerg-perl
Version: 1.0.4-9
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
libzerg-perl fails to cross build from source, because debian rules
overrides LD containing a build architecture compiler. It does so to
pass suitable LDFLAGS and queries perl for the linker name.
Unfortunately, that does not consider the host architecture at hand.
Instead, I suggest deferring the task to dpkg's buildtools.mk. Once
doing so, libzerg-perl cross builds successfully.
Helmut
-------------- next part --------------
diff -Nru libzerg-perl-1.0.4/debian/changelog libzerg-perl-1.0.4/debian/changelog
--- libzerg-perl-1.0.4/debian/changelog 2025-11-13 23:04:28.000000000 +0100
+++ libzerg-perl-1.0.4/debian/changelog 2026-01-25 20:17:27.000000000 +0100
@@ -1,3 +1,10 @@
+libzerg-perl (1.0.4-9.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Let dpkg's buildtools.mk define LD. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Sun, 25 Jan 2026 20:17:27 +0100
+
libzerg-perl (1.0.4-9) unstable; urgency=medium
* d/control: build depends on perl-xs-dev. (Closes: #1102791)
diff -Nru libzerg-perl-1.0.4/debian/rules libzerg-perl-1.0.4/debian/rules
--- libzerg-perl-1.0.4/debian/rules 2025-11-13 23:04:28.000000000 +0100
+++ libzerg-perl-1.0.4/debian/rules 2026-01-25 20:17:24.000000000 +0100
@@ -2,6 +2,8 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+include /usr/share/dpkg/buildtools.mk
+
export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
@@ -12,7 +14,7 @@
.PHONY: override_dh_auto_configure
override_dh_auto_configure:
- dh_auto_configure -- OPTIMIZE="$(CPPFLAGS) $(CFLAGS)" LD="$(shell perl -V::ld:) $(LDFLAGS)"
+ dh_auto_configure -- OPTIMIZE="$(CPPFLAGS) $(CFLAGS)" LD="$(CC) $(LDFLAGS)"
PERLDIR = $(shell echo $(CURDIR)/debian/libzerg-perl/usr/lib/*/perl*/*)
execute_after_dh_install:
More information about the Debian-med-packaging
mailing list