Source: libqalculate
Version: 5.13.2-1
Tags: patch
User: [email protected]
Usertags: ftcbfs

libqalculate fails to cross build from source for amd64 and arm64,
because it passes host architecture compiler flags to the build compiler
and those two architectures have architecture-specific compiler flags.
Simply removing the *_FOR_BUILD overrides fixes the cross build as
dpkg-buildflags initializes them in a suitable way. I'm attaching a
patch for your convenience.

I tracked down why they were added to
https://salsa.debian.org/debian/libqalculate/-/commit/098ab41f63b420590b1fd701d16d58c7ff0ec29c
and it mentions blhc as a cause. This is an instance where blhc is
wrong. While it is important to include compiler flags, this is a build
tool and it is not included in a binary package. Here, it is more
important to not pass incompatible flags.

Helmut
diff -Nru libqalculate-5.13.2/debian/changelog 
libqalculate-5.13.2/debian/changelog
--- libqalculate-5.13.2/debian/changelog        2026-10-12 21:27:15.000000000 
+0200
+++ libqalculate-5.13.2/debian/changelog        2026-10-28 15:58:42.000000000 
+0100
@@ -1,3 +1,10 @@
+libqalculate (5.13.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Do not override _FOR_BUILD flags. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Wed, 28 Oct 2026 15:58:42 +0100
+
 libqalculate (5.13.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru libqalculate-5.13.2/debian/rules libqalculate-5.13.2/debian/rules
--- libqalculate-5.13.2/debian/rules    2025-11-25 07:49:35.000000000 +0100
+++ libqalculate-5.13.2/debian/rules    2026-10-28 15:58:42.000000000 +0100
@@ -4,10 +4,6 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-export CXXFLAGS_FOR_BUILD=$(CXXFLAGS)
-export CPPFLAGS_FOR_BUILD=$(CPPFLAGS)
-export LDFLAGS_FOR_BUILD=$(LDFLAGS)
-
 %:
        dh $@
 

Reply via email to