Subject: bug#54292: Commit e8518c43 breaks guix pull on i686

From: Liliana Marie Prikler <[email-masked]>
Date: Tue, 08 Mar 2022 16:32:48 +0100

Am Dienstag, dem 08.03.2022 um 09:00 +0100 schrieb Liliana Marie
Prikler:
> > I do think this is an issue with commit e8518c43 because
> > 
> > --8<---------------cut here---------------start------------->8---
> > guix pull --commit=e8518c43 --system=i686-linux -p /tmp/guix
> > --8<---------------cut here---------------end--------------->8---
> > 
> > fails to build the package cache whereas 
> > 
> > --8<---------------cut here---------------start------------->8---
> > guix pull --commit=75f9f944 --system=i686-linux -p /tmp/guix
> > --8<---------------cut here---------------end--------------->8---
> > 
> > succeeds (75f9f944 being the parent commit of e8518c43).  I even ran
> > these with --substitute-urls=https://bordeaux.guix.gnu.org in a
> > freshly downloaded instance of the 1.3.0 QEMU image [5] to rule out
> > corrupted substitutes from berlin with the same result.
> For the sake of completeness, I'll be running this with --no-
> substitutes and see what happens.  If you want to try the same without
> rebuilding the world, I suggest first pulling
> b5f654b238dd3dec43b0ee9e08b78981cf8de981 with substitutes -- that is
> the last commit before the series. 
Okay, I now have the confirmation that this fails even "without any
substitutes" (I only had the guix package itself substituted to cut out
a little of the bootstrap chain).  I also have a full backtrace:

In gnu/packages.scm:
   437:11 19 (generate-package-cache _)
In srfi/srfi-1.scm:
   460:18 18 (fold #<procedure expand-cache expr> _ _)
In guix/packages.scm:
   518:21 17 (expand-cache . _)
  1260:17 16 (supported-package? #<package [email-masked] gnu/pack…>
…)
In guix/memoization.scm:
    101:0 15 (_ #<hash-table a794e00 4898/7027> #<package chez-fmt@…>
…)
In guix/packages.scm:
  1230:12 14 (_)
In srfi/srfi-1.scm:
   460:18 13 (fold #<procedure ba84a30 at guix/packages.scm:1230:18…>
…)
In guix/packages.scm:
  1234:42 12 (_ _ ("x86_64-linux" "i686-linux" "armhf-linux" "aar…" …))
In guix/memoization.scm:
    101:0 11 (_ #<hash-table a794e00 4898/7027> #<package chez-sche…>
…)
In guix/packages.scm:
  1230:12 10 (_)
In srfi/srfi-1.scm:
   460:18  9 (fold #<procedure ba84960 at guix/packages.scm:1230:18…>
…)
In guix/packages.scm:
  1234:42  8 (_ _ ("x86_64-linux"))
In guix/memoization.scm:
    101:0  7 (_ #<hash-table a794e00 4898/7027> #<package [email-masked].…>
…)
In guix/packages.scm:
  1238:37  6 (_)
  1498:16  5 (package->bag _ _ _ #:graft? _)
  1603:43  4 (thunk)
In gnu/packages/chez.scm:
   457:28  3 (arguments #<package [email-masked] gnu/packages/…>)
    65:16  2 (chez-machine->threaded #f)
In unknown file:
           1 (string-ref #f 0)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)

The error appears to be that nix-system->chez-machine was rather poorly
coded and overlooked in review.  In particular, i686 should probably
also default to the i386 case.

Cheers