Subject: ‘guix build --target’ crashes
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Wed, 06 Nov 2019 23:11:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I noticed this:

--8<---------------cut here---------------start------------->8---
$ guix build coreutils --target=arm-linux-gnueabihf -n
Backtrace:
In srfi/srfi-1.scm:
   592:29 19 (map1 (("diffutils" #<package [email-masked] guix/b…>) …))
   592:29 18 (map1 (("patch" #<package [email-masked] guix/build-s…>) …))
   592:29 17 (map1 (("findutils" #<package [email-masked] guix…>) …))
   592:29 16 (map1 (("gawk" #<package [email-masked] guix/build-sys…>) …))
   592:29 15 (map1 (("sed" #<package [email-masked] gnu/packages/comme…>) …))
   592:29 14 (map1 (("grep" #<package [email-masked] gnu/packages/com…>) …))
   592:29 13 (map1 (("coreutils" #<package [email-masked] guix/…>) …))
   592:17 12 (map1 (("make" #<package [email-masked] gnu/packages/c…>) …))
In guix/packages.scm:
   991:16 11 (expand-input #<store-connection 256.99 7fcc0b0c5ae0> # …)
   948:16 10 (cache! #<weak-table 110/223> #<package [email-masked] gnu…> …)
  1267:22  9 (thunk)
  1200:25  8 (bag->derivation #<store-connection 256.99 7fcc0b0c5ae0> …)
In srfi/srfi-1.scm:
   592:29  7 (map1 (("source" #<origin "mirror://gnu/make/make-…>) …))
   592:17  6 (map1 (("pkg-config" #<package pkg-config-arm-linu…>) …))
In guix/packages.scm:
   991:16  5 (expand-input #<store-connection 256.99 7fcc0b0c5ae0> # …)
   948:16  4 (cache! #<weak-table 110/223> #<package pkg-config-arm…> …)
  1266:22  3 (thunk)
   948:16  2 (cache! #<weak-table 118/223> #<package pkg-config-arm…> …)
  1050:19  1 (thunk)
In guix/build-system/trivial.scm:
     37:0  0 (lower _ #:source _ #:inputs _ #:native-inputs _ # _ # _ …)

guix/build-system/trivial.scm:37:0: In procedure lower:
Unrecognized keyword: #:implicit-inputs?
$ guix describe
Generacio 114   Nov 02 2019 11:32:51    (nuna)
  guix ab1c063
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: ab1c063ab08e069fbe62919828fa634a2e222bbf
--8<---------------cut here---------------end--------------->8---

Adding “-L /var/empty” on the command line lets the problem go away,
suggesting that it has to do with file load order (package cache vs. no
package cache).  Likewise, to reproduce with ./pre-inst-env, do:

  ./pre-inst-env guix build --target=arm-linux-gnueabihf -n -e '(@ (gnu packages base) coreutils)'

… which has the same effect as going through the package cache.

From a quick look, this regression was introduced by a commit in the
861907f01efb1cae7f260e8cb7b991d5034a486a..bd04fe878627a14533d908ccdf5b906050d6e0a4
range, presumably one touching ‘package-with-explicit-inputs’.

To be continued…

Ludo’.