GNU bug report logs - #41350
[PATCH 0/3] Use native qemu to build vm-image.

Previous Next

Package: guix-patches;

Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>

Date: Sun, 17 May 2020 10:02:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#41350: closed ([PATCH 0/3] Use native qemu to build vm-image.)
Date: Thu, 29 Sep 2022 14:18:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 29 Sep 2022 16:17:12 +0200
with message-id <87sfkagt93.fsf <at> gnu.org>
and subject line Re: bug#41350: [PATCH 0/3] Use native qemu to build vm-image.
has caused the debbugs.gnu.org bug report #41350,
regarding [PATCH 0/3] Use native qemu to build vm-image.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
41350: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41350
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Use native qemu to build vm-image.
Date: Sun, 17 May 2020 12:01:10 +0200
Hi!

Cross-building a vm-image used to be done using a cross-qemu, e.g, qemu-ARM.
That does not work for the Hurd, as there is no qemu-HURD.

This patch switches to cross building vm-images using a native qemu vm.  If
there a reason for using qemu-TARGET we may want to make this switch
conditional for cross building to the Hurd?

There is a tricky aspect to this: the "user-builder" includes all the
cross-built packages for TARGET, but we need to hard the native qemu a
native #+LOADER, loading native #+LINUX and #+INITRD.

To accomplish this NATIVE/CROSS mixt, the builder is then run with a native
guile, like so

--8<---------------cut here---------------start------------->8---
(system* #+(file-append (default-guile) "/bin/guile")
         "--no-auto-compile"
         #$(preserve-target user-builder))
--8<---------------cut here---------------end--------------->8---

while the packages in USER-BUILDER will still be cross-built.  However,
because the builder has

    (with-extensions gcrypt-sqlite3&co
         (use-modules (gnu store database))
      ...)

this makes the native guile "see" the cross-built .GO files.  That would
"only" be a secondary problem except that loading (sqlite3) throws an
exception when dynamic-loading the .SO fails.  Seeing it like this I am not so
sure anymore this is a bug, WDYT?  ...so instead

...the problem is now avoided by removing the sqlite dependency when
cross-building by not registering closures and postponing the loading of (gnu
store database) and thus (sqlite3).

I have reset wip-hurd-vm onto these changes, so you can also look there.
Doing

    ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
        gnu/system/examples/bare-hurd.tmpl

now produces a pretty nice hurd VM :-)

Greetings,
Janneke

Jan (janneke) Nieuwenhuizen (3):
  utils: Move 'reset-timestamps' out of database.
  system: vm: Do not register-closures when cross-building.
  system: vm: Build vm-image using native qemu.

 gnu/bootloader/grub.scm |  4 +--
 gnu/build/vm.scm        |  3 ++-
 gnu/system/vm.scm       | 54 ++++++++++++++++++++++++++---------------
 guix/store/database.scm | 41 +++----------------------------
 guix/utils.scm          | 41 ++++++++++++++++++++++++++++---
 5 files changed, 79 insertions(+), 64 deletions(-)

-- 
2.26.0

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


[Message part 3 (message/rfc822, inline)]
From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 41350-done <at> debbugs.gnu.org,
 Jan Nieuwenhuizen <janneke <at> gnu.org>
Subject: Re: bug#41350: [PATCH 0/3] Use native qemu to build vm-image.
Date: Thu, 29 Sep 2022 16:17:12 +0200
Hey Maxim,

Building 'vm-image' does not involve QEMU anymore so we can close this
one.

Thanks,

Mathieu


This bug report was last modified 2 years and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.