Subject: epic4: ftbfs with GCC-15

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

Package: src:epic4
Version: 1:2.10.10-1.2
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/epic4_2.10.10-1.2_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

[...]
   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   69 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   70 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
dcc.c: In function ‘DCC_close_filesend’:
dcc.c:3300:55: warning: ‘%2.6g’ directive output may be truncated writing between 2 and 13 bytes into a region of size 10 [-Wformat-truncation=]
 3300 |         snprintf(lame_ultrix3, sizeof(lame_ultrix3), "%2.6g", xtime);
      |                                                       ^~~~~
dcc.c:3300:54: note: assuming directive output of 12 bytes
 3300 |         snprintf(lame_ultrix3, sizeof(lame_ultrix3), "%2.6g", xtime);
      |                                                      ^~~~~~~
In function ‘snprintf’,
    inlined from ‘DCC_close_filesend’ at dcc.c:3300:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:68:10: note: ‘__builtin___snprintf_chk’ output between 3 and 14 bytes into a destination of size 10
   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   69 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   70 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/epic4-2.10.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -I./../include -I../include -c debug.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/epic4-2.10.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -I./../include -I../include -c exec.c
exec.c: In function ‘execcmd’:
exec.c:510:25: warning: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  510 |                         setuid(getuid());
      |                         ^~~~~~~~~~~~~~~~
exec.c:511:25: warning: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  511 |                         setgid(getgid());
      |                         ^~~~~~~~~~~~~~~~
exec.c: In function ‘text_to_process’:
exec.c:958:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  958 |         write(proc->p_stdin, my_buffer, strlen(my_buffer));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/epic4-2.10.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -I./../include -I../include -c files.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/epic4-2.10.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -I./../include -I../include -c flood.c
gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/epic4-2.10.10=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -I./../include -I../include -c functions.c
functions.c:3582:7: error: conflicting types for ‘crypt’; have ‘char *(void)’
 3582 | char *crypt();
      |       ^~~~~
In file included from ./../include/irc_std.h:42,
                 from ./../include/irc.h:28,
                 from functions.c:45:
/usr/include/unistd.h:1162:14: note: previous declaration of ‘crypt’ with type ‘char *(const char *, const char *)’
 1162 | extern char *crypt (const char *__key, const char *__salt)
      |              ^~~~~
functions.c: In function ‘function_crypt’:
functions.c:3594:15: error: too many arguments to function ‘crypt’; expected 0, have 2
 3594 |         ret = crypt(pass, seed);
      |               ^~~~~ ~~~~
functions.c:3582:7: note: declared here
 3582 | char *crypt();
      |       ^~~~~
functions.c: In function ‘function_randread’:
functions.c:4689:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 4689 |         fgets(buffer, BIG_BUFFER_SIZE, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
functions.c:4690:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 4690 |         fgets(buffer, BIG_BUFFER_SIZE, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
functions.c:4694:17: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 4694 |                 fgets(buffer, BIG_BUFFER_SIZE, fp);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:31: functions.o] Error 1
make[2]: Leaving directory '/build/reproducible-path/epic4-2.10.10/source'
make[1]: *** [Makefile:112: epic] Error 2
make[1]: Leaving directory '/build/reproducible-path/epic4-2.10.10'
make: *** [debian/rules:16: build-stamp] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2