#1097237 libnids: ftbfs with GCC-15

Package:
src:libnids
Source:
src:libnids
Submitter:
Matthias Klose
Date:
2025-09-04 22:08:58 UTC
Severity:
normal
Tags:
#1097237#5
Date:
2025-02-17 17:32:46 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/libnids_1.26-2.1_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

[...]
   13 |   void (*item)();
      |          ^~~~
libnids.c: In function ‘process_udp’:
libnids.c:443:9: error: too many arguments to function ‘ipp->item’; expected 0, have 4
  443 |         ipp->item(&addr, ((char *) udph) + sizeof(struct udphdr),
      |         ^~~       ~~~~~
util.h:13:10: note: declared here
   13 |   void (*item)();
      |          ^~~~
libnids.c: In function ‘init_procs’:
libnids.c:468:25: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(u_char *, int)’ {aka ‘void (*)(unsigned char *, int)’} [-Wincompatible-pointer-types]
  468 |     ip_frag_procs->item = gen_ip_frag_proc;
      |                         ^
libnids.c:363:13: note: ‘gen_ip_frag_proc’ declared here
  363 | static void gen_ip_frag_proc(u_char * data, int len)
      |             ^~~~~~~~~~~~~~~~
libnids.c:471:20: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(u_char *, int)’ {aka ‘void (*)(unsigned char *, int)’} [-Wincompatible-pointer-types]
  471 |     ip_procs->item = gen_ip_proc;
      |                    ^
libnids.c:448:13: note: ‘gen_ip_proc’ declared here
  448 | static void gen_ip_proc(u_char * data, int skblen)
      |             ^~~~~~~~~~~
libnids.c: In function ‘open_live’:
libnids.c:513:9: warning: ‘pcap_lookupdev’ is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
  513 |         nids_params.device = pcap_lookupdev(nids_errbuf);
      |         ^~~~~~~~~~~
In file included from libnids.c:18:
/usr/include/pcap/pcap.h:444:18: note: declared here
  444 | PCAP_API char   *pcap_lookupdev(char *);
      |                  ^~~~~~~~~~~~~~
libnids.c: In function ‘nids_init’:
libnids.c:663:28: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
  663 |     if (nids_params.syslog == nids_syslog)
      |                            ^~
libnids.c:673:10: warning: ‘g_thread_init’ is deprecated [-Wdeprecated-declarations]
  673 |          g_thread_init(NULL);
      |          ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:115,
                 from libnids.c:32:
/usr/include/glib-2.0/glib/deprecated/gthread.h:271:10: note: declared here
  271 | void     g_thread_init                   (gpointer vtable);
      |          ^~~~~~~~~~~~~
libnids.c: In function ‘nids_run’:
libnids.c:690:5: warning: ‘g_thread_create_full’ is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declarations]
  690 |     START_CAP_QUEUE_PROCESS_THREAD(); /* threading... */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/deprecated/gthread.h:108:10: note: declared here
  108 | GThread *g_thread_create_full  (GThreadFunc       func,
      |          ^~~~~~~~~~~~~~~~~~~~
libnids.c: In function ‘nids_next’:
libnids.c:750:5: warning: ‘g_thread_create_full’ is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declarations]
  750 |     START_CAP_QUEUE_PROCESS_THREAD();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/deprecated/gthread.h:108:10: note: declared here
  108 | GThread *g_thread_create_full  (GThreadFunc       func,
      |          ^~~~~~~~~~~~~~~~~~~~
libnids.c: In function ‘nids_dispatch’:
libnids.c:764:5: warning: ‘g_thread_create_full’ is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declarations]
  764 |     START_CAP_QUEUE_PROCESS_THREAD(); /* threading... */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/deprecated/gthread.h:108:10: note: declared here
  108 | GThread *g_thread_create_full  (GThreadFunc       func,
      |          ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:38: libnids.o] Error 1
make[2]: Leaving directory '/build/reproducible-path/libnids-1.26/src'
make[1]: *** [Makefile:10: static] Error 2
make[1]: Leaving directory '/build/reproducible-path/libnids-1.26'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2