Timo Röhling
2025-04-23 19:50:01 UTC
Reply
PermalinkCMake has deprecated backwards compatibility for versions older than 3.5
since July 2023, and the CMake 4.0 release finally drops support,
causing all packages still relying (or declaring to rely) on older
behavior to FTBFS.
Trixie will ship with CMake 3.31, so this issue is only relevant for the
Forky release cycle. However, I plan to file forky tagged bugs early, so
that maintainers are aware and can forward the bug to upstream as
needed.
I have rebuilt the ~3000 packages which build-depend on CMake with
debusine (thanks to Freexian for this helpful service and Stefano Rivera
for his debusine-rebuilds tool) and discovered 936 affected packages;
the dd-list is attached.
If you want to fix your package, there are two options:
1) Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to dh_auto_configure, which
will override any CMakeLists.txt settings. This is the minimally
invasive procedure, no patching required. See also [1].
2) Patch CMakeLists.txt and use the "..." range syntax to add a
supported maximum version, e.g., cmake_minimum_required(VERSION
3.2...3.31). This is the recommended way to submit bugfixes to upstream.
In both cases, you should verify that CMake still behaves how the
package expects it. If your package builds reproducibly, you can easily
check that the binary packages remain unchanged. Alternatively, you can
look for policy warnings in the current build logs, which will point you
towards potential problems.
Cheers
Timo
[1]
https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_VERSION_MINIMUM.html
--
â¢â£Žâ Ÿâ »â¢¶â£Šâ ââââââââââââââââââââââââââââââââââââââââââââââââââââââ®
⣟â ⢠â â ⣿⡠â Timo Röhling â
⢿â¡â â ·â â â â 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA â
â â ³â£â â â â â°âââââââââââââââââââââââââââââââââââââââââââââââââââââ¯
â¢â£Žâ Ÿâ »â¢¶â£Šâ ââââââââââââââââââââââââââââââââââââââââââââââââââââââ®
⣟â ⢠â â ⣿⡠â Timo Röhling â
⢿â¡â â ·â â â â 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA â
â â ³â£â â â â â°âââââââââââââââââââââââââââââââââââââââââââââââââââââ¯