#1097505 oneko: ftbfs with GCC-15

Package:
src:oneko
Source:
src:oneko
Submitter:
Matthias Klose
Date:
2025-09-04 22:09:39 UTC
Severity:
normal
Tags:
#1097505#5
Date:
2025-02-17 17:41:12 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/oneko_1.2.sakura.6-15_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

[...]
 1355 | NekoErrorHandler(dpy, err)
      | ^~~~~~~~~~~~~~~~
oneko.c: In function ‘GetArguments’:
oneko.c:1416:1: warning: old-style function definition [-Wold-style-definition]
 1416 | GetArguments(argc, argv, theDisplayName)
      | ^~~~~~~~~~~~
oneko.c: In function ‘main’:
oneko.c:1555:1: warning: old-style function definition [-Wold-style-definition]
 1555 | main(argc, argv)
      | ^~~~
oneko.c:1572:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
 1572 |   signal(SIGALRM, NullFunction);
      |                   ^~~~~~~~~~~~
      |                   |
      |                   void (*)(void)
In file included from oneko.h:20,
                 from oneko.c:9:
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
oneko.c:1342:1: note: ‘NullFunction’ declared here
 1342 | NullFunction()
      | ^~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
oneko.c:1573:18: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
 1573 |   signal(SIGINT, RestoreCursor);
      |                  ^~~~~~~~~~~~~
      |                  |
      |                  void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
oneko.c:716:1: note: ‘RestoreCursor’ declared here
  716 | RestoreCursor()
      | ^~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
oneko.c:1574:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
 1574 |   signal(SIGTERM, RestoreCursor);
      |                   ^~~~~~~~~~~~~
      |                   |
      |                   void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
oneko.c:716:1: note: ‘RestoreCursor’ declared here
  716 | RestoreCursor()
      | ^~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
oneko.c:1575:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
 1575 |   signal(SIGQUIT, RestoreCursor);
      |                   ^~~~~~~~~~~~~
      |                   |
      |                   void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
oneko.c:716:1: note: ‘RestoreCursor’ declared here
  716 | RestoreCursor()
      | ^~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~
make: *** [debian/rules:21: build-stamp] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2