Subject: mbedtls: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:36:54 +0000

Package: src:mbedtls
Version: 3.6.2-3
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[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/mbedtls_3.6.2-3_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

[...]
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_client.c.o
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_driver_wrappers_no_static.c.o
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_ecp.c.o
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_ffdh.c.o
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_hash.c.o
[ 25%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_mac.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_pake.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_rsa.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_se.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_slot_management.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_storage.c.o
[ 26%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_its_file.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_util.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/ripemd160.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/rsa.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/rsa_alt_helpers.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/sha1.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/sha256.c.o
[ 27%] Building C object library/CMakeFiles/mbedcrypto.dir/sha512.c.o
[ 28%] Building C object library/CMakeFiles/mbedcrypto.dir/sha3.c.o
[ 28%] Building C object library/CMakeFiles/mbedcrypto.dir/threading.c.o
[ 28%] Building C object library/CMakeFiles/mbedcrypto.dir/timing.c.o
[ 28%] Building C object library/CMakeFiles/mbedcrypto.dir/version.c.o
[ 28%] Building C object library/CMakeFiles/mbedcrypto.dir/version_features.c.o
[ 28%] Linking C static library libmbedcrypto.a
cd /build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu/library && /usr/bin/cmake -P CMakeFiles/mbedcrypto_static.dir/cmake_clean_target.cmake
cd /build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu/library && /usr/bin/cmake -E cmake_link_script CMakeFiles/mbedcrypto_static.dir/link.txt --verbose=1
/usr/bin/ar qc libmbedcrypto.a CMakeFiles/mbedcrypto_static.dir/aes.c.o CMakeFiles/mbedcrypto_static.dir/aesni.c.o CMakeFiles/mbedcrypto_static.dir/aesce.c.o CMakeFiles/mbedcrypto_static.dir/aria.c.o CMakeFiles/mbedcrypto_static.dir/asn1parse.c.o CMakeFiles/mbedcrypto_static.dir/asn1write.c.o CMakeFiles/mbedcrypto_static.dir/base64.c.o CMakeFiles/mbedcrypto_static.dir/bignum.c.o CMakeFiles/mbedcrypto_static.dir/bignum_core.c.o CMakeFiles/mbedcrypto_static.dir/bignum_mod.c.o CMakeFiles/mbedcrypto_static.dir/bignum_mod_raw.c.o CMakeFiles/mbedcrypto_static.dir/block_cipher.c.o CMakeFiles/mbedcrypto_static.dir/camellia.c.o CMakeFiles/mbedcrypto_static.dir/ccm.c.o CMakeFiles/mbedcrypto_static.dir/chacha20.c.o CMakeFiles/mbedcrypto_static.dir/chachapoly.c.o CMakeFiles/mbedcrypto_static.dir/cipher.c.o CMakeFiles/mbedcrypto_static.dir/cipher_wrap.c.o CMakeFiles/mbedcrypto_static.dir/constant_time.c.o CMakeFiles/mbedcrypto_static.dir/cmac.c.o CMakeFiles/mbedcrypto_static.dir/ctr_drbg.c.o CMakeFiles/mbedcrypto_static.dir/des.c.o CMakeFiles/mbedcrypto_static.dir/dhm.c.o CMakeFiles/mbedcrypto_static.dir/ecdh.c.o CMakeFiles/mbedcrypto_static.dir/ecdsa.c.o CMakeFiles/mbedcrypto_static.dir/ecjpake.c.o CMakeFiles/mbedcrypto_static.dir/ecp.c.o CMakeFiles/mbedcrypto_static.dir/ecp_curves.c.o CMakeFiles/mbedcrypto_static.dir/ecp_curves_new.c.o CMakeFiles/mbedcrypto_static.dir/entropy.c.o CMakeFiles/mbedcrypto_static.dir/entropy_poll.c.o CMakeFiles/mbedcrypto_static.dir/error.c.o CMakeFiles/mbedcrypto_static.dir/gcm.c.o CMakeFiles/mbedcrypto_static.dir/hkdf.c.o CMakeFiles/mbedcrypto_static.dir/hmac_drbg.c.o CMakeFiles/mbedcrypto_static.dir/lmots.c.o CMakeFiles/mbedcrypto_static.dir/lms.c.o CMakeFiles/mbedcrypto_static.dir/md.c.o CMakeFiles/mbedcrypto_static.dir/md5.c.o CMakeFiles/mbedcrypto_static.dir/memory_buffer_alloc.c.o CMakeFiles/mbedcrypto_static.dir/nist_kw.c.o CMakeFiles/mbedcrypto_static.dir/oid.c.o CMakeFiles/mbedcrypto_static.dir/padlock.c.o CMakeFiles/mbedcrypto_static.dir/pem.c.o CMakeFiles/mbedcrypto_static.dir/pk.c.o CMakeFiles/mbedcrypto_static.dir/pk_ecc.c.o CMakeFiles/mbedcrypto_static.dir/pk_wrap.c.o CMakeFiles/mbedcrypto_static.dir/pkcs12.c.o CMakeFiles/mbedcrypto_static.dir/pkcs5.c.o CMakeFiles/mbedcrypto_static.dir/pkparse.c.o CMakeFiles/mbedcrypto_static.dir/pkwrite.c.o CMakeFiles/mbedcrypto_static.dir/platform.c.o CMakeFiles/mbedcrypto_static.dir/platform_util.c.o CMakeFiles/mbedcrypto_static.dir/poly1305.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_aead.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_cipher.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_client.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_driver_wrappers_no_static.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_ecp.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_ffdh.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_hash.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_mac.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_pake.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_rsa.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_se.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_slot_management.c.o CMakeFiles/mbedcrypto_static.dir/psa_crypto_storage.c.o CMakeFiles/mbedcrypto_static.dir/psa_its_file.c.o CMakeFiles/mbedcrypto_static.dir/psa_util.c.o CMakeFiles/mbedcrypto_static.dir/ripemd160.c.o CMakeFiles/mbedcrypto_static.dir/rsa.c.o CMakeFiles/mbedcrypto_static.dir/rsa_alt_helpers.c.o CMakeFiles/mbedcrypto_static.dir/sha1.c.o CMakeFiles/mbedcrypto_static.dir/sha256.c.o CMakeFiles/mbedcrypto_static.dir/sha512.c.o CMakeFiles/mbedcrypto_static.dir/sha3.c.o CMakeFiles/mbedcrypto_static.dir/threading.c.o CMakeFiles/mbedcrypto_static.dir/timing.c.o CMakeFiles/mbedcrypto_static.dir/version.c.o CMakeFiles/mbedcrypto_static.dir/version_features.c.o
/usr/bin/ranlib libmbedcrypto.a
make[3]: Leaving directory '/build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu'
[ 28%] Built target mbedcrypto_static
[ 28%] Linking C shared library libmbedcrypto.so
cd /build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu/library && /usr/bin/cmake -E cmake_link_script CMakeFiles/mbedcrypto.dir/link.txt --verbose=1
/usr/bin/ld: warning: -z deb-canary-084b6fbb10729ed4da8c3d3f5a3ae7c9 ignored
/usr/bin/cc -fPIC -g -O2 -Werror=implicit-function-declaration -Werror=array-bounds -Werror=clobbered -Werror=volatile-register-var -D__DEB_CANARY_CFLAGS_084b6fbb10729ed4da8c3d3f5a3ae7c9__ -ffile-prefix-map=/build/reproducible-path/mbedtls-3.6.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -D__DEB_CANARY_CPPFLAGS_084b6fbb10729ed4da8c3d3f5a3ae7c9__ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wwrite-strings -Wmissing-prototypes -Wformat=2 -Wno-format-nonliteral -Wvla -Wlogical-op -Wshadow -Wformat-signedness -Wformat-overflow=2 -Wformat-truncation -Werror -Wmissing-declarations -Wl,--dependency-file=CMakeFiles/mbedcrypto.dir/link.d -Wl,-z,deb-canary-084b6fbb10729ed4da8c3d3f5a3ae7c9 -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmbedcrypto.so.16 -o libmbedcrypto.so.3.6.2 CMakeFiles/mbedcrypto.dir/aes.c.o CMakeFiles/mbedcrypto.dir/aesni.c.o CMakeFiles/mbedcrypto.dir/aesce.c.o CMakeFiles/mbedcrypto.dir/aria.c.o CMakeFiles/mbedcrypto.dir/asn1parse.c.o CMakeFiles/mbedcrypto.dir/asn1write.c.o CMakeFiles/mbedcrypto.dir/base64.c.o CMakeFiles/mbedcrypto.dir/bignum.c.o CMakeFiles/mbedcrypto.dir/bignum_core.c.o CMakeFiles/mbedcrypto.dir/bignum_mod.c.o CMakeFiles/mbedcrypto.dir/bignum_mod_raw.c.o CMakeFiles/mbedcrypto.dir/block_cipher.c.o CMakeFiles/mbedcrypto.dir/camellia.c.o CMakeFiles/mbedcrypto.dir/ccm.c.o CMakeFiles/mbedcrypto.dir/chacha20.c.o CMakeFiles/mbedcrypto.dir/chachapoly.c.o CMakeFiles/mbedcrypto.dir/cipher.c.o CMakeFiles/mbedcrypto.dir/cipher_wrap.c.o CMakeFiles/mbedcrypto.dir/constant_time.c.o CMakeFiles/mbedcrypto.dir/cmac.c.o CMakeFiles/mbedcrypto.dir/ctr_drbg.c.o CMakeFiles/mbedcrypto.dir/des.c.o CMakeFiles/mbedcrypto.dir/dhm.c.o CMakeFiles/mbedcrypto.dir/ecdh.c.o CMakeFiles/mbedcrypto.dir/ecdsa.c.o CMakeFiles/mbedcrypto.dir/ecjpake.c.o CMakeFiles/mbedcrypto.dir/ecp.c.o CMakeFiles/mbedcrypto.dir/ecp_curves.c.o CMakeFiles/mbedcrypto.dir/ecp_curves_new.c.o CMakeFiles/mbedcrypto.dir/entropy.c.o CMakeFiles/mbedcrypto.dir/entropy_poll.c.o CMakeFiles/mbedcrypto.dir/error.c.o CMakeFiles/mbedcrypto.dir/gcm.c.o CMakeFiles/mbedcrypto.dir/hkdf.c.o CMakeFiles/mbedcrypto.dir/hmac_drbg.c.o CMakeFiles/mbedcrypto.dir/lmots.c.o CMakeFiles/mbedcrypto.dir/lms.c.o CMakeFiles/mbedcrypto.dir/md.c.o CMakeFiles/mbedcrypto.dir/md5.c.o CMakeFiles/mbedcrypto.dir/memory_buffer_alloc.c.o CMakeFiles/mbedcrypto.dir/nist_kw.c.o CMakeFiles/mbedcrypto.dir/oid.c.o CMakeFiles/mbedcrypto.dir/padlock.c.o CMakeFiles/mbedcrypto.dir/pem.c.o CMakeFiles/mbedcrypto.dir/pk.c.o CMakeFiles/mbedcrypto.dir/pk_ecc.c.o CMakeFiles/mbedcrypto.dir/pk_wrap.c.o CMakeFiles/mbedcrypto.dir/pkcs12.c.o CMakeFiles/mbedcrypto.dir/pkcs5.c.o CMakeFiles/mbedcrypto.dir/pkparse.c.o CMakeFiles/mbedcrypto.dir/pkwrite.c.o CMakeFiles/mbedcrypto.dir/platform.c.o CMakeFiles/mbedcrypto.dir/platform_util.c.o CMakeFiles/mbedcrypto.dir/poly1305.c.o CMakeFiles/mbedcrypto.dir/psa_crypto.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_aead.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_cipher.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_client.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_driver_wrappers_no_static.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_ecp.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_ffdh.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_hash.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_mac.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_pake.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_rsa.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_se.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_slot_management.c.o CMakeFiles/mbedcrypto.dir/psa_crypto_storage.c.o CMakeFiles/mbedcrypto.dir/psa_its_file.c.o CMakeFiles/mbedcrypto.dir/psa_util.c.o CMakeFiles/mbedcrypto.dir/ripemd160.c.o CMakeFiles/mbedcrypto.dir/rsa.c.o CMakeFiles/mbedcrypto.dir/rsa_alt_helpers.c.o CMakeFiles/mbedcrypto.dir/sha1.c.o CMakeFiles/mbedcrypto.dir/sha256.c.o CMakeFiles/mbedcrypto.dir/sha512.c.o CMakeFiles/mbedcrypto.dir/sha3.c.o CMakeFiles/mbedcrypto.dir/threading.c.o CMakeFiles/mbedcrypto.dir/timing.c.o CMakeFiles/mbedcrypto.dir/version.c.o CMakeFiles/mbedcrypto.dir/version_features.c.o
cd /build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu/library && /usr/bin/cmake -E cmake_symlink_library libmbedcrypto.so.3.6.2 libmbedcrypto.so.16 libmbedcrypto.so
make[3]: Leaving directory '/build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu'
[ 28%] Built target mbedcrypto
make[2]: Leaving directory '/build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:149: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/mbedtls-3.6.2/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j8 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:25: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2