#1075519 sn: ftbfs with GCC-14

Package:
src:sn
Source:
src:sn
Submitter:
Matthias Klose
Date:
2025-08-11 15:24:28 UTC
Severity:
normal
Tags:
#1075519#5
Date:
2024-07-03 12:44:23 UTC
From:
To:
[This bug is 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-14/g++-14, but succeeds to build with gcc-13/g++-13. The
severity of this report will be raised before the trixie release.

The full build log can be found at:
http://qa-logs.debian.net/2024/07/01/sn_0.3.8-12_unstable_gccexp.log
The last lines of the build log are at the end of this report.

To build with GCC 14, either set CC=gcc-14 CXX=g++-14 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

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-14/porting_to.html

[...]
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snscan.c -o snscan.o
snscan.c:45:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   45 | static const char ver_ctrl_id[] = "$Id: snscan.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snprimedb.c -o snprimedb.o
snprimedb.c:35:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   35 | static const char ver_ctrl_id[] = "$Id: snprimedb.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` sndumpdb.c -o sndumpdb.o
sndumpdb.c:26:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   26 | static const char ver_ctrl_id[] = "$Id: sndumpdb.c 55 2004-07-27 14:46:57Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snntpd.c -o snntpd.o
snntpd.c:45:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   45 | static const char ver_ctrl_id[] = "$Id: snntpd.c 36 2004-04-27 16:52:02Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` list.c -o list.o
list.c:27:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   27 | static const char ver_ctrl_id[] = "$Id: list.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` post.c -o post.o
post.c:33:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   33 | static const char ver_ctrl_id[] = "$Id: post.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` commands.c -o commands.o
commands.c:36:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   36 | static const char ver_ctrl_id[] = "$Id: commands.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snexpire.c -o snexpire.o
snexpire.c:41:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   41 | static const char ver_ctrl_id[] = "$Id: snexpire.c 29 2004-04-24 23:02:38Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snmail.c -o snmail.o
snmail.c: In function ‘appendtoreferences’:
snmail.c:66:10: warning: variable ‘dst’ set but not used [-Wunused-but-set-variable]
   66 |    char *dst;
      |          ^~~
snmail.c: At top level:
snmail.c:49:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   49 | static const char ver_ctrl_id[] = "$Id: snmail.c 58 2004-07-28 18:56:20Z patrik $";
      |                   ^~~~~~~~~~~
gcc -c `cat cc-flags` snget.c -o snget.o
snget.c:28:19: warning: ‘ver_ctrl_id’ defined but not used [-Wunused-const-variable=]
   28 | static const char ver_ctrl_id[] = "$Id: snget.c 36 2004-04-27 16:52:02Z patrik $";
      |                   ^~~~~~~~~~~
ar rc sn.a art.o cache.o group.o times.o dh_find.o dhash.o allocate.o newsgroup.o hostname.o store.o parameters.o args.o body.o unfold.o path.o addr.o valid.o key.o field.o
ranlib sn.a
cd lib; /usr/bin/make all CC=gcc
make[2]: Entering directory '/<<PKGBUILDDIR>>/lib'
set -e; for i in *.c; \
  do gcc -c -O $i -o `basename $i .c`.o; done
cmdopen.c: In function ‘cmdopen’:
cmdopen.c:40:7: error: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
   40 |       exit(19);
      |       ^~~~
cmdopen.c:11:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
   10 | #include <sys/wait.h>
  +++ |+#include <stdlib.h>
   11 |
cmdopen.c:40:7: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
   40 |       exit(19);
      |       ^~~~
cmdopen.c:40:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
make[2]: *** [Makefile:4: stuff.a] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/lib'
make[1]: *** [Makefile:92: lib/libstuff.a] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:14: build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2