#1096737 gnucobol3: ftbfs with GCC-15

#1096737#5
Date:
2025-02-17 17:16:45 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/gnucobol3_3.2-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

[...]
      | ^~~~~~~~~~~~~~
call.c:184:25: error: initialization of 'void * (*)(void)' from incompatible pointer type 'void * (*)(void *)' [-Wincompatible-pointer-types]
  184 |         { cob_name, 0, {(void *(*)(void *))c_name} },
      |                         ^
system.def:92:1: note: in expansion of macro 'COB_SYSTEM_GEN'
   92 | COB_SYSTEM_GEN ("\xF5",                 2, 2, cob_sys_xf5)
      | ^~~~~~~~~~~~~~
call.c:184:25: note: (near initialization for 'system_tab[63].syst_call.funcptr')
  184 |         { cob_name, 0, {(void *(*)(void *))c_name} },
      |                         ^
system.def:92:1: note: in expansion of macro 'COB_SYSTEM_GEN'
   92 | COB_SYSTEM_GEN ("\xF5",                 2, 2, cob_sys_xf5)
      | ^~~~~~~~~~~~~~
call.c: In function 'do_cancel_module':
call.c:457:21: error: assignment to 'int (*)(const int,  void *, void *, void *, void *)' from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types]
  457 |         cancel_func = p->module->module_cancel.funcint;
      |                     ^
call.c: In function 'cob_cancel_field':
call.c:1305:45: error: assignment to 'int (*)(const int,  void *, void *, void *, void *)' from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types]
 1305 |                                 cancel_func = s->cob_cstr_cancel.funcint;
      |                                             ^
call.c: In function 'cob_call':
call.c:1352:14: error: too many arguments to function 'unifunc.funcint'; expected 0, have 188
 1352 |         i =  unifunc.funcint (pargv[0], pargv[1], pargv[2], pargv[3]
      |              ^~~~~~~          ~~~~~~~~
In file included from coblocal.h:52,
                 from call.c:51:
common.h:1179:27: note: declared here
 1179 |         int             (*funcint)();   /* Function returning "int" */
      |                           ^~~~~~~
make[4]: *** [Makefile:625: call.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
common.c: In function 'cob_exit_common_modules':
common.c:767:37: error: assignment to 'int (*)(const int)' from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types]
  767 |                         cancel_func = mod->module_cancel.funcint;
      |                                     ^
common.c: In function 'set_cob_build_stamp':
common.c:9459:26: warning: macro '__DATE__' might prevent reproducible builds [-Wdate-time]
 9459 |         status = sscanf (__DATE__, "%63s %d %d", month, &day, &year);
      |                          ^~~~~~~~
common.c:9462:64: warning: macro '__TIME__' might prevent reproducible builds [-Wdate-time]
 9462 |                         "%s %2.2d %4.4d %s", month, day, year, __TIME__);
      |                                                                ^~~~~~~~
common.c:9465:34: warning: macro '__DATE__' might prevent reproducible builds [-Wdate-time]
 9465 |                         "%s %s", __DATE__, __TIME__);
      |                                  ^~~~~~~~
common.c:9465:44: warning: macro '__TIME__' might prevent reproducible builds [-Wdate-time]
 9465 |                         "%s %s", __DATE__, __TIME__);
      |                                            ^~~~~~~~
common.c: In function 'cob_dump_module':
common.c:10761:45: error: assignment to 'int (*)(const int)' from incompatible pointer type 'int (*)(void)' [-Wincompatible-pointer-types]
10761 |                                 cancel_func = mod->module_cancel.funcint;
      |                                             ^
make[4]: *** [Makefile:625: common.lo] Error 1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c strings.c -o strings.o >/dev/null 2>&1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c termio.c -o termio.o >/dev/null 2>&1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c move.c -o move.o >/dev/null 2>&1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c numeric.c -o numeric.o >/dev/null 2>&1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c intrinsic.c -o intrinsic.o >/dev/null 2>&1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -finline-functions -D_FORTIFY_SOURCE=2 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -c fileio.c -o fileio.o >/dev/null 2>&1
make[4]: Leaving directory '/build/reproducible-path/gnucobol3-3.2/libcob'
make[3]: *** [Makefile:667: all-recursive] Error 1
make[3]: Leaving directory '/build/reproducible-path/gnucobol3-3.2'
make[2]: *** [Makefile:575: all] Error 2
make[2]: Leaving directory '/build/reproducible-path/gnucobol3-3.2'
dh_auto_build: error: make -j8 returned exit code 2
make[1]: *** [debian/rules:35: override_dh_auto_build] Error 25
make[1]: Leaving directory '/build/reproducible-path/gnucobol3-3.2'
make: *** [debian/rules:19: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2