Hi! We have made some great progress on "guix system vm-image" for the Hurd.
The "wip-hurd-vm" branch has been reset, and there now is only this one cross-build puzzle that we need to solve (until we hit the next problem ;-). Running ./pre-inst-env guix system vm-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl --verbosity=1 to cross build a VM-image for the Hurd on current "wip-hurd-vm" 9b25e0e4aa DRAFT services: hurd: Use activation-service, hurd-etc-service. will attepmt to also build a native, non-cross-built Hurd (in my case for x86_64), which fails. It could be that I am something silly, or we may not have noticed before because usually a native linux will already be available, and else it will succeeed. The diff below adds some debug printing, I get --8<---------------cut here---------------start------------->8--- 14:48:08 janneke@dundal:~/src/guix/wip-hurd-vm [env] $ ./pre-inst-env guix system vm-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl --verbosity=1 ;;; ("perform-action: getting packages") ;;; (" => " #<procedure 7fd69296e940 at guix/scripts/system.scm:803:42 (state)>) ;;; ("implicit mlet-lowering target=" "i586-pc-gnu") ;;; (" => " (#<package hurd@0.9-1.91a5167 gnu/packages/hurd.scm:376 7fd68b6406e0> #<package bash@5.0.16 ...)) ;;; ("calling system-derivation-for-action") ;;; ("hurd-etc-services: target=" "i586-pc-gnu") ;;; ("hurd-etc-services: target=" "i586-pc-gnu") ;;; (" => sys-object" #<procedure 7fd69223d800 at guix/gexp.scm:961:2 (state)>) ;;; ("implicit mlet-lower" "i586-pc-gnu") ;;; ("hurd-etc-services: target=" #f) ;;; ("hurd-etc-services: target=" #f) The following derivation will be built: /gnu/store/9s621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv process 2740 acquired build slot '/var/guix/offload/kluit.dezyne.org:22/0' load on machine 'kluit.dezyne.org' is 0.0 (normalized: 0.0) building /gnu/store/9s621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv... |offloading build of /gnu/store/9s621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv to 'kluit.dezyne.org' build of /gnu/store/9s621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv failed View build log at '/var/log/guix/drvs/9s/621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv.bz2'. guix system: error: build of `/gnu/store/9s621nadr6xcj74n1dl4c7gkvn8x0179-hurd-0.9-1.91a5167.drv' failed [1]14:48:17 janneke@dundal:~/src/guix/wip-hurd-vm [env] --8<---------------cut here---------------end--------------->8--- Any help/ideas greatly appreciated. I can add something like (target (pk "target" (%current-target-system))) (hurd (operating-system-hurd os)) (hurd (if target (with-parameters ((%current-target-system target)) hurd) hurd))) but that does not help; as (%current-target-system) migh be #f. Hardcoding TARGET to "i586-pc-gnu"..."works", but is not a solution: we certainly cannot do that for generic services. Greetings, janneke diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm index b3c71e69bd..9d2b94280b 100644 --- a/gnu/services/hurd.scm +++ b/gnu/services/hurd.scm @@ -22,6 +22,7 @@ #:use-module (gnu system) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix utils) #:export (hurd-etc-service)) ;;; Commentary: @@ -50,6 +51,7 @@ if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then . \"$GUIX_PROFILE/etc/profile\" fi\n")) (hurd (operating-system-hurd os))) + (pk "hurd-etc-services: target=" (%current-target-system)) (etc-service `(("services" ,(file-append net-base "/etc/services")) ("protocols" ,(file-append net-base "/etc/protocols")) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 2664c66a30..26c5208d9d 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -799,13 +799,24 @@ static checks." (check-initrd-modules os))) (mlet* %store-monad - ((sys (system-derivation-for-action os action + ((foo -> (pk "perform-action: getting packages")) + (packages -> (mlet %store-monad () (return (operating-system-packages os)))) + (foo -> (pk " => " packages)) + (foo -> (pk "implicit mlet-lowering target=" (%current-target-system))) + (packages packages) + (foo -> (pk " => " packages)) + (foo -> (pk "calling system-derivation-for-action")) + (sys-object -> (system-derivation-for-action os action #:file-system-type file-system-type #:image-size image-size #:full-boot? full-boot? #:container-shared-network? container-shared-network? #:mappings mappings)) + (foo -> (pk " => sys-object" sys-object)) + (foo -> (pk "implicit mlet-lower" (%current-target-system))) + (sys sys-object) + (foo -> (pk " => sys" sys)) ;; For 'init' and 'reconfigure', always build BOOTCFG, even if ;; --no-bootloader is passed, because we then use it as a GC root. ;; See <http://bugs.gnu.org/21068>. -- Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com