#1143390 rspamd: FTBFS: /usr/include/doctest/doctest.h:1277:32: error: passing 'const rspamd::mime::basic_mime_string<char>' as 'this' argument discards qualifiers [-fpermissive]

Package:
src:rspamd
Source:
src:rspamd
Submitter:
Santiago Vila
Date:
2026-09-08 16:07:02 UTC
Severity:
normal
Tags:
#1143390#5
Date:
2026-08-01 22:38:24 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:rspamd, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
/usr/include/doctest/doctest.h:2000:5:   required from ‘decltype (((void)((declval<L>() == declval<R>())), (doctest::detail::Result)(<brace-enclosed initializer list>()))) doctest::detail::Expression_lhs<L>::operator==(R&&) [with R = const char (&)[1]; L = const rspamd::mime::basic_mime_string<char>&; decltype (((void)((declval<L>() == declval<R>())), (doctest::detail::Result)(<brace-enclosed initializer list>()))) = doctest::detail::Result]’
 2000 |     DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, " == ", DOCTEST_CMP_EQ)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/src/libmime/mime_string.cxx:31:4:   required from here
   31 |                         CHECK(st == "");
      |                                     ^~
/usr/include/doctest/doctest.h:1277:32: error: passing ‘const rspamd::mime::basic_mime_string<char>’ as ‘this’ argument discards qualifiers [-fpermissive]
 1277 |         for (auto it = in.begin(); it != in.end(); ++it) {
      |                        ~~~~~~~~^~
In file included from /<<PKGBUILDDIR>>/src/libmime/mime_string.cxx:19:
/<<PKGBUILDDIR>>/src/libmime/mime_string.hxx:526:21: note:   in call to ‘rspamd::mime::basic_mime_string<T, Allocator, Functor>::iterator rspamd::mime::basic_mime_string<T, Allocator, Functor>::begin() [with CharT = char; Allocator = std::allocator<char>; Functor = fu2::abi_400::detail::function<fu2::abi_400::detail::config<false, true, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, int(int)> >; iterator = rspamd::mime::iterator<rspamd::mime::basic_mime_string<char>, false>]’
  526 |         inline auto begin() noexcept -> iterator
      |                     ^~~~~
/usr/include/doctest/doctest.h:1277:48: error: passing ‘const rspamd::mime::basic_mime_string<char>’ as ‘this’ argument discards qualifiers [-fpermissive]
 1277 |         for (auto it = in.begin(); it != in.end(); ++it) {
      |                                          ~~~~~~^~
/<<PKGBUILDDIR>>/src/libmime/mime_string.hxx:536:21: note:   in call to ‘rspamd::mime::basic_mime_string<T, Allocator, Functor>::iterator rspamd::mime::basic_mime_string<T, Allocator, Functor>::end() [with CharT = char; Allocator = std::allocator<char>; Functor = fu2::abi_400::detail::function<fu2::abi_400::detail::config<false, true, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, int(int)> >; iterator = rspamd::mime::iterator<rspamd::mime::basic_mime_string<char>, false>]’
  536 |         inline auto end() noexcept -> iterator
      |                     ^~~
/usr/include/doctest/doctest.h:1278:31: error: passing ‘const rspamd::mime::basic_mime_string<char>’ as ‘this’ argument discards qualifiers [-fpermissive]
 1278 |             if (it != in.begin()) {
      |                       ~~~~~~~~^~
/<<PKGBUILDDIR>>/src/libmime/mime_string.hxx:526:21: note:   in call to ‘rspamd::mime::basic_mime_string<T, Allocator, Functor>::iterator rspamd::mime::basic_mime_string<T, Allocator, Functor>::begin() [with CharT = char; Allocator = std::allocator<char>; Functor = fu2::abi_400::detail::function<fu2::abi_400::detail::config<false, true, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, int(int)> >; iterator = rspamd::mime::iterator<rspamd::mime::basic_mime_string<char>, false>]’
  526 |         inline auto begin() noexcept -> iterator
      |                     ^~~~~
[317/440] /usr/bin/x86_64-linux-gnu-g++ -DBACKWARD_HAS_BACKT [too-long-redacted] ime/lang_detection_fasttext.cxx
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd build && LC_ALL=C.UTF-8 ninja -j2 -v returned exit code 1
make[1]: *** [debian/rules:53: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:21: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1143390#14
Date:
2026-09-06 13:01:42 UTC
From:
To:
control: tags -1 patch pending

Dear maintainer,

I've prepared an NMU for rspamd (versioned as 4.0.1-1.1) and
uploaded it.

Regards.
Sebastian

#1143390#21
Date:
2026-09-06 13:24:08 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rspamd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1143390@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Andrzej Siewior <sebastian@breakpoint.cc> (supplier of updated rspamd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 06 Sep 2026 14:48:47 +0200
Source: rspamd
Architecture: source
Version: 4.0.1-1.1
Distribution: unstable
Urgency: medium
Maintainer: Sebastien Badia <sbadia@debian.org>
Changed-By: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Closes: 1138355 1143390
Changes:
 rspamd (4.0.1-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Get it compiled against OpenSSL 4 (Closes: 1138355).
   * Get it compiled against newer doctest (Closes: 1143390).
Checksums-Sha1:
 1339ee91e7759be16aa74f31e234744c8d277d99 2183 rspamd_4.0.1-1.1.dsc
 2ccac09888db9eb7cf79becf76bf07e3fabd9b8d 401216 rspamd_4.0.1-1.1.debian.tar.xz
Checksums-Sha256:
 a42bd70750f97737441bc1a711659d09b0a289bb6b5dec61f50939aca8d6e69d 2183 rspamd_4.0.1-1.1.dsc
 18a999bf75d14f56c832b08b0eb5c3090b184ed809c82d9420f7b74d46bdfc26 401216 rspamd_4.0.1-1.1.debian.tar.xz
Files:
 85e704a4015ccfb71af61743ef3b9332 2183 mail optional rspamd_4.0.1-1.1.dsc
 f727968d52cbd55311e3bc976e434a3c 401216 mail optional rspamd_4.0.1-1.1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEEV4kucFIzBRM39v3RBWQfF1cS+lsFAmqdZEkACgkQBWQfF1cS
+lvvHQv9F2SP9fBqt5Zbp1K4m3DnynIRM9OWND4o+emeiHnYI26WXOmq25OWWMR1
ioXQ+JZ3snkHJf2PtXa7d7C+2o0OdUfdxAEW/JJsjgWl+24/lelhQNUAt/T37+3x
Aft6brDFHUXdXGx2c4e9BoOjeAbidHGswbys7mqdD1Puo6jVh8KFOY1sdPZ5AmZZ
BIIOjZC9SY43VAbkg/QLeIhRqxK1rTjNNc62Q64Ot5kYYTxNl0YtsTOX5+/BjuEr
b6Wq/CiGwBm0bI8f/KjiDpp5rWh1xQhBz/1mtX+n8+4Z/vDbo3QMAElFBmthjido
kYNKLpDALC4jqUu9SdSa5ReJBtnXc+sgquvYI/gwyILmJOwUiClZZeMSUAYcMGcr
UG5g30zuI7Z2YWwvF+goM1D4fd+d6Q1aCsu82BYCwRuwsMiyS5OBmegMVR4S1mn4
2FXIB4t3KH3RlCgyKXGEYMEzbpxpM2kx/WdxR4/oZumwNOlm4e23zF4kP5fthapG
alFsoNxI
=Lmm9
-----END PGP SIGNATURE-----