#1143658 grub2: FTBFS: ../../../include/grub/i386/pc/int.h:27:6: error: 'regparm' attribute ignored [-Werror=attributes]

Package:
src:grub2
Source:
src:grub2
Submitter:
Santiago Vila
Date:
2026-08-16 03:29:01 UTC
Severity:
normal
Tags:
#1143658#5
Date:
2026-08-05 11:23:55 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:grub2, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
cc -std=gnu99 -fno-common -Os -m64 -Wall -W -Wshadow -Wpoint [too-long-redacted] e lib/pbkdf2_module-pbkdf2.o
cc -std=gnu99 -fno-common -Os -m64 -Wall -W -Wshadow -Wpoint [too-long-redacted] e lib/argon2_module-argon2.o
cc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wno-unuse [too-long-redacted] rub-core/'`lib/i386/relocator.c
cc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wno-unused-but-set-variable -Wall -W  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/16/include -I../../../include -I../include -DGRUB_FILE=\"lib/i386/relocator16.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -m64 -g  -Wa,-mx86-used-note=no -msoft-float -fno-PIE -fno-pie -DGRUB_FILE=\"lib/i386/relocator16.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/ -DASM_FILE=1     -c -o lib/i386/relocator_module-relocator16.o `test -f 'lib/i386/relocator16.S' || echo '../../../grub-core/'`lib/i386/relocator16.S
In file included from ../../../grub-core/lib/i386/relocator.c:29:
../../../include/grub/i386/pc/int.h:27:6: error: ‘regparm’ attribute ignored [-Werror=attributes]
   27 |      __attribute__ ((regparm(3)));
      |      ^~~~~~~~~~~~~
cc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wno-unused-but-set-variable -Wall -W  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/16/include -I../../../include -I../include -DGRUB_FILE=\"lib/i386/relocator32.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -m64 -g  -Wa,-mx86-used-note=no -msoft-float -fno-PIE -fno-pie -DGRUB_FILE=\"lib/i386/relocator32.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/ -DASM_FILE=1     -c -o lib/i386/relocator_module-relocator32.o `test -f 'lib/i386/relocator32.S' || echo '../../../grub-core/'`lib/i386/relocator32.S
cc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wno-unused-but-set-variable -Wall -W  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/16/include -I../../../include -I../include -DGRUB_FILE=\"lib/i386/relocator64.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 -m64 -g  -Wa,-mx86-used-note=no -msoft-float -fno-PIE -fno-pie -DGRUB_FILE=\"lib/i386/relocator64.S\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/src/ -DASM_FILE=1     -c -o lib/i386/relocator_module-relocator64.o `test -f 'lib/i386/relocator64.S' || echo '../../../grub-core/'`lib/i386/relocator64.S
cc1: all warnings being treated as errors
make[5]: *** [Makefile:49019: lib/i386/relocator_module-relocator.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/<<PKGBUILDDIR>>/obj/grub-efi-amd64/grub-core'
make[4]: *** [Makefile:33442: all] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/obj/grub-efi-amd64/grub-core'
make[3]: *** [Makefile:12996: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj/grub-efi-amd64'
make[2]: *** [Makefile:4187: all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj/grub-efi-amd64'
dh_auto_build: error: cd obj/grub-efi-amd64 && make -j2 returned exit code 2
make[1]: *** [debian/rules:234: debian/stamps/build-grub-efi-amd64] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:148: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1143658#10
Date:
2026-08-16 03:26:28 UTC
From:
To:
Dear Maintainer,

This issue has been resolved upstream in the following commit:
- 9922ed133c2c754ec9f37198da2b3e3e8a4fd5ff

For your reference, the commit is available at:
https://gitlab.freedesktop.org/gnu-grub/grub/-/commit/9922ed133c2c754ec9f37198da2b3e3e8a4fd5ff

Additionally, further compilation issues arise when building with the
latest GCC in Debian sid. To fully resolve these, the following
upstream commits are also required:

- 9f4a586f1227a8287e1d6acd95893f6098756ee2
- ce6f2b57f5450a8239022dcbfb2d750f273b83cb
- 675d8581037dc8996cf6db21a61d26e28f7d44c

I have confirmed that cherry-picking these four commits into version
2.14-3 successfully resolves all build errors.

Cheers,
Takahide Nojima