From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#28265: guix system build fails Date: Wed, 30 Aug 2017 11:07:21 +0200 Message-ID: <8760d577au.fsf@gnu.org> References: <20170828185232.GH1618@macbook42.flashner.co.il> <20170828211535.3c6b2053@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmyyl-0002ww-Mx for bug-guix@gnu.org; Wed, 30 Aug 2017 05:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmyyf-0003mS-Ue for bug-guix@gnu.org; Wed, 30 Aug 2017 05:08:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmyyf-0003mM-RO for bug-guix@gnu.org; Wed, 30 Aug 2017 05:08:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmyyf-0006x2-I6 for bug-guix@gnu.org; Wed, 30 Aug 2017 05:08:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20170828211535.3c6b2053@cbaines.net> (Christopher Baines's message of "Mon, 28 Aug 2017 21:15:35 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Christopher Baines Cc: 28265@debbugs.gnu.org Hello! Christopher Baines skribis: > On Mon, 28 Aug 2017 21:52:32 +0300 > Efraim Flashner wrote: > >> efraim@macbook42:~/workspace/guix$ time nice ./pre-inst-env guix >> system build ~/lightweight-desktop.scm Backtrace: >> 11 (primitive-load >> "/home/efraim/workspace/guix/scripts/gu=E2=80=A6") In guix/ui.scm: >> 1331:12 10 (run-guix-command _ . _) >> In ice-9/boot-9.scm: >> 837:9 9 (catch _ _ # >> =E2=80=A6) 837:9 8 (catch _ _ # >> =E2=80=A6) In guix/scripts/system.scm: >> 1022:8 7 (_) >> 905:6 6 (process-action _ _ _) >> In guix/store.scm: >> 1441:24 5 (run-with-store _ _ #:guile-for-build _ #:system _) >> In guix/scripts/system.scm: >> 637:2 4 (_ _) >> In gnu/system.scm: >> 884:4 3 (_ _) >> In gnu/bootloader/grub.scm: >> 343:29 2 (grub-configuration-file #< =E2= =80=A6> >> =E2=80=A6) 207:30 1 (eye-candy #< bootloader:= #<=E2=80=A6> >> =E2=80=A6) 149:22 0 (grub-background-image #<= bo=E2=80=A6> >> =E2=80=A6) >>=20 >> gnu/bootloader/grub.scm:149:22: In procedure grub-background-image: >> gnu/bootloader/grub.scm:149:22: In procedure struct_vtable: Wrong >> type argument in position 1 (expecting struct): 5 >>=20 > > I tried this, and got the same error, but then I deleted all the .go > files, re-ran make, and then tried again, and then it worked. Yeah, this kind of error is typical of an ABI mismatch. The reason is that in Guile, record field accessors of SRFI-9 record types are inlined: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(srfi srfi-9) scheme@(guile-user)> (define-record-type (make-foo x) foo? (x foo-x)) scheme@(guile-user)> ,expand (foo-x bar) $2 =3D (let ((s bar)) (if ((@@ (srfi srfi-9) eq?) ((@@ (srfi srfi-9) struct-vtable) s) ) ((@@ (srfi srfi-9) struct-ref) s 0) (let ((s* s)) ((@@ (srfi srfi-9) throw) 'wrong-type-arg 'foo-x "Wrong type argument: ~S" ((@@ (srfi srfi-9) list) s*) ((@@ (srfi srfi-9) list) s*))))) --8<---------------cut here---------------end--------------->8--- The (struct-ref s 0) above becomes incorrect if, say, we add a field right before =E2=80=98x=E2=80=99, because =E2=80=98x=E2=80=99 would now be = at offset 1. The safe solution here is to =E2=80=9Cmake clean-go && make=E2=80=9D. Ludo=E2=80=99.