#1112819 ctre: FTBFS with CMake 4

Package:
src:ctre
Source:
src:ctre
Submitter:
Date:
2025-09-18 17:51:11 UTC
Severity:
normal
Tags:
#1112819#5
Date:
2025-08-31 22:51:58 UTC
From:
To:
Dear maintainer,

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

Log Summary:
-------------------------------------------------------------------------------
[...]
[85/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-wide-pattern.a && /usr/bin/ar qc tests/libctre-test-wide-pattern.a  tests/CMakeFiles/ctre-test-wide-pattern.dir/wide-pattern.cpp.o && /usr/bin/ranlib tests/libctre-test-wide-pattern.a && :
[86/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-results.a && /usr/bin/ar qc tests/libctre-test-results.a  tests/CMakeFiles/ctre-test-results.dir/results.cpp.o && /usr/bin/ranlib tests/libctre-test-results.a && :
[87/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-z_matching.dir/z_matching.cpp.o -MF tests/CMakeFiles/ctre-test-z_matching.dir/z_matching.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-z_matching.dir/z_matching.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-z_matching.dir/z_matching.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/z_matching.cpp
[88/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-z_matching.a && /usr/bin/ar qc tests/libctre-test-z_matching.a  tests/CMakeFiles/ctre-test-z_matching.dir/z_matching.cpp.o && /usr/bin/ranlib tests/libctre-test-z_matching.a && :
[89/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-trampoline.dir/trampoline.cpp.o -MF tests/CMakeFiles/ctre-test-trampoline.dir/trampoline.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-trampoline.dir/trampoline.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-trampoline.dir/trampoline.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/trampoline.cpp
[90/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-trampoline.a && /usr/bin/ar qc tests/libctre-test-trampoline.a  tests/CMakeFiles/ctre-test-trampoline.dir/trampoline.cpp.o && /usr/bin/ranlib tests/libctre-test-trampoline.a && :
[91/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-matching3.dir/matching3.cpp.o -MF tests/CMakeFiles/ctre-test-matching3.dir/matching3.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-matching3.dir/matching3.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-matching3.dir/matching3.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/matching3.cpp
[92/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-matching3.a && /usr/bin/ar qc tests/libctre-test-matching3.a  tests/CMakeFiles/ctre-test-matching3.dir/matching3.cpp.o && /usr/bin/ranlib tests/libctre-test-matching3.a && :
[93/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-parsing.dir/parsing.cpp.o -MF tests/CMakeFiles/ctre-test-parsing.dir/parsing.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-parsing.dir/parsing.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-parsing.dir/parsing.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/parsing.cpp
[94/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-parsing.a && /usr/bin/ar qc tests/libctre-test-parsing.a  tests/CMakeFiles/ctre-test-parsing.dir/parsing.cpp.o && /usr/bin/ranlib tests/libctre-test-parsing.a && :
[95/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-matching2-msvc-greedy.dir/matching2-msvc-greedy.cpp.o -MF tests/CMakeFiles/ctre-test-matching2-msvc-greedy.dir/matching2-msvc-greedy.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-matching2-msvc-greedy.dir/matching2-msvc-greedy.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-matching2-msvc-greedy.dir/matching2-msvc-greedy.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/matching2-msvc-greedy.cpp
[96/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-matching2-msvc-greedy.a && /usr/bin/ar qc tests/libctre-test-matching2-msvc-greedy.a  tests/CMakeFiles/ctre-test-matching2-msvc-greedy.dir/matching2-msvc-greedy.cpp.o && /usr/bin/ranlib tests/libctre-test-matching2-msvc-greedy.a && :
[97/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-matching2.dir/matching2.cpp.o -MF tests/CMakeFiles/ctre-test-matching2.dir/matching2.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-matching2.dir/matching2.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-matching2.dir/matching2.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/matching2.cpp
[98/101] : && /usr/bin/cmake -E rm -f tests/libctre-test-matching2.a && /usr/bin/ar qc tests/libctre-test-matching2.a  tests/CMakeFiles/ctre-test-matching2.dir/matching2.cpp.o && /usr/bin/ranlib tests/libctre-test-matching2.a && :
[99/101] /usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o -MF tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/generating.cpp
FAILED: tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o
/usr/bin/c++  -I/build/reproducible-path/ctre-3.10.0+ds/include -g -O2 -ffile-prefix-map=/build/reproducible-path/ctre-3.10.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++20 -MD -MT tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o -MF tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o.d -fmodules-ts -fmodule-mapper=tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o tests/CMakeFiles/ctre-test-generating.dir/generating.cpp.o -c /build/reproducible-path/ctre-3.10.0+ds/tests/generating.cpp
/build/reproducible-path/ctre-3.10.0+ds/tests/generating.cpp:56:21: error: static assertion failed
   56 | static_assert(same_f(CTRE_GEN("\\x80"), ctre::character<char32_t{0x80}>()));
      |               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/ctre-3.10.0+ds/tests/generating.cpp:57:21: error: static assertion failed
   57 | static_assert(same_f(CTRE_GEN("\\xFF"), ctre::character<char32_t{0xFF}>()));
      |               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/ctre-3.10.0+ds/tests/generating.cpp:58:21: error: static assertion failed
   58 | static_assert(same_f(CTRE_GEN("\\x{FF}"), ctre::character<char32_t{0xFF}>()));
      |               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

make[1]: *** [debian/rules:29: override_dh_auto_test] Error 1
make[1]: Leaving directory '/build/reproducible-path/ctre-3.10.0+ds'
make: *** [debian/rules:12: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2025-08-29T16:14:58Z
-------------------------------------------------------------------------------

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/2390760/

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/152640/

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

#1112819#12
Date:
2025-09-01 11:51:14 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

#1112819#17
Date:
2025-09-12 14:44:33 UTC
From:
To:
Hi Timo,

Thanks for your work on upgrading cmake!

This does look like any cmake-related issue to me. I tested current ctre 3.10.0+ds-1 with:

- cmake 3.11 + gcc 15.2.0-4
- cmake 4 + gcc 15.2.0-4

And both compile without issues on my amd64 machine.

Since you are using arm64 machine, and arm is known to has different signedness on char types, I
will try to investigate more into this issue, maybe on a porter box.

Thanks,
Shengqi Chen

#1112819#24
Date:
2025-09-12 15:08:09 UTC
From:
To:
Hi Timo,

I’ve confirmed this is a platform-specific issue.
I've contacted upstream and will include a patch to fix this later.

Thank you for finding this out and reporting it!
You could remove the cmake user tags from this bug if you want.

Thanks,
Shengqi Chen