#1096671 gap: ftbfs with GCC-15

Package:
src:gap
Source:
src:gap
Submitter:
Matthias Klose
Date:
2025-09-04 22:08:07 UTC
Severity:
normal
Tags:
#1096671#5
Date:
2025-02-17 17:14:39 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/gap_4.14.0-3_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

[...]
      |                            struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)
src/calls.h:173:59: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)’
  173 | EXPORT_INLINE void SET_HDLR_FUNC(Obj func, Int i, ObjFunc hdlr)
      |                                                   ~~~~~~~~^~~~
src/bool.c:224:12: note: ‘ReturnFalse3’ declared here
  224 | static Obj ReturnFalse3(Obj self, Obj val1, Obj val2, Obj val3)
      |            ^~~~~~~~~~~~
src/common.h:168:16: note: ‘ObjFunc’ declared here
  168 | typedef Obj (* ObjFunc) (/*arguments*/);
      |                ^~~~~~~
src/bool.c:416:50: error: passing argument 4 of ‘NewFunctionC’ from incompatible pointer type [-Wincompatible-pointer-types]
  416 |     tmp = NewFunctionC("RETURN_FAIL", -1, "arg", ReturnFail1);
      |                                                  ^~~~~~~~~~~
      |                                                  |
      |                                                  struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)
src/calls.h:454:31: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)’
  454 |                  ObjFunc      hdlr);
      |                  ~~~~~~~~~~~~~^~~~
src/bool.c:236:12: note: ‘ReturnFail1’ declared here
  236 | static Obj ReturnFail1(Obj self, Obj val1)
      |            ^~~~~~~~~~~
src/common.h:168:16: note: ‘ObjFunc’ declared here
  168 | typedef Obj (* ObjFunc) (/*arguments*/);
      |                ^~~~~~~
src/bool.c:417:28: error: passing argument 3 of ‘SET_HDLR_FUNC’ from incompatible pointer type [-Wincompatible-pointer-types]
  417 |     SET_HDLR_FUNC( tmp, 1, ReturnFail1);
      |                            ^~~~~~~~~~~
      |                            |
      |                            struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)
src/calls.h:173:59: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)’
  173 | EXPORT_INLINE void SET_HDLR_FUNC(Obj func, Int i, ObjFunc hdlr)
      |                                                   ~~~~~~~~^~~~
src/bool.c:236:12: note: ‘ReturnFail1’ declared here
  236 | static Obj ReturnFail1(Obj self, Obj val1)
      |            ^~~~~~~~~~~
src/common.h:168:16: note: ‘ObjFunc’ declared here
  168 | typedef Obj (* ObjFunc) (/*arguments*/);
      |                ^~~~~~~
src/bool.c:418:28: error: passing argument 3 of ‘SET_HDLR_FUNC’ from incompatible pointer type [-Wincompatible-pointer-types]
  418 |     SET_HDLR_FUNC( tmp, 2, ReturnFail2);
      |                            ^~~~~~~~~~~
      |                            |
      |                            struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)
src/calls.h:173:59: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)’
  173 | EXPORT_INLINE void SET_HDLR_FUNC(Obj func, Int i, ObjFunc hdlr)
      |                                                   ~~~~~~~~^~~~
src/bool.c:246:12: note: ‘ReturnFail2’ declared here
  246 | static Obj ReturnFail2(Obj self, Obj val1, Obj val2)
      |            ^~~~~~~~~~~
src/common.h:168:16: note: ‘ObjFunc’ declared here
  168 | typedef Obj (* ObjFunc) (/*arguments*/);
      |                ^~~~~~~
src/bool.c:419:28: error: passing argument 3 of ‘SET_HDLR_FUNC’ from incompatible pointer type [-Wincompatible-pointer-types]
  419 |     SET_HDLR_FUNC( tmp, 3, ReturnFail3);
      |                            ^~~~~~~~~~~
      |                            |
      |                            struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)
src/calls.h:173:59: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *, struct OpaqueBag *)’
  173 | EXPORT_INLINE void SET_HDLR_FUNC(Obj func, Int i, ObjFunc hdlr)
      |                                                   ~~~~~~~~^~~~
src/bool.c:256:12: note: ‘ReturnFail3’ declared here
  256 | static Obj ReturnFail3(Obj self, Obj val1, Obj val2, Obj val3)
      |            ^~~~~~~~~~~
src/common.h:168:16: note: ‘ObjFunc’ declared here
  168 | typedef Obj (* ObjFunc) (/*arguments*/);
      |                ^~~~~~~
make[1]: *** [Makefile.rules:426: build/obj/src/bool.c.o] Error 1
make[1]: Leaving directory '/build/reproducible-path/gap-4.14.0'
make: *** [debian/rules:64: build-arch-stamp] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2