#1075020 gngb: ftbfs with GCC-14

Package:
src:gngb
Source:
src:gngb
Submitter:
Matthias Klose
Date:
2025-08-11 15:24:19 UTC
Severity:
normal
Tags:
#1075020#5
Date:
2024-07-03 12:28:33 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/gngb_20060309-6_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

[...]
      |                  ^~~~~~~~~~
In file included from memory.c:26:
cpu.h:83:17: warning: inline function ‘cpu_run’ declared but never defined
   83 | __inline__ void cpu_run(void);
      |                 ^~~~~~~
cpu.h:82:18: warning: inline function ‘gbcpu_exec_one’ declared but never defined
   82 | __inline__ Uint8 gbcpu_exec_one(void);
      |                  ^~~~~~~~~~~~~~
cpu.c: In function ‘gbcpu_exec_one’:
cpu.c:884:14: warning: self-comparison always evaluates to false [-Wtautological-compare]
  884 |           ((A>A)?SET_FLAG(FLAG_C):UNSET_FLAG(FLAG_NC));
      |              ^
cpu.c:885:21: warning: self-comparison always evaluates to false [-Wtautological-compare]
  885 |           (((A&0x0f)>(A&0x0f))?SET_FLAG(FLAG_H):UNSET_FLAG(FLAG_NH));
      |                     ^
make[3]: *** [Makefile:388: memory.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from rom.h:23,
                 from rom.c:38:
global.h:28:9: warning: "__inline__" redefined
   28 | #define __inline__ inline
      |         ^~~~~~~~~~
In file included from /usr/include/SDL/SDL_stdinc.h:118,
                 from /usr/include/SDL/SDL_main.h:29,
                 from /usr/include/SDL/SDL.h:29,
                 from global.h:23:
/usr/include/SDL/begin_code.h:112:13: note: this is the location of the previous definition
  112 |     #define __inline__ __inline__
      |             ^~~~~~~~~~
In file included from emu.h:22,
                 from frame_skip.c:34:
global.h:28:9: warning: "__inline__" redefined
   28 | #define __inline__ inline
      |         ^~~~~~~~~~
In file included from /usr/include/SDL/SDL_stdinc.h:118,
                 from /usr/include/SDL/SDL_main.h:29,
                 from /usr/include/SDL/SDL.h:29,
                 from frame_skip.c:31:
/usr/include/SDL/begin_code.h:112:13: note: this is the location of the previous definition
  112 |     #define __inline__ __inline__
      |             ^~~~~~~~~~
rom.c:51:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
   51 | int zip_file_open_next_rom(file);
      | ^~~
In file included from rom.c:43:
vram.h:108:18: warning: inline function ‘get_nb_spr’ declared but never defined
  108 | __inline__ Uint8 get_nb_spr(void);
      |                  ^~~~~~~~~~
In file included from rom.c:41:
cpu.h:83:17: warning: inline function ‘cpu_run’ declared but never defined
   83 | __inline__ void cpu_run(void);
      |                 ^~~~~~~
cpu.h:82:18: warning: inline function ‘gbcpu_exec_one’ declared but never defined
   82 | __inline__ Uint8 gbcpu_exec_one(void);
      |                  ^~~~~~~~~~~~~~
make[3]: *** [Makefile:388: rom.o] Error 1
emu.c:301:13: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
  301 |             strncpy(*((char **) config_var[i].var),val,strlen(val)+1);
      |             ^
emu.c:301:56: note: length computed here
  301 |             strncpy(*((char **) config_var[i].var),val,strlen(val)+1);
      |                                                        ^~~~~~~~~~~
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[2]: *** [Makefile:430: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:328: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1075020#14
Date:
2024-11-12 21:46:34 UTC
From:
To:
Hi,

Here is a patch that should solve this issue.

Regards,
Patrice

#1075020#17
Date:
2025-02-14 12:20:14 UTC
From:
To:
Hello,

Bug #1075020 in gngb reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/games-team/gngb/-/commit/97365f00ec6c7f36f682fa6bdbe3826cba8e3180

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1075020