Bug#1075047: grub: ftbfs with GCC-14

Matthias Klose doko at debian.org
Wed Jul 3 13:29:27 BST 2024


Package: src:grub
Version: 0.97-81
Severity: important
Tags: sid trixie
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-14

[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/grub_0.97-81_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

[...]
    inlined from ‘imps_read_config_table’ at ../../../stage2/smp-imps.c:435:4,
    inlined from ‘imps_read_bios’ at ../../../stage2/smp-imps.c:623:3,
    inlined from ‘imps_scan’ at ../../../stage2/smp-imps.c:662:4:
../../../stage2/smp-imps.c:347:46: warning: array subscript 0 is outside array bounds of ‘volatile unsigned int[0]’ [-Warray-bounds=]
  347 |   *((volatile unsigned *) bios_reset_vector) = 0;
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In function ‘imps_scan’:
cc1: note: source object is likely at address zero
gcc -DHAVE_CONFIG_H -I. -I../../../stage2 -I.. -I../../../stage1  -Wdate-time -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-stack-protector -fno-reorder-functions -fno-PIE -fno-builtin -nostdinc  -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m32 -g -c -o pre_stage2_exec-terminfo.o `test -f 'terminfo.c' || echo '../../../stage2/'`terminfo.c
../../../stage2/stage2.c: In function ‘cmain’:
../../../stage2/stage2.c:941:21: warning: value computed is not used [-Wunused-value]
  941 |                     *tmp++;
      |                     ^~~~~~
../../../stage2/stage2.c:942:33: error: passing argument 1 of ‘grub_strcpy’ from incompatible pointer type [-Wincompatible-pointer-types]
  942 |                     grub_strcpy(&def, &tmp);
      |                                 ^~~~
      |                                 |
      |                                 char **
In file included from ../../../stage2/stage2.c:20:
../../../stage2/shared.h:891:26: note: expected ‘char *’ but argument is of type ‘char **’
  891 | char *grub_strcpy (char *dest, const char *src);
      |                    ~~~~~~^~~~
../../../stage2/stage2.c:942:39: error: passing argument 2 of ‘grub_strcpy’ from incompatible pointer type [-Wincompatible-pointer-types]
  942 |                     grub_strcpy(&def, &tmp);
      |                                       ^~~~
      |                                       |
      |                                       char **
../../../stage2/shared.h:891:44: note: expected ‘const char *’ but argument is of type ‘char **’
  891 | char *grub_strcpy (char *dest, const char *src);
      |                                ~~~~~~~~~~~~^~~
../../../stage2/stage2.c:944:33: error: passing argument 1 of ‘grub_strcpy’ from incompatible pointer type [-Wincompatible-pointer-types]
  944 |                     grub_strcpy(&def, &p);
      |                                 ^~~~
      |                                 |
      |                                 char **
../../../stage2/shared.h:891:26: note: expected ‘char *’ but argument is of type ‘char **’
  891 | char *grub_strcpy (char *dest, const char *src);
      |                    ~~~~~~^~~~
../../../stage2/stage2.c:944:39: error: passing argument 2 of ‘grub_strcpy’ from incompatible pointer type [-Wincompatible-pointer-types]
  944 |                     grub_strcpy(&def, &p);
      |                                       ^~
      |                                       |
      |                                       char **
../../../stage2/shared.h:891:44: note: expected ‘const char *’ but argument is of type ‘char **’
  891 | char *grub_strcpy (char *dest, const char *src);
      |                                ~~~~~~~~~~~~^~~
../../../stage2/serial.c: In function ‘serial_hw_get_port’:
../../../stage2/serial.c:123:14: warning: array subscript [0, 1073741823] is outside array bounds of ‘const short unsigned int[0]’ [-Warray-bounds=]
  123 |   return addr[unit];
      |          ~~~~^~~~~~
cc1: note: source object is likely at address zero
make[4]: *** [Makefile:3367: pre_stage2_exec-stage2.o] Error 1
make[4]: *** Waiting for unfinished jobs....
../../../stage2/smp-imps.c: In function ‘imps_probe’:
../../../stage2/smp-imps.c:709:24: warning: array subscript 0 is outside array bounds of ‘short unsigned int[0]’ [-Warray-bounds=]
  709 |   unsigned ebda_addr = *((unsigned short *)
      |                        ^~~~~~~~~~~~~~~~~~~~
  710 |                          PHYS_TO_VIRTUAL (EBDA_SEG_ADDR)) << 4;
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: note: source object is likely at address zero
make[4]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/stage2'
make[3]: *** [Makefile:382: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build'
make[2]: *** [Makefile:323: all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/debian/build'
dh_auto_build: error: cd debian/build && make -j8 returned exit code 2
make[1]: *** [debian/rules:15: override_dh_auto_build-arch] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:3: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Pkg-grub-devel mailing list