#1097294 libzim: ftbfs with GCC-15

#1097294#5
Date:
2025-02-17 17:34:35 UTC
From:
To:
[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/libzim_9.2.3-1.1_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

To build with GCC 15, either set CC=gcc-15 CXX=g++-15 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
[6/129] c++ -Itest/creator.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/creator.p/tools.cpp.o -MF test/creator.p/tools.cpp.o.d -o test/creator.p/tools.cpp.o -c ../test/tools.cpp
FAILED: test/creator.p/tools.cpp.o
c++ -Itest/creator.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/creator.p/tools.cpp.o -MF test/creator.p/tools.cpp.o.d -o test/creator.p/tools.cpp.o -c ../test/tools.cpp
In file included from /usr/include/gtest/internal/gtest-port.h:295,
                 from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:63,
                 from ../test/tools.cpp:36:
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
[7/129] c++ -Itest/cluster.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/cluster.p/tools.cpp.o -MF test/cluster.p/tools.cpp.o.d -o test/cluster.p/tools.cpp.o -c ../test/tools.cpp
FAILED: test/cluster.p/tools.cpp.o
c++ -Itest/cluster.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/cluster.p/tools.cpp.o -MF test/cluster.p/tools.cpp.o.d -o test/cluster.p/tools.cpp.o -c ../test/tools.cpp
In file included from /usr/include/gtest/internal/gtest-port.h:295,
                 from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:63,
                 from ../test/tools.cpp:36:
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
[8/129] c++ -Isrc/libzim.so.9.2.3.p -Isrc -I../src -Iinclude -I../include -Istatic -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libzim.so.9.2.3.p/buffer_reader.cpp.o -MF src/libzim.so.9.2.3.p/buffer_reader.cpp.o.d -o src/libzim.so.9.2.3.p/buffer_reader.cpp.o -c ../src/buffer_reader.cpp
[9/129] c++ -Isrc/libzim.so.9.2.3.p -Isrc -I../src -Iinclude -I../include -Istatic -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libzim.so.9.2.3.p/archive.cpp.o -MF src/libzim.so.9.2.3.p/archive.cpp.o.d -o src/libzim.so.9.2.3.p/archive.cpp.o -c ../src/archive.cpp
[10/129] c++ -Itest/lrucache.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/lrucache.p/lrucache.cpp.o -MF test/lrucache.p/lrucache.cpp.o.d -o test/lrucache.p/lrucache.cpp.o -c ../test/lrucache.cpp
FAILED: test/lrucache.p/lrucache.cpp.o
c++ -Itest/lrucache.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/lrucache.p/lrucache.cpp.o -MF test/lrucache.p/lrucache.cpp.o.d -o test/lrucache.p/lrucache.cpp.o -c ../test/lrucache.cpp
In file included from /usr/include/gtest/internal/gtest-port.h:295,
                 from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:63,
                 from ../test/lrucache.cpp:34:
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
[11/129] c++ -Itest/cluster.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/cluster.p/cluster.cpp.o -MF test/cluster.p/cluster.cpp.o.d -o test/cluster.p/cluster.cpp.o -c ../test/cluster.cpp
FAILED: test/cluster.p/cluster.cpp.o
c++ -Itest/cluster.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/cluster.p/cluster.cpp.o -MF test/cluster.p/cluster.cpp.o.d -o test/cluster.p/cluster.cpp.o -c ../test/cluster.cpp
In file included from /usr/include/gtest/internal/gtest-port.h:295,
                 from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:63,
                 from ../test/cluster.cpp:45:
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
[12/129] c++ -Itest/creator.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/creator.p/creator.cpp.o -MF test/creator.p/creator.cpp.o.d -o test/creator.p/creator.cpp.o -c ../test/creator.cpp
FAILED: test/creator.p/creator.cpp.o
c++ -Itest/creator.p -Iinclude -I../include -Isrc -I../src -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Werror -std=c++17 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLIBZIM_EXPORT_PRIVATE_DLL -g -O2 -ffile-prefix-map=/build/reproducible-path/libzim-9.2.3=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -DWITH_TEST_DATA=0 -MD -MQ test/creator.p/creator.cpp.o -MF test/creator.p/creator.cpp.o.d -o test/creator.p/creator.cpp.o -c ../test/creator.cpp
In file included from /usr/include/gtest/internal/gtest-port.h:295,
                 from /usr/include/gtest/gtest-message.h:57,
                 from /usr/include/gtest/gtest-assertion-result.h:46,
                 from /usr/include/gtest/gtest.h:63,
                 from ../test/creator.cpp:38:
/usr/include/c++/15/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
   46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j8 -v returned exit code 1
make: *** [debian/rules:11: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2