Bug#1113352: opencc: FTBFS with CMake 4
Source: opencc
Version: 1.1.9+ds1-1
Severity: serious
User: cmake@packages.debian.org
Usertags: cmake-4
Tags: ftbfs, forky, sid
Dear maintainer,
During a test rebuild for CMake 4, opencc failed to rebuild.
Log Summary:
-------------------------------------------------------------------------------
[...]
cd /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/src && /usr/bin/cmake -E cmake_symlink_library libopencc.so.1.1.9 libopencc.so.1.1 libopencc.so
make[3]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
[ 24%] Built target libopencc
make -f CMakeFiles/opencc_clib.dir/build.make CMakeFiles/opencc_clib.dir/depend
make[3]: Entering directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
cd /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/opencc-1.1.9+ds1 /build/reproducible-path/opencc-1.1.9+ds1 /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/CMakeFiles/opencc_clib.dir/DependInfo.cmake "--color="
make[3]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
make -f CMakeFiles/opencc_clib.dir/build.make CMakeFiles/opencc_clib.dir/build
make[3]: Entering directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
[ 25%] Building CXX object CMakeFiles/opencc_clib.dir/src/py_opencc.cpp.o
/usr/bin/c++ -DCMAKE_SOURCE_DIR=\"/build/reproducible-path/opencc-1.1.9+ds1\" -DENABLE_DARTS -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE_NAME=\"opencc\" -DPKGDATADIR=\"/usr/share/opencc\" -DPROJECT_BINARY_DIR=\"/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu\" -DVERSION=\"1.1.9\" -Dopencc_clib_EXPORTS -I/build/reproducible-path/opencc-1.1.9+ds1/src -isystem /usr/include/python3.13 -g -O2 -ffile-prefix-map=/build/reproducible-path/opencc-1.1.9+ds1=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -fPIC -fvisibility=hidden -std=c++14 -Wall -flto -fno-fat-lto-objects -MD -MT CMakeFiles/opencc_clib.dir/src/py_opencc.cpp.o -MF CMakeFiles/opencc_clib.dir/src/py_opencc.cpp.o.d -o CMakeFiles/opencc_clib.dir/src/py_opencc.cpp.o -c /build/reproducible-path/opencc-1.1.9+ds1/src/py_opencc.cpp
[ 27%] Linking CXX shared module opencc_clib.cpython-313-aarch64-linux-gnu.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/opencc_clib.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/opencc-1.1.9+ds1=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -flto -Wl,--dependency-file=CMakeFiles/opencc_clib.dir/link.d -shared -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o opencc_clib.cpython-313-aarch64-linux-gnu.so CMakeFiles/opencc_clib.dir/src/py_opencc.cpp.o -Wl,-rpath,/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/src src/libopencc.so.1.1.9 -lmarisa
/usr/bin/strip /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/opencc_clib.cpython-313-aarch64-linux-gnu.so
make[3]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
[ 27%] Built target opencc_clib
make -f googletest-build/CMakeFiles/gtest.dir/build.make googletest-build/CMakeFiles/gtest.dir/depend
make[3]: Entering directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
cd /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/opencc-1.1.9+ds1 /usr/src/googletest/googletest /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/googletest-build /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/googletest-build/CMakeFiles/gtest.dir/DependInfo.cmake "--color="
make[3]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
make -f googletest-build/CMakeFiles/gtest.dir/build.make googletest-build/CMakeFiles/gtest.dir/build
make[3]: Entering directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
[ 28%] Building CXX object googletest-build/CMakeFiles/gtest.dir/src/gtest-all.cc.o
cd /build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu/googletest-build && /usr/bin/c++ -DCMAKE_SOURCE_DIR=\"/build/reproducible-path/opencc-1.1.9+ds1\" -DENABLE_DARTS -DGTEST_CREATE_SHARED_LIBRARY=1 -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE_NAME=\"opencc\" -DPKGDATADIR=\"/usr/share/opencc\" -DPROJECT_BINARY_DIR=\"/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu\" -DVERSION=\"1.1.9\" -Dgtest_EXPORTS -I/usr/src/googletest/googletest/include -I/usr/src/googletest/googletest -g -O2 -ffile-prefix-map=/build/reproducible-path/opencc-1.1.9+ds1=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -fPIC -std=c++14 -Wall -Wall -Wshadow -Wundef -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -MD -MT googletest-build/CMakeFiles/gtest.dir/src/gtest-all.cc.o -MF CMakeFiles/gtest.dir/src/gtest-all.cc.o.d -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /usr/src/googletest/googletest/src/gtest-all.cc
In file included from /usr/src/googletest/googletest/include/gtest/gtest-message.h:57,
from /usr/src/googletest/googletest/include/gtest/gtest-assertion-result.h:46,
from /usr/src/googletest/googletest/include/gtest/gtest.h:63,
from /usr/src/googletest/googletest/src/gtest-all.cc:38:
/usr/src/googletest/googletest/include/gtest/internal/gtest-port.h:273:2: error: #error C++ versions less than C++17 are not supported.
273 | #error C++ versions less than C++17 are not supported.
| ^~~~~
In file included from /usr/src/googletest/googletest/include/gtest/gtest.h:67:
/usr/src/googletest/googletest/include/gtest/gtest-param-test.h:483:56: error: missing template arguments before ‘(’ token
483 | typename StdFunction = decltype(std::function(std::declval<Func>()))>
| ^
/usr/src/googletest/googletest/include/gtest/gtest-param-test.h:493:56: error: missing template arguments before ‘(’ token
493 | typename StdFunction = decltype(std::function(std::declval<Func>()))>
| ^
/usr/src/googletest/googletest/include/gtest/gtest-param-test.h: In function ‘auto testing::ConvertGenerator(Gen&&, Func&&)’:
/usr/src/googletest/googletest/include/gtest/gtest-param-test.h:497:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
497 | if constexpr (is_single_arg_std_function) {
| ^~~~~~~~~
make[3]: *** [googletest-build/CMakeFiles/gtest.dir/build.make:82: googletest-build/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:1966: googletest-build/CMakeFiles/gtest.dir/all] Error 2
make[2]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
make[1]: *** [Makefile:169: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/opencc-1.1.9+ds1/obj-aarch64-linux-gnu'
dh_auto_build: error: cd obj-aarch64-linux-gnu && make -j1 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:14: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2025-08-30T11:17:57Z
-------------------------------------------------------------------------------
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/2406032/
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/154324/
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
Reply to: