#837877 bogofilter FTCBFS: fails to pass --host to ./configure

#837877#5
Date:
2016-09-15 03:59:44 UTC
From:
To:
bogofilter fails to cross build from source, because it doesn't pass
--host to configure and thus uses the build architecture toolchain.
Ultimately, the failure occurs when it misses required dependencies. I
am proposing to simply switch the explicit configure invocations to
dh_auto_configure which knows the right flags (including --host) to
pass. After applying the attached patch, bogofilter cross builds just
fine.

Helmut

#837877#10
Date:
2020-10-31 08:55:51 UTC
From:
To:
Is this still relevant?
#837877#13
Date:
2020-10-31 08:55:51 UTC
From:
To:
Is this still relevant?
#837877#18
Date:
2020-10-31 09:15:43 UTC
From:
To:

#837877#25
Date:
2025-12-13 09:00:22 UTC
From:
To:
Control: tags -1 - moreinfo

Yes, you can check the state at
https://crossqa.debian.net/src/bogofilter.

Helmut

#837877#30
Date:
2026-05-04 23:47:41 UTC
From:
To:
Hi Adrian,

I've been doing some Bug of the Day triage and picked up this one. I've
prepared a debdiff fixing the FTCBFS issue.

The root cause is that the four explicit ../configure invocations in
debian/rules do not pass --host or --build. Since architecture.mk is
already included at the top of debian/rules, the DEB_HOST_GNU_TYPE and
DEB_BUILD_GNU_TYPE variables are already available — they just aren't
being forwarded to configure.

Helmut's 2016 suggestion was to switch to dh_auto_configure, but that
isn't straightforward given the multi-build-dir layout (obj-db,
obj-sqlite, obj-tokyocabinet, obj-doc each run separate configure
invocations). The fix is to add --host and --build explicitly to each
call.

I've verified the fix at the configure level: without --host, autoconf
determines cross_compiling=no and locks in the native toolchain. With
--host=$(DEB_HOST_GNU_TYPE), it correctly sets cross_compiling=yes and
targets the declared host architecture. The package builds cleanly with
the patch applied (lintian: one pre-existing warning, national-encoding
in the French FAQ — not introduced by this change).

The debdiff (1.2.5-1 → 1.2.5-1.1) is inlined below.

If you'd prefer to apply the fix yourself and upload, that's great —
please feel free to use this debdiff. If not, I'd like to arrange an
NMU to DELAYED/10 via a sponsor (I'm a new contributor and don't have
upload rights yet). Either way, this bug has been open for nearly a
decade and CrossQA still shows failures — would be good to get it
closed.

I'm also noting a separate issue for a follow-up: debian/watch is broken
(the http://sf.net/bogofilter/ URL pattern no longer matches — upstream
files are now at sourceforge.net/projects/bogofilter/files/bogofilter-stable/
in .tar.xz format). Happy to file a separate bug for that if useful.

Regards,
James Montgomery
--- debdiff bogofilter 1.2.5-1 → 1.2.5-1.1 --- diff -Nru bogofilter-1.2.5/debian/changelog bogofilter-1.2.5/debian/changelog --- bogofilter-1.2.5/debian/changelog 2021-02-10 10:00:56.000000000 +0000 +++ bogofilter-1.2.5/debian/changelog 2026-05-04 23:24:55.000000000 +0000 @@ -1,3 +1,11 @@ +bogofilter (1.2.5-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTCBFS: add --host and --build flags to all configure invocations. + (Closes: #837877) + + -- James Montgomery <james_montgomery@disroot.org> Mon, 04 May 2026 23:24:55 +0000 + bogofilter (1.2.5-1) unstable; urgency=high * New upstream release. (Closes: #980328) diff -Nru bogofilter-1.2.5/debian/rules bogofilter-1.2.5/debian/rules --- bogofilter-1.2.5/debian/rules 2018-03-09 19:30:06.000000000 +0000 +++ bogofilter-1.2.5/debian/rules 2026-05-04 23:24:55.000000000 +0000 @@ -19,12 +19,15 @@ override_dh_auto_configure: mkdir -p $(CURDIR)/obj-doc - cd $(CURDIR)/obj-doc && ../configure + cd $(CURDIR)/obj-doc && ../configure \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) mkdir $(CURDIR)/obj-db $(CURDIR)/obj-sqlite cd $(CURDIR)/obj-db && ../configure --with-database=db \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \ AWK=awk $(shell dpkg-buildflags --export=configure) cd $(CURDIR)/obj-sqlite && ../configure --with-database=sqlite \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --program-suffix=-sqlite --prefix=/usr --mandir=\$${prefix}/share/man \ --sysconfdir=/etc AWK=awk $(shell dpkg-buildflags --export=configure) && \ sed -i 's/^INTEGRITY_TESTS.*/INTEGRITY_TESTS=t.lock1/' src/tests/Makefile @@ -32,6 +35,7 @@ mkdir $(CURDIR)/obj-tokyocabinet; \ cd $(CURDIR)/obj-tokyocabinet && ../configure \ --with-database=tokyocabinet --program-suffix=-tokyocabinet \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc AWK=awk \ $(shell dpkg-buildflags --export=configure); \ fi