#1113458 rapidjson: FTBFS with CMake 4

#1113458#5
Date:
2025-08-31 23:03:46 UTC
From:
To:
Dear maintainer,

During a test rebuild for CMake 4, rapidjson failed to rebuild.

Log Summary:
-------------------------------------------------------------------------------
[...]
7b0DoPT/Gwf1Mi9iQXk2el2reGzEPvA=
=IeB1
-----END PGP SIGNATURE-----

dpkg-source: warning: cannot verify inline signature for ./rapidjson_1.1.0+dfsg2-7.4.dsc: no acceptable signature found
dpkg-source: info: extracting rapidjson in /build/reproducible-path/rapidjson-1.1.0+dfsg2
dpkg-source: info: unpacking rapidjson_1.1.0+dfsg2.orig.tar.gz
dpkg-source: info: unpacking rapidjson_1.1.0+dfsg2-7.4.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying fix-privacy-breach.patch
dpkg-source: info: applying set-doc-dir.diff
dpkg-source: info: applying disable-valgrind_unittest.diff
dpkg-source: info: applying no-jsoncheckertest.diff
dpkg-source: info: applying gcc7.diff
dpkg-source: info: applying 0001-Fix-Wclass-memaccess-warnings-errors.patch
dpkg-source: info: applying 0002-Fix-Wsign-conversion-warnings-errors.patch
dpkg-source: info: applying 0003-Suppress-Wformat-overflow-warning-error.patch
dpkg-source: info: applying python3.diff
dpkg-source: info: applying 0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch
dpkg-source: info: applying 0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch
dpkg-source: info: applying deal-with-Werror-type-limits.patch
dpkg-source: info: applying gcc12_encdedstreamtest.patch
dpkg-source: info: applying gcc12_valuetest.patch
dpkg-source: info: applying 0001-Removed-non-compiling-assignment-operator.-Fixed-718.patch
dpkg-source: info: applying 0002-Explicitly-disable-copy-assignment-operator.patch
dpkg-source: info: applying 0001-Avoid-inheritance-from-std-iterator.patch
dpkg-source: info: applying 0001-Avoid-warnings-when-using-std-c-20-and-clang-10-use-.patch
dpkg-source: info: applying 0001-Three-way-comparison-for-CLang-10-fix-1679.patch
dpkg-source: info: applying 0001-Fix-recursive-operator-call-in-C-20-1846.patch
dpkg-source: info: applying 0001-gate-definition-of-symmetric-equality-operators-on-i.patch
dpkg-source: info: applying 0001-do-not-define-operator-in-C-20.patch
dpkg-source: info: applying CVE-2024-38517.patch

Check disk space
----------------

Sufficient free space for build

User Environment
----------------

APT_CONFIG=/var/lib/sbuild/apt.conf
HOME=/sbuild-nonexistent
LANG=C.UTF-8
LC_ALL=C.UTF-8
LOGNAME=sbuild
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SHELL=/bin/sh
USER=sbuild

dpkg-buildpackage
-----------------

Command: dpkg-buildpackage --sanitize-env -us -uc -b
dpkg-buildpackage: info: source package rapidjson
dpkg-buildpackage: info: source version 1.1.0+dfsg2-7.4
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Bastian Germann <bage@debian.org>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture arm64
 debian/rules clean
dh clean
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/build/reproducible-path/rapidjson-1.1.0+dfsg2'
# Needed since googletest 1.13.0 (see #1041027)
dh_auto_configure -- -DRAPIDJSON_BUILD_CXX11=OFF
	cd obj-aarch64-linux-gnu && DEB_PYTHON_INSTALL_LAYOUT=deb PKG_CONFIG=/usr/bin/pkg-config cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/aarch64-linux-gnu -DRAPIDJSON_BUILD_CXX11=OFF ..
CMake Error at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
-------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/2409984/

The most likely cause of build failures is the removed backwards compatibility for
CMake versions earlier than 3.5. You can find additional information in my
debian-devel announcement:

https://lists.debian.org/debian-devel/2025/04/msg00310.html

About the archive rebuild: The build was made on debusine.debian.net,
using sbuild.

You can find the build task here:
https://debusine.debian.net/work-request/154710/

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

Thanks,
Timo

#1113458#12
Date:
2025-09-01 11:52:29 UTC
From:
To:
I have downgraded the bug to non-RC severity temporarily and reverted
CMake in unstable to version 3.31.6. I plan to re-upgrade in about a
month's time. I realize that despite my April announcement, the upload
to unstable came rather surprising, and I don't want to cause
unnecessary pain.

Also, the build log URL has an unfortunate mistake. The correct URL
should include the workspace, i.e.,

https://debusine.debian.net/debian/developers/artifact/XXXX

CMake 4 will also be available in experimental again, so it can be
used to verify that the bug is fixed.

Cheers
Timo