Bug#1107055: fftw3 FTCBFS: gfortran dependency not satisfiable
Helmut Grohne
helmut at subdivi.de
Sat May 31 17:32:21 BST 2025
Source: fftw3
Version: 3.3.10-2
Tags: patch
User: debian-cross at lists.debian.org
Usertags: cross-satisfiability
fftw3 fails to cross build from source, because its gfortran dependency
is not cross-satisfiable. Generally bare toolchain names cannot be used
for cross compilation, because they do not indicate whether they're
meant for the build or host architecture. In this case,
gfortran-for-host is what is needed.
However, gfortran-for-host cannot provide the bare "gfortran" name.
"${DEB_HOST_GNU_TYPE}-gfortran" must be used instead. We looked for
alternatives and they all regressed some use case. That said using
triplet-prefixed tools is explicit and works reliably even when building
natively.
I'm attaching a patch for your convenience, but I think applying it
should be deferred to forky.
Helmut
-------------- next part --------------
diff --minimal -Nru fftw3-3.3.10/debian/changelog fftw3-3.3.10/debian/changelog
--- fftw3-3.3.10/debian/changelog 2024-10-26 13:58:51.000000000 +0200
+++ fftw3-3.3.10/debian/changelog 2024-10-31 16:25:56.000000000 +0100
@@ -1,3 +1,10 @@
+fftw3 (3.3.10-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Use gfortran-for-host. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Thu, 31 Oct 2024 16:25:56 +0100
+
fftw3 (3.3.10-2) unstable; urgency=medium
* Team upload.
diff --minimal -Nru fftw3-3.3.10/debian/control fftw3-3.3.10/debian/control
--- fftw3-3.3.10/debian/control 2024-10-26 13:58:05.000000000 +0200
+++ fftw3-3.3.10/debian/control 2024-10-31 16:25:54.000000000 +0100
@@ -6,7 +6,7 @@
Priority: optional
Build-Depends: chrpath,
debhelper-compat (= 13),
- gfortran,
+ gfortran-for-host,
mpi-default-dev,
texinfo
Build-Depends-Indep: ghostscript
diff --minimal -Nru fftw3-3.3.10/debian/rules fftw3-3.3.10/debian/rules
--- fftw3-3.3.10/debian/rules 2024-10-26 13:57:20.000000000 +0200
+++ fftw3-3.3.10/debian/rules 2024-10-31 16:25:56.000000000 +0100
@@ -3,6 +3,7 @@
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/buildtools.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
@@ -54,9 +55,9 @@
endif
ifneq (,$(findstring nog77,$(DEB_BUILD_OPTIONS)))
- archconfflags := $(archconfflags) F77="gfortran"
+ archconfflags := $(archconfflags) F77="$(F77)"
else
- archconfflags := $(archconfflags) F77="gfortran -ff2c"
+ archconfflags := $(archconfflags) F77="$(F77) -ff2c"
endif
# common configure options
More information about the debian-science-maintainers
mailing list