GNU bug report logs -
#31380
grub fails to build on i686-linux
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Mon, 7 May 2018 20:02:02 UTC
Severity: serious
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 16 Jun 2018 04:22:35 -0400
with message-id <871sd75ees.fsf <at> netris.org>
and subject line Re: bug#31380: grub fails to build on i686-linux
has caused the debbugs.gnu.org bug report #31380,
regarding grub fails to build on i686-linux
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
31380: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31380
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On the 'core-updates' branch, both 'grub' and 'grub-efi' fail to build
on i686-linux. See below for the relevant excerpt from the build log
of 'grub-efi', but the error is the same for both.
https://hydra.gnu.org/build/2675846
https://hydra.gnu.org/build/2684033
Mark
--8<---------------cut here---------------start------------->8---
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /gnu/store/w55k6qc17s6nf7rv4agap9lsas4hb50l-gcc-5.5.0-lib/lib/gcc/i686-unknown-linux-gnu/5.5.0/include -I../include -I../include -DGRUB_FILE=\"lib/i386/relocator.c\" -I. -I. -I.. -I.. -I../include -I../include -I../grub-core/lib/libgcrypt-grub/src/ -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror -ffreestanding -MT lib/i386/relocator_module-relocator.o -MD -MP -MF lib/i386/.deps-core/relocator_module-relocator.Tpo -c -o lib/i386/relocator_module-relocator.o `test -f 'lib/i386/relocator.c' || echo './'`lib/i386/relocator.c
lib/i386/relocator64.S: Assembler messages:
lib/i386/relocator64.S:66: Error: unknown pseudo-op: `.code64'
lib/i386/relocator64.S:74: Error: bad register name `%rax'
lib/i386/relocator64.S:88: Error: bad register name `%rsp'
lib/i386/relocator64.S:98: Error: bad register name `%rax'
lib/i386/relocator64.S:132: Error: bad register name `%rip)'
make[3]: *** [Makefile:28996: lib/i386/relocator_module-relocator64.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f lib/.deps-core/crypto_module-crypto.Tpo lib/.deps-core/crypto_module-crypto.Po
mv -f lib/i386/.deps-core/relocator_module-relocator.Tpo lib/i386/.deps-core/relocator_module-relocator.Po
mv -f fs/.deps-core/xfs_module-xfs.Tpo fs/.deps-core/xfs_module-xfs.Po
make[3]: Leaving directory '/tmp/guix-build-grub-efi-2.02.drv-0/grub-2.02/grub-core'
make[2]: *** [Makefile:23531: all] Error 2
make[2]: Leaving directory '/tmp/guix-build-grub-efi-2.02.drv-0/grub-2.02/grub-core'
make[1]: *** [Makefile:10904: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-grub-efi-2.02.drv-0/grub-2.02'
make: *** [Makefile:3130: all] Error 2
--8<---------------cut here---------------end--------------->8---
[Message part 3 (message/rfc822, inline)]
Hi Ludovic,
ludo <at> gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> Here's a proposed patch that I hope will fix the problem, although I'm
>> unable to easily test it because I no longer use binary substitutes, and
>> I have not yet built the core packages for i686-linux.
>>
>> However, I've applied this patch to my x86_64 system, and verified that
>> it does not cause any problems there.
>>
>> Would someone be willing to test it and report back?
>
> I tried it and it initially failed to build with:
[...]
> I fixed this and pushed as a7c8716928a240ba2c36d360e4ffeb447671fa6b.
Thanks very much! Hydra has now successfully built GRUB on i686-linux,
so I'm closing this bug.
> I wanted to try ‘guix system vm-image -s i686-linux’ on my x86_64 laptop
> to make sure GRUB runs fine. Unfortunately, I stumbled upon another
> issue, which is that qemu-system-i386 built for i686-linux segfaults at
> startup:
[...]
> I was able to work around it by disabling KVM:
>
> diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
> index 73d0191de..a675111d4 100644
> --- a/gnu/build/vm.scm
> +++ b/gnu/build/vm.scm
> @@ -104,7 +104,8 @@ the #:references-graphs parameter of 'derivation'."
> ;; hardware virtualization to still use these commands. KVM support is
> ;; still buggy on some ARM32 boards. Do not use it even if available.
> ,@(if (and (file-exists? "/dev/kvm")
> - (not target-arm32?))
> + (not target-arm32?)
> + (not (string-suffix? "-i386" qemu)))
> '("-enable-kvm")
> '())
>
> I suspect a KVM bug in Linux 4.17 though, because running the same
> ‘qemu-system-i386’ binary under strace works… Perhaps worth applying
> the patch above in the meantime, WDYT?
It would be better to auto-detect the presence of KVM support at run
time, but that's a wishlist item that deserves its own ticket. This is
good enough for now.
> Anyway, with this patch I successfully run:
>
> guix system vm-image gnu/system/examples/bare-bones.tmpl -s i686-linux
>
> and confirmed that the resulting image would boot through GRUB.
Sounds great, thanks again!
Mark
This bug report was last modified 7 years and 16 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.