From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#30021: system build: unable to parse multi-line device-mapping Date: Mon, 08 Jan 2018 00:46:54 -0500 Message-ID: <874lnwdhrl.fsf@netris.org> References: <87efn11190.fsf@aikidev.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYQI2-0001dV-V7 for bug-guix@gnu.org; Mon, 08 Jan 2018 00:48:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYQHy-0007gp-WE for bug-guix@gnu.org; Mon, 08 Jan 2018 00:48:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYQHy-0007gN-SD for bug-guix@gnu.org; Mon, 08 Jan 2018 00:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eYQHy-00025Q-Bf for bug-guix@gnu.org; Mon, 08 Jan 2018 00:48:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87efn11190.fsf@aikidev.net> (Vagrant Cascadian's message of "Sun, 07 Jan 2018 19:24:27 -0800") 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: Vagrant Cascadian Cc: 30021@debbugs.gnu.org Hi, Vagrant Cascadian writes: > After several weeks of not using a machine, and updating guix to > > guix (GNU Guix) c04ffadbed7412545555b8be6b78f23eed150d26 > > > Running "guix build system /etc/config.scm" resulted in: > > guix system: error: failed to load '/etc/config.scm': > /etc/config.scm:23:9: /etc/config.scm:23:9: In procedure allocate-struct: Wrong type argument in\ > position 2: 3 > > > This roughly corresponded to my mapped device section in > /etc/config.scm: > > (mapped-devices > (list (mapped-device > (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74")) > (target "cryptic") > (type luks-device-mapping)))) I ran into the same problem. > Moving it all into a single line worked around the issue, but is a good > deal harder to read: > > (mapped-devices (list (mapped-device (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74")) (target "cryptic") (type luks-device-mapping)))) > > > My guess is it has something to do with some commits relating to > validating mapped devices: > > 42ff7d3be642d66ba567f64882a1f2301b1a7bd9 > mapped-devices: 'luks-device-mapping' checks its source device. > > 4ca90ff5976434a2b6e758df38df54387ae70c1b > mapped-devices: Add 'location' and 'check' fields. You're right that it has to do with those commits, but the work around simply involves forcing a recompilation of /etc/config.scm. *Any* change to config.scm would have fixed the problem, or alternatively you could have deleted ~/.cache/guile/ccache. In any case, you can now reformat the mapped device section as it was before, and it will continue to work. What happened here is that commit 4ca90ff5 added two fields to the record type. For efficiency reasons, the 'mapped-device' record constructor (used in /etc/config.scm) is an *inlined* procedure. Unfortunately this means that the compiled version of /etc/config.scm in ~/.cache/guile/ccache was still creating the old record type. Guile is not able to detect this case, so the cache must be manually invalidated somehow. Mark