#1096545 drawterm-9front: ftbfs with GCC-15

#1096545#5
Date:
2025-02-17 17:10:37 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/drawterm-9front_0~git20220608.bee4db6-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

[...]
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 poly1305.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 chacha.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 chachablock.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 ccpoly.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 des.c
des.c:92:20: warning: argument 1 of type ‘p9_ulong[32]’ {aka ‘unsigned int[32]’} with mismatched bound [-Warray-parameter=]
   92 | block_cipher(ulong key[32], uchar text[8], int decrypting)
In file included from ../include/libc.h:1,
                 from os.h:2,
                 from des.c:1:
../include/lib.h:49:17: note: previously declared as ‘p9_ulong *’ {aka ‘unsigned int *’}
   49 | #define ulong   p9_ulong
../include/libsec.h:179:22: note: in expansion of macro ‘ulong’
  179 | void    block_cipher(ulong*, uchar*, int);
      |                      ^~~~~
des.c:92:35: warning: argument 2 of type ‘p9_uchar[8]’ {aka ‘unsigned char[8]’} with mismatched bound [-Warray-parameter=]
   92 | block_cipher(ulong key[32], uchar text[8], int decrypting)
../include/lib.h:41:17: note: previously declared as ‘p9_uchar *’ {aka ‘unsigned char *’}
   41 | #define uchar   p9_uchar
../include/libsec.h:179:30: note: in expansion of macro ‘uchar’
  179 | void    block_cipher(ulong*, uchar*, int);
      |                              ^~~~~
des.c:183:54: warning: argument 2 of type ‘p9_uchar[8]’ {aka ‘unsigned char[8]’} with mismatched bound [-Warray-parameter=]
  183 | triple_block_cipher(ulong expanded_key[3][32], uchar text[8], int ende)
../include/lib.h:41:17: note: previously declared as ‘p9_uchar *’ {aka ‘unsigned char *’}
   41 | #define uchar   p9_uchar
../include/libsec.h:210:48: note: in expansion of macro ‘uchar’
  210 | void    triple_block_cipher(ulong keys[3][32], uchar*, int);
      |                                                ^~~~~
des.c:372:36: warning: argument 2 of type ‘p9_ulong *’ {aka ‘unsigned int *’} declared as a pointer [-Warray-parameter=]
  372 | des_key_setup(uchar key[8], ulong *ek)
../include/lib.h:49:17: note: previously declared as an array ‘p9_ulong[32]’ {aka ‘unsigned int[32]’}
   49 | #define ulong   p9_ulong
../include/libsec.h:178:33: note: in expansion of macro ‘ulong’
  178 | void    des_key_setup(uchar[8], ulong[32]);
      |                                 ^~~~~
des.c:474:32: warning: argument 2 of type ‘p9_ulong *’ {aka ‘unsigned int *’} declared as a pointer [-Warray-parameter=]
  474 | key_setup(uchar key[7], ulong *ek)
../include/lib.h:49:17: note: previously declared as an array ‘p9_ulong[32]’ {aka ‘unsigned int[32]’}
   49 | #define ulong   p9_ulong
../include/libsec.h:188:29: note: in expansion of macro ‘ulong’
  188 | void    key_setup(uchar[7], ulong[32]);
      |                             ^~~~~
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 des3CBC.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 desmodes.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 ecc.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 jacobian.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 secp256k1.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 secp256r1.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 secp384r1.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I. -I./include -I./kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -I../kern -c -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 curve25519.c
curve25519.c:228:1: error: conflicting types for ‘fmul’; have ‘void(felem *, felem *, felem *)’ {aka ‘void(long long int *, long long int *, long long int *)’}
  228 | fmul(felem *output, felem *in, felem *in2) {
      | ^~~~
In file included from ../include/unix.h:18,
                 from ../include/dtos.h:2,
                 from ../include/u.h:1,
                 from os.h:1,
                 from curve25519.c:48:
/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h:33:20: note: previous declaration of ‘fmul’ with type ‘float(double,  double)’
   33 | __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2);
      |                    ^~~~~~~~~~~~~~~
make[3]: *** [Makefile:27: curve25519.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6/libsec'
make[2]: *** [Makefile:57: libsec/libsec.a] Error 2
make[2]: Leaving directory '/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6'
make[1]: *** [debian/rules:14: override_dh_auto_build] Error 2
make[1]: Leaving directory '/build/reproducible-path/drawterm-9front-0~git20220608.bee4db6'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1096545#14
Date:
2026-05-23 10:46:15 UTC
From:
To:
Attached debdiff for an NMU (drawterm-9front
0~git20220608.bee4db6-3.1) fixing the GCC 15 / C23 FTBFS.

The fix is a backport of upstream commit
a6c1ce4e0244ca70403dc4e795a9cee548159560 by cinap_lenrek, applied as
debian/patches/0004-fix-ftbfs-gcc15-fmul-rename.patch. It renames the
internal field-element multiplication function fmul() in
libsec/curve25519.c (and its 12 call sites) to fmult(), avoiding the
collision with the new C23 narrowing math function fmul() from
<math.h>.

Built cleanly in a sid amd64 sbuild chroot. Lintian shows no new
errors or warnings. Not a DD - posted for sponsor review.

Regards,
Azeez Syed