--- Begin Message ---
Subject: |
[PATCH 0/1] gnu: grub: Cross-build fix for system i686-linux. |
Date: |
Sun, 21 Jun 2020 15:55:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi!
Attempting to reconfigure a i686-linux guix system to a Hurd system, I
found that the Grub(-minimal) cross build fails like this
--8<---------------cut here---------------start------------->8---
i586-pc-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -DGRUB_MACHINE_PCBIOS=1
-DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem
/gnu/store/5s0ldm31100d9ix15d1lmbsvi0aa77pq-gcc-cross-i586-pc-gnu-7.5.0-lib/lib/gcc/i586-pc-gnu/7.5.0/include
-I../include -I../include -DGRUB_FILE=\"lib/cmos_datetime.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 -mrtd
-mregparm=3 -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 -fno-stack-protector
-Wtrampolines -Werror -ffreestanding -MT
lib/datetime_module-cmos_datetime.o -MD -MP -MF
lib/.deps-core/datetime_module-cmos_datetime.Tpo -c -o
lib/datetime_module-cmos_datetime.o `test -f 'lib/cmos_datetime.c' || echo
'./'`lib/cmos_datetime.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:98: Error: bad register name `%rax'
lib/i386/relocator64.S:132: Error: bad register name `%rip)'
make[3]: *** [Makefile:32165: lib/i386/relocator_module-relocator64.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f lib/i386/.deps-core/relocator_module-relocator_common_c.Tpo
lib/i386/.deps-core/relocator_module-relocator_common_c.Po
mv -f lib/i386/.deps-core/relocator_module-relocator.Tpo
lib/i386/.deps-core/relocator_module-relocator.Po
mv -f kern/.deps-core/elf_module-elf.Tpo kern/.deps-core/elf_module-elf.Po
mv -f lib/.deps-core/datetime_module-cmos_datetime.Tpo
lib/.deps-core/datetime_module-cmos_datetime.Po
mv -f fs/.deps-core/xfs_module-xfs.Tpo fs/.deps-core/xfs_module-xfs.Po
mv -f lib/.deps-core/crypto_module-crypto.Tpo
lib/.deps-core/crypto_module-crypto.Po
mv -f lib/.deps-core/relocator_module-relocator.Tpo
lib/.deps-core/relocator_module-relocator.Po
make[3]: Leaving directory
'/tmp/guix-build-grub-minimal-2.04.drv-0/grub-2.04/grub-core'
make[2]: *** [Makefile:26403: all] Error 2
make[2]: Leaving directory
'/tmp/guix-build-grub-minimal-2.04.drv-0/grub-2.04/grub-core'
make[1]: *** [Makefile:11304: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-grub-minimal-2.04.drv-0/grub-2.04'
make: *** [Makefile:3343: all] Error 2
command "make" "-j" "8" failed with status 2
--8<---------------cut here---------------end--------------->8---
It is non-Hurd specific, it can be reproduced by running
--8<---------------cut here---------------start------------->8---
./pre-inst-env guix build --system=i686-linux --target=i686-linux-gnu
grub-minimal
--8<---------------cut here---------------end--------------->8---
I am not sure if and how to report this upstream. Ideas for a bug
description? Apparently, non-cross builds "just" work (how?!).
Greetings,
Janneke
Jan (janneke) Nieuwenhuizen (1):
gnu: grub: Cross-build fix for system-i686.
gnu/local.mk | 1 +
gnu/packages/bootloaders.scm | 3 +-
.../patches/grub-cross-system-i686.patch | 73 +++++++++++++++++++
3 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/grub-cross-system-i686.patch
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#41982: [PATCH 0/1] gnu: grub: Cross-build fix for system i686-linux. |
Date: |
Thu, 25 Jun 2020 17:52:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Ludovic Courtès writes:
Hello,
>> Pushed to master as cd6b0910dc471afb76677109625af0a42ce3056a
>
> Cool, thanks!
Well, preparing a new patch I found the commit above didn't make it to
master yet, I'm puzzled. I'm pretty sure that I send this mail after
(I believe that) the push was successful.
A new attempt: pushed to master as d613991a8ebe5d4b3a7706f8f0dd52f16fc1c50a
And closing (forgot that too).
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
--- End Message ---