Subject: hime: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:19:06 +0000

Package: src:hime
Version: 0.9.11+dfsg-4
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[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/hime_0.9.11+dfsg-4_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

[...]
  win-kbm.c -> win-kbm.o
  win-message.c -> win-message.o
  win-pho-near.c -> win-pho-near.o
  win-save-phrase.c -> win-save-phrase.o
  win-sym.c -> win-sym.o
  IC.c -> IC.o
  tray.c -> tray.o
  tray-double.c -> tray-double.o
tray-double.c:65:21: error: conflicting types for ‘quit_hime’; have ‘void(void)’
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                     ^~~~~~~~~
tray-double.c:61:6: note: previous definition of ‘quit_hime’ with type ‘void(GtkCheckMenuItem *, void *)’ {aka ‘void(struct _GtkCheckMenuItem *, void *)’}
   61 | void quit_hime (GtkCheckMenuItem *checkmenuitem, gpointer dat) {
      |      ^~~~~~~~~
tray-double.c:65:35: error: conflicting types for ‘cb_trad2sim’; have ‘void(void)’
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                                   ^~~~~~~~~~~
tray-double.c:44:6: note: previous definition of ‘cb_trad2sim’ with type ‘void(GtkCheckMenuItem *, void *)’ {aka ‘void(struct _GtkCheckMenuItem *, void *)’}
   44 | void cb_trad2sim (GtkCheckMenuItem *checkmenuitem, gpointer dat) {
      |      ^~~~~~~~~~~
tray-double.c:65:51: error: conflicting types for ‘cb_sim2trad’; have ‘void(void)’
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                                                   ^~~~~~~~~~~
tray-double.c:40:6: note: previous definition of ‘cb_sim2trad’ with type ‘void(GtkCheckMenuItem *, void *)’ {aka ‘void(struct _GtkCheckMenuItem *, void *)’}
   40 | void cb_sim2trad (GtkCheckMenuItem *checkmenuitem, gpointer dat) {
      |      ^~~~~~~~~~~
tray-double.c:104:35: error: initialization of ‘void (*)(GtkCheckMenuItem *, void *)’ {aka ‘void (*)(struct _GtkCheckMenuItem *, void *)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  104 |     {N_ ("Exit"), GTK_STOCK_QUIT, quit_hime},
      |                                   ^~~~~~~~~
tray-double.c:104:35: note: (near initialization for ‘mitems_main[2].cb’)
tray-double.c:65:21: note: ‘quit_hime’ declared here
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                     ^~~~~~~~~
tray-double.c:130:51: error: initialization of ‘void (*)(GtkCheckMenuItem *, void *)’ {aka ‘void (*)(struct _GtkCheckMenuItem *, void *)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  130 |     {N_ ("Trad. to Simp. conversion tool"), NULL, cb_trad2sim},
      |                                                   ^~~~~~~~~~~
tray-double.c:130:51: note: (near initialization for ‘mitems_state[1].cb’)
tray-double.c:65:35: note: ‘cb_trad2sim’ declared here
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                                   ^~~~~~~~~~~
tray-double.c:131:51: error: initialization of ‘void (*)(GtkCheckMenuItem *, void *)’ {aka ‘void (*)(struct _GtkCheckMenuItem *, void *)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  131 |     {N_ ("Simp. to Trad. conversion tool"), NULL, cb_sim2trad},
      |                                                   ^~~~~~~~~~~
tray-double.c:131:51: note: (near initialization for ‘mitems_state[2].cb’)
tray-double.c:65:51: note: ‘cb_sim2trad’ declared here
   65 | void kbm_toggle (), quit_hime (), cb_trad2sim (), cb_sim2trad ();
      |                                                   ^~~~~~~~~~~
tray-double.c: In function ‘cb_sim2trad’:
tray-double.c:41:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   41 |     system (HIME_BIN_DIR "/hime-sim2trad &");
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tray-double.c: In function ‘cb_trad2sim’:
tray-double.c:45:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   45 |     system (HIME_BIN_DIR "/hime-trad2sim &");
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [Makefile:193: tray-double.o] Error 1
gmake[2]: Leaving directory '/build/reproducible-path/hime-0.9.11+dfsg/src'
make[1]: *** [Makefile:20: all] Error 1
make[1]: Leaving directory '/build/reproducible-path/hime-0.9.11+dfsg'
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:18: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2