#1096484 crossfire: ftbfs with GCC-15

#1096484#5
Date:
2025-02-17 17:08:42 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/crossfire_1.75.0-8.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

[...]
  296 |     { "-maps", 1, 1, set_mapdir },
      |                      ^~~~~~~~~~
init.c:296:22: note: (near initialization for ‘options[8].func’)
init.c:156:13: note: ‘set_mapdir’ declared here
  156 | static void set_mapdir(const char *path) {
      |             ^~~~~~~~~~
init.c:299:27: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  299 |     { "-playerdir", 1, 1, set_playerdir },
      |                           ^~~~~~~~~~~~~
init.c:299:27: note: (near initialization for ‘options[11].func’)
init.c:204:13: note: ‘set_playerdir’ declared here
  204 | static void set_playerdir(const char *path) {
      |             ^~~~~~~~~~~~~
init.c:300:25: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  300 |     { "-regions", 1, 1, set_regions },
      |                         ^~~~~~~~~~~
init.c:300:25: note: (near initialization for ‘options[12].func’)
init.c:172:13: note: ‘set_regions’ declared here
  172 | static void set_regions(const char *path) {
      |             ^~~~~~~~~~~
init.c:301:29: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  301 |     { "-templatedir", 1, 1, set_templatedir },
      |                             ^~~~~~~~~~~~~~~
init.c:301:29: note: (near initialization for ‘options[13].func’)
init.c:196:13: note: ‘set_templatedir’ declared here
  196 | static void set_templatedir(const char *path) {
      |             ^~~~~~~~~~~~~~~
init.c:302:24: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  302 |     { "-tmpdir", 1, 1, set_tmpdir },
      |                        ^~~~~~~~~~
init.c:302:24: note: (near initialization for ‘options[14].func’)
init.c:212:13: note: ‘set_tmpdir’ declared here
  212 | static void set_tmpdir(const char *path) {
      |             ^~~~~~~~~~
init.c:303:27: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  303 |     { "-treasures", 1, 1, set_treasures },
      |                           ^~~~~~~~~~~~~
init.c:303:27: note: (near initialization for ‘options[15].func’)
init.c:180:13: note: ‘set_treasures’ declared here
  180 | static void set_treasures(const char *path) {
      |             ^~~~~~~~~~~~~
init.c:304:27: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  304 |     { "-uniquedir", 1, 1, set_uniquedir },
      |                           ^~~~~~~~~~~~~
init.c:304:27: note: (near initialization for ‘options[16].func’)
init.c:188:13: note: ‘set_uniquedir’ declared here
  188 | static void set_uniquedir(const char *path) {
      |             ^~~~~~~~~~~~~
init.c:317:19: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  317 |     { "-p", 1, 2, set_csport },
      |                   ^~~~~~~~~~
init.c:317:19: note: (near initialization for ‘options[18].func’)
init.c:226:13: note: ‘set_csport’ declared here
  226 | static void set_csport(const char *val) {
      |             ^~~~~~~~~~
init.c:331:20: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘void (*)(const char *)’ [-Wincompatible-pointer-types]
  331 |     { "-mt", 1, 3, set_dumpmont },
      |                    ^~~~~~~~~~~~
init.c:331:20: note: (near initialization for ‘options[28].func’)
init.c:123:13: note: ‘set_dumpmont’ declared here
  123 | static void set_dumpmont(const char *name) {
      |             ^~~~~~~~~~~~
make[2]: *** [Makefile:596: init.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/reproducible-path/crossfire-1.75.0/server'
make[1]: *** [Makefile:426: all-recursive] Error 1
make[1]: Leaving directory '/build/reproducible-path/crossfire-1.75.0'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:3: build] Error 255
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2