Source: libapt-pkg-perl
Version: 0.1.43
Tags: patch
User: [email protected]
Usertags: cross-satisfiability ftcbfs
libapt-pkg-perl fails to cross build from source for two distinct
reasons. The versioned build dependency on perl requests a host
architecture Perl interpreter. That ends up conflicting with the base
system. Annotating it :native is needed here to get a runnable one.
The upstream build system overrides the CC variable with a C++ compiler.
The build infrastructure normally populates it with a cross compiler,
but the override prevents that. I suggest enhancing the overriding
mechanism.
You may find both changes in the attached patch. Once applying it,
libapt-pkg-perl cross builds successfully.
Helmut
diff -Nru libapt-pkg-perl-0.1.43/Makefile.PL
libapt-pkg-perl-0.1.43+nmu1/Makefile.PL
--- libapt-pkg-perl-0.1.43/Makefile.PL 2021-02-16 09:57:32.000000000 +0100
+++ libapt-pkg-perl-0.1.43+nmu1/Makefile.PL 2026-01-02 13:23:34.000000000
+0100
@@ -3,8 +3,8 @@
WriteMakefile(
NAME => 'AptPkg',
VERSION_FROM => 'AptPkg.pm',
- CC => 'c++',
- LD => 'c++',
+ CC => ($ENV{'CXX'} // 'c++'),
+ LD => ($ENV{'CXX'} // 'c++'),
OBJECT => '$(O_FILES)',
LIBS => ['-lapt-pkg'],
XSOPT => '-C++',
diff -Nru libapt-pkg-perl-0.1.43/debian/changelog
libapt-pkg-perl-0.1.43+nmu1/debian/changelog
--- libapt-pkg-perl-0.1.43/debian/changelog 2025-11-22 11:35:31.000000000
+0100
+++ libapt-pkg-perl-0.1.43+nmu1/debian/changelog 2026-01-02
13:23:34.000000000 +0100
@@ -1,3 +1,12 @@
+libapt-pkg-perl (0.1.43+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (closes: #-1)
+ + Annotate perl build dependency :native.
+ + Use a host architecture C++ compiler.
+
+ -- Helmut Grohne <[email protected]> Fri, 02 Jan 2026 13:23:34 +0100
+
libapt-pkg-perl (0.1.43) unstable; urgency=medium
* Add support for SourceVer.
diff -Nru libapt-pkg-perl-0.1.43/debian/control
libapt-pkg-perl-0.1.43+nmu1/debian/control
--- libapt-pkg-perl-0.1.43/debian/control 2025-04-14 02:36:25.000000000
+0200
+++ libapt-pkg-perl-0.1.43+nmu1/debian/control 2026-01-02 13:23:34.000000000
+0100
@@ -2,7 +2,7 @@
Section: perl
Priority: optional
Maintainer: Brendan O'Dea <[email protected]>
-Build-Depends: perl (>= 5.8.0-6), debhelper-compat (= 13), libapt-pkg-dev (>=
2.1.20), perl-xs-dev
+Build-Depends: debhelper-compat (= 13), libapt-pkg-dev (>= 2.1.20),
perl:native (>= 5.8.0-6), perl-xs-dev
Standards-Version: 4.7.2
Vcs-Browser: https://salsa.debian.org/bod/libapt-pkg-perl
Vcs-Git: https://salsa.debian.org/bod/libapt-pkg-perl.git
diff -Nru libapt-pkg-perl-0.1.43/debian/rules
libapt-pkg-perl-0.1.43+nmu1/debian/rules
--- libapt-pkg-perl-0.1.43/debian/rules 2021-03-03 02:55:32.000000000 +0100
+++ libapt-pkg-perl-0.1.43+nmu1/debian/rules 2026-01-02 13:23:34.000000000
+0100
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDTOOLS := 1
+include /usr/share/dpkg/buildtools.mk
%:
dh $@