#1097433 nat: ftbfs with GCC-15

Package:
src:nat
Source:
src:nat
Submitter:
Matthias Klose
Date:
2025-09-04 22:09:27 UTC
Severity:
normal
Tags:
#1097433#5
Date:
2025-02-17 17:38:55 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/nat_1.0-7_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

[...]
client.c:3500:1: warning: label ‘phase_1’ defined but not used [-Wunused-label]
 3500 | phase_1:                                /* pass the wacky rfc1002 stuff */
      | ^~~~~~~
client.c:3365:16: warning: unused variable ‘i’ [-Wunused-variable]
 3365 |   register int i;
      |                ^
client.c: In function ‘nas_step’:
client.c:3950:5: warning: old-style function definition [-Wold-style-definition]
 3950 | int nas_step (xip)
      |     ^~~~~~~~
client.c:3973:3: error: too many arguments to function ‘clear_block’; expected 0, have 2
 3973 |   clear_block (try_names, idx_names);   /* clean up all dynamic info... */
      |   ^~~~~~~~~~~  ~~~~~~~~~
client.c:97:12: note: declared here
   97 | extern int clear_block();
      |            ^~~~~~~~~~~
client.c:3974:3: error: too many arguments to function ‘clear_block’; expected 0, have 2
 3974 |   clear_block (try_users, idx_users);
      |   ^~~~~~~~~~~  ~~~~~~~~~
client.c:97:12: note: declared here
   97 | extern int clear_block();
      |            ^~~~~~~~~~~
client.c:3975:3: error: too many arguments to function ‘clear_block’; expected 0, have 2
 3975 |   clear_block (try_pass, idx_pass);
      |   ^~~~~~~~~~~  ~~~~~~~~
client.c:97:12: note: declared here
   97 | extern int clear_block();
      |            ^~~~~~~~~~~
client.c:3976:3: error: too many arguments to function ‘clear_block’; expected 0, have 2
 3976 |   clear_block (try_shares, idx_shares);
      |   ^~~~~~~~~~~  ~~~~~~~~~~
client.c:97:12: note: declared here
   97 | extern int clear_block();
      |            ^~~~~~~~~~~
client.c:3953:16: warning: unused variable ‘i’ [-Wunused-variable]
 3953 |   register int i;
      |                ^
client.c: At top level:
client.c:2827:13: warning: ‘send_logout’ defined but not used [-Wunused-function]
 2827 | static void send_logout(void )
      |             ^~~~~~~~~~~
client.c:2002:13: warning: ‘cmd_rmdir’ defined but not used [-Wunused-function]
 2002 | static void cmd_rmdir(char *inbuf,char *outbuf )
      |             ^~~~~~~~~
client.c:1977:13: warning: ‘cmd_del’ defined but not used [-Wunused-function]
 1977 | static void cmd_del(char *inbuf,char *outbuf )
      |             ^~~~~~~
client.c:1842:13: warning: ‘cmd_mkdir’ defined but not used [-Wunused-function]
 1842 | static void cmd_mkdir(char *inbuf,char *outbuf)
      |             ^~~~~~~~~
client.c:1771:13: warning: ‘cmd_get’ defined but not used [-Wunused-function]
 1771 | static void cmd_get(void)
      |             ^~~~~~~
client.c:1340:13: warning: ‘cmd_dir’ defined but not used [-Wunused-function]
 1340 | static void cmd_dir(char *inbuf,char *outbuf)
      |             ^~~~~~~
client.c:674:13: warning: ‘cmd_cd’ defined but not used [-Wunused-function]
  674 | static void cmd_cd(char *inbuf,char *outbuf)
      |             ^~~~~~
client.c:665:13: warning: ‘cmd_pwd’ defined but not used [-Wunused-function]
  665 | static void cmd_pwd(void)
      |             ^~~~~~~
client.c:592:12: warning: ‘printread’ defined but not used [-Wunused-function]
  592 | static int printread(FILE *f,char *b,int n)
      |            ^~~~~~~~~
make[1]: *** [Makefile:383: client.o] Error 1
make[1]: Leaving directory '/build/reproducible-path/nat-1.0'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2