Subject: wdm: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 18:00:02 +0000

Package: src:wdm
Version: 1.28-27
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/wdm_1.28-27_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

[...]
   dh_auto_build
	make -j8
make[1]: Entering directory '/build/reproducible-path/wdm-1.28'
src/libwdm/plcheckers.c: In function ‘WDMCheckPLBool’:
src/libwdm/plcheckers.c:37:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   37 |         *bool_target = (Bool)def;
      |                        ^
src/TestLogin/TestLogin.c: In function ‘main’:
src/TestLogin/TestLogin.c:186:9: warning: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  186 |         pipe(filedescriptor);
      |         ^~~~~~~~~~~~~~~~~~~~
src/wdm/Greet.c:143:19: error: conflicting types for ‘systemEnv’; have ‘char **(void)’
  143 | extern  char    **systemEnv();
      |                   ^~~~~~~~~
In file included from src/wdm/Greet.c:97:
./include/dm.h:438:15: note: previous declaration of ‘systemEnv’ with type ‘char **(struct display *, char *, char *)’
  438 | extern char **systemEnv (struct display *d, char *user, char *home);
      |               ^~~~~~~~~
src/wdm/Greet.c: In function ‘InitGreet’:
src/wdm/Greet.c:219:24: error: too many arguments to function ‘systemEnv’; expected 0, have 3
  219 |         env = (char **)systemEnv(d, (char*)NULL, FAKEHOME);
      |                        ^~~~~~~~~ ~
src/wdm/Greet.c:143:19: note: declared here
  143 | extern  char    **systemEnv();
      |                   ^~~~~~~~~
src/wdm/Greet.c: In function ‘GreetUser’:
src/wdm/Greet.c:359:48: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  359 |         WDMDebug("Greet greet done: %s, pwlen=%i\n", name, strlen(password));
      |                                               ~^           ~~~~~~~~~~~~~~~~
      |                                                |           |
      |                                                int         size_t {aka long unsigned int}
      |                                               %li
src/wdm/Greet.c:378:25: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  378 |                         system(wdmReboot);
      |                         ^~~~~~~~~~~~~~~~~
src/wdm/Greet.c:384:25: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  384 |                         system(wdmHalt);
      |                         ^~~~~~~~~~~~~~~
src/wdm/Greet.c: In function ‘InitGreet’:
src/wdm/Greet.c:203:5: warning: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  203 |     pipe(pipe_filedes);
      |     ^~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:128: src/wdm/Greet.o] Error 1
make[1]: *** Waiting for unfinished jobs....
src/wdm/auth.c: In function ‘MakeServerAuthFile’:
src/wdm/auth.c:299:48: warning: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  299 |                                         (void) chown(d->authFile,
      |                                                ^~~~~~~~~~~~~~~~~~
  300 |                                                      0, statb.st_gid);
      |                                                      ~~~~~~~~~~~~~~~~
src/wdm/auth.c: In function ‘SetUserAuthorization’:
src/wdm/auth.c:1068:16: warning: ignoring return value of ‘mkstemp’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1068 |         (void) mkstemp (backup_name);
      |                ^~~~~~~~~~~~~~~~~~~~~
src/wdm/auth.c:1172:13: warning: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1172 |             chown (envname, verify->uid, verify->gid);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/build/reproducible-path/wdm-1.28'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:33: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2