GNU bug report logs - #42327
'%current-system' value influences 'bag-transitive-inputs'

Previous Next

Package: guix;

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

Date: Sat, 11 Jul 2020 22:03:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42327 in the body.
You can then email your comments to 42327 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#42327; Package guix. (Sat, 11 Jul 2020 22:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 11 Jul 2020 22:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: Offload build to Childhurd selects linux-libre-headers
Date: Sun, 12 Jul 2020 00:01:54 +0200
[Message part 1 (text/plain, inline)]
Hi!

The offload build works, yay!...all the way up to

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build --system=i586-gnu \
   -e '(@@ (gnu packages commencement) glibc-final-with-bootstrap-bash)'
/gnu/store/cah6lzl8cxdhfink3a1ij0m1p5vk66kw-glibc-intermediate-2.31-debug
/gnu/store/i7l6dnq6br3jg5qzhfssrp11mg499d2b-glibc-intermediate-2.31
/gnu/store/lr2ymww5imjl3hxrzyc7dmsadw7dxbdh-glibc-intermediate-2.31-static
--8<---------------cut here---------------end--------------->8---

With static-bash-for-glibc, however, it goes off track

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build --system=i586-gnu \
   -e '(@@ (gnu packages commencement) static-bash-for-glibc)'
The following derivations will be built:
   /gnu/store/gv40jpz4g0hbia28wa6d50z9x6ncgdlh-bash-static-5.0.16.drv
   /gnu/store/apj2ihazv6x3anhvfvmmqrkyak05p9yc-gcc-cross-boot0-wrapped-7.5.0.drv
   /gnu/store/yfpy5b3xqkarxchyhi339fw2ldwczj1d-linux-libre-headers-5.4.20.drv
--8<---------------cut here---------------end--------------->8---

...oops!  Note that a native build on the Childhurd works all the way up
to "hello".

The "glibc-final-with-bootstrap-bash" has a propagated-inputs that looks
like this

--8<---------------cut here---------------start------------->8---
(define* (kernel-headers-boot0 #:optional (system (%current-system)))
  (match system
    ("i586-gnu" hurd-core-headers-boot0)
    (_ linux-libre-headers-boot0)))

(define glibc-final-with-bootstrap-bash
   [..]
   (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
   [..])
--8<---------------cut here---------------end--------------->8---

In KERNEL-HEADERS-BOOT0, SYSTEM is "x86_64-linux".  Passing SYSTEM from
a LET-SYSTEM clause (see attached patch) seems to fix this...but i'm
afraid that triggers a world rebuild.  Our offload Childhurds can only
run master, right?  Is there any way around this?  Thoughts?

Greetings,
--a-mildly-disappointed--
Janneke

[0001-commencement-glibc-final-with-bootstrap-bash-Fix-ker.patch (text/x-patch, inline)]
From 28bdd162e5430517df3957b8454c49d037d684ba Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke <at> gnu.org>
Date: Sat, 11 Jul 2020 22:44:39 +0200
Subject: [PATCH] commencement: glibc-final-with-bootstrap-bash: Fix
 kernel-headers.
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8

* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)
[propagated-inputs]: Use let-system to pass correct system
kernel-headers-boot0.
---
 gnu/packages/commencement.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d0393ebe25..518ffd0bd8 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages rsync)
   #:use-module (gnu packages xml)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -3298,7 +3299,8 @@ memoized as a function of '%current-system'."
                                      "export CPATH\n"
                                      all "\n")))
                    #t)))))))
-    (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
+    (propagated-inputs `(("kernel-headers" ,(let-system (system target)
+                                              (kernel-headers-boot0 system)))))
     (native-inputs
      `(("bison" ,bison-boot0)
        ("texinfo" ,texinfo-boot0)
-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

[Message part 3 (text/plain, inline)]
-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

Changed bug title to ''%current-system' value influences 'bag-transitive-inputs'' from 'Offload build to Childhurd selects linux-libre-headers' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 13 Jul 2020 14:51:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 13 Jul 2020 14:53:02 GMT) Full text and rfc822 format available.

Notification sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
bug acknowledged by developer. (Mon, 13 Jul 2020 14:53:02 GMT) Full text and rfc822 format available.

Message #12 received at 42327-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jan Nieuwenhuizen <janneke <at> gnu.org>
Cc: 42327-done <at> debbugs.gnu.org
Subject: Re: bug#42327: Offload build to Childhurd selects linux-libre-headers
Date: Mon, 13 Jul 2020 16:52:02 +0200
[Message part 1 (text/plain, inline)]
Hi!

Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:

> With static-bash-for-glibc, however, it goes off track
>
> $ ./pre-inst-env guix build --system=i586-gnu \
>    -e '(@@ (gnu packages commencement) static-bash-for-glibc)'
> The following derivations will be built:
>    /gnu/store/gv40jpz4g0hbia28wa6d50z9x6ncgdlh-bash-static-5.0.16.drv
>    /gnu/store/apj2ihazv6x3anhvfvmmqrkyak05p9yc-gcc-cross-boot0-wrapped-7.5.0.drv
>    /gnu/store/yfpy5b3xqkarxchyhi339fw2ldwczj1d-linux-libre-headers-5.4.20.drv
>
>
> ...oops!  Note that a native build on the Childhurd works all the way up
> to "hello".
>
> The "glibc-final-with-bootstrap-bash" has a propagated-inputs that looks
> like this
>
> (define* (kernel-headers-boot0 #:optional (system (%current-system)))
>   (match system
>     ("i586-gnu" hurd-core-headers-boot0)
>     (_ linux-libre-headers-boot0)))
>
> (define glibc-final-with-bootstrap-bash
>    [..]
>    (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
>    [..])
>
> In KERNEL-HEADERS-BOOT0, SYSTEM is "x86_64-linux".  Passing SYSTEM from
> a LET-SYSTEM clause (see attached patch) seems to fix this...but i'm
> afraid that triggers a world rebuild.  Our offload Childhurds can only
> run master, right?  Is there any way around this?  Thoughts?

Here’s my powerful debugging trick for such dynamic binding issues (it’s
not related to offloading):

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d0393ebe25..5ec7facd02 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3116,6 +3116,9 @@ memoized as a function of '%current-system'."
               ,@(%boot0-inputs)))))
 
 (define* (kernel-headers-boot0 #:optional (system (%current-system)))
+  (when (string=? system "x86_64-linux")
+    (pk system)
+    (display-backtrace (make-stack #t) (current-error-port) #f 80))
   (match system
     ("i586-gnu" hurd-core-headers-boot0)
     (_ linux-libre-headers-boot0)))
[Message part 3 (text/plain, inline)]
That gives me this:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build -s i586-gnu hello -d --no-grafts

;;; ("x86_64-linux")
In ice-9/boot-9.scm:
  1736:10 30 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          29 (apply-smob/0 #<thunk 7f59f45ab580>)
In ice-9/boot-9.scm:
    718:2 28 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 27 (_ #(#(#<directory (guile-user) 7f59f41e8f00>)))
In guix/ui.scm:
  1953:12 26 (run-guix-command _ . _)
    663:2 25 (call-with-error-handling _)
In ice-9/boot-9.scm:
  1736:10 24 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
  1731:15 23 (with-exception-handler #<procedure 7f59f1f734b0 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ # _)
In guix/status.scm:
    776:4 22 (call-with-status-report _ _)
In ice-9/boot-9.scm:
  1736:10 21 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   631:22 20 (thunk)
   1299:8 19 (call-with-build-handler #<procedure 7f59f1f8c930 at guix/ui.scm:1069:2 (continue store things mod…> …)
In guix/scripts/build.scm:
    925:2 18 (_)
In ice-9/boot-9.scm:
  1731:15 17 (with-exception-handler #<procedure 7f59e300e750 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ # _)
  1736:10 16 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/ui.scm:
    440:6 15 (_)
In guix/scripts/build.scm:
    927:5 14 (_)
In srfi/srfi-1.scm:
   673:15 13 (append-map #<procedure 7f59e3015dc0 at guix/scripts/build.scm:927:17 (system)> ("i586-gnu"))
   586:17 12 (map1 ("i586-gnu"))
In guix/scripts/build.scm:
   929:20 11 (_ _)
In guix/store.scm:
   1340:2 10 (map/accumulate-builds #<store-connection 256.99 7f59f1fb09b0> _ _)
In srfi/srfi-1.scm:
   586:17  9 (map1 (#<package hello <at> 2.10 gnu/packages/base.scm:74 7f59e57f0820>))
In guix/store.scm:
   1299:8  8 (call-with-build-handler #<procedure build-accumulator (continue store things mode)> _)
In guix/scripts/build.scm:
   888:18  7 (_ _)
In guix/packages.scm:
  1075:16  6 (package-derivation _ #<package hello <at> 2.10 gnu/packages/base.scm:74 7f59e57f0820> _ #:graft? _)
  1393:22  5 (thunk)
    927:4  4 (bag->derivation #<store-connection 256.99 7f59f1fb09b0> #<<bag> name: "hello-2.10" system: "i586-…> …)
   812:23  3 (transitive-inputs _)
In gnu/packages/commencement.scm:
  3304:44  2 (propagated-inputs #<package glibc-intermediate <at> 2.31 gnu/packages/commencement.scm:3263 7f59e6856d20>)
  3121:23  1 (kernel-headers-boot0 _)
In unknown file:
           0 (make-stack #t)
--8<---------------cut here---------------end--------------->8---

At that point, it looks like a déjà-vu to me.  :-)

Should be fixed with efb10f175fa6323024aa471c58ea1da445085298.

Thanks,
Ludo’.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Aug 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 256 days ago.

Previous Next


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