From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#31380: grub fails to build on i686-linux Date: Sat, 16 Jun 2018 04:22:35 -0400 Message-ID: <871sd75ees.fsf@netris.org> References: <87d0y7grsz.fsf@netris.org> <874li6rq21.fsf@netris.org> <87d0wst84e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU6VA-0001m7-V2 for bug-guix@gnu.org; Sat, 16 Jun 2018 04:24:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU6V9-0001Lt-Mf for bug-guix@gnu.org; Sat, 16 Jun 2018 04:24:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fU6V9-0001LL-JZ for bug-guix@gnu.org; Sat, 16 Jun 2018 04:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fU6V9-0005W2-7j for bug-guix@gnu.org; Sat, 16 Jun 2018 04:24:03 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87d0wst84e.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 15 Jun 2018 16:52:17 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31380-done@debbugs.gnu.org Hi Ludovic, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver 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 =E2=80=98guix system vm-image -s i686-linux=E2=80=99 on m= y 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: >=20 > 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 suppo= rt is > ;; still buggy on some ARM32 boards. Do not use it even if availab= le. > ,@(if (and (file-exists? "/dev/kvm") > - (not target-arm32?)) > + (not target-arm32?) > + (not (string-suffix? "-i386" qemu))) > '("-enable-kvm") > '()) >=20=20 > I suspect a KVM bug in Linux 4.17 though, because running the same > =E2=80=98qemu-system-i386=E2=80=99 binary under strace works=E2=80=A6 Pe= rhaps 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