From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YB7rHScGSWFJDAAAgWs5BA (envelope-from ) for ; Tue, 21 Sep 2021 00:07:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oL+aGScGSWEWcgAA1q6Kng (envelope-from ) for ; Mon, 20 Sep 2021 22:07:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CC206CF59 for ; Tue, 21 Sep 2021 00:07:34 +0200 (CEST) Received: from localhost ([::1]:60762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSRRh-0006O9-Kx for larch@yhetil.org; Mon, 20 Sep 2021 18:07:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSR0A-0000nB-Qp for bug-guix@gnu.org; Mon, 20 Sep 2021 17:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSR0A-0005Dq-J7 for bug-guix@gnu.org; Mon, 20 Sep 2021 17:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSR0A-0007cs-Gk for bug-guix@gnu.org; Mon, 20 Sep 2021 17:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50696: [core-updates-frozen] Wrong output hashes computed since cb06f7c61e4b839 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 20 Sep 2021 21:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50696 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Marius Bakke Received: via spool by 50696-submit@debbugs.gnu.org id=B50696.163217390429247 (code B ref 50696); Mon, 20 Sep 2021 21:39:02 +0000 Received: (at 50696) by debbugs.gnu.org; 20 Sep 2021 21:38:24 +0000 Received: from localhost ([127.0.0.1]:44166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSQzX-0007bf-N1 for submit@debbugs.gnu.org; Mon, 20 Sep 2021 17:38:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSQzW-0007bR-Nt for 50696@debbugs.gnu.org; Mon, 20 Sep 2021 17:38:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47838) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSQzR-0004f3-HP for 50696@debbugs.gnu.org; Mon, 20 Sep 2021 17:38:17 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35920 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSQzR-0003LY-8N; Mon, 20 Sep 2021 17:38:17 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6k78u4z.fsf@gnu.org> Date: Mon, 20 Sep 2021 23:38:14 +0200 In-Reply-To: <87a6k78u4z.fsf@gnu.org> (Marius Bakke's message of "Mon, 20 Sep 2021 11:37:48 +0200") Message-ID: <87wnnbnd15.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50696@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632175654; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=df6wQ0psMLxe5hd9bU8CVbYrEwiR+o9hHQcEpO/0yLg=; b=qt0oFyd4UBYc5IjIINZ3DQWub1NqJwYHB6gNvRQq40d/Gfm0wVTR2I9Txv+mFCkWQvB5CQ xIndhOub3mq+/9n5Y7PhPqCWnHHWg98iQPlPSdSGD1UjYVvM3s3HbCTU1VnK9gAmtQCxkG ujP6EHNd5AHL0GEkoxIdedjRqocFkNI96B+nsmFAaEoX/wBU4MsSw9gHIxOqkax8N/UIU1 GN0vb+MkZQuQeD3W/uNwN6ecHdqwgqufcySE05301KcdByq8g0tOWWUELuvcio4MZxCe1f KoPegO46v/Bkp7//SZW2uGYsYbBay351Z4icW8jrv8J3Nj8JzDQm1P307dLAjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632175654; a=rsa-sha256; cv=none; b=AaBZYktfLBDzdkEKVCfXR7hb10YkqEE7yVaNUk7zJPm1S+Dl8BCfmKYW1l1NVo6zalaHjp y+bqNFKmhisw0OYCmnF6EJVWfZYIHUyxzNmbowsXWzPVUi3V9gKZ7VJjN3F6xFu2n2WHQ5 sZv71e87SEI6Zs2j3ILeujI1thC2N24iFlCU4vA32bUBaSPwiO7JZo5hu5zEg9aKILfHBa Pow0ldLiIvBvfk9ukUh3J5kRqyopDODNwUCOQH0d91OIUIzWykzZyTxSDG0tRB24mpXs4x NIegv8/Ua/KG39oFsdDUa9zxKCgLNIs7fdFKpU1UFSXh3ZKdXjbn0Y6Qw/ZaXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: CC206CF59 X-Spam-Score: -2.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: dvLli9wmeIW2 Hi Marius, Marius Bakke skribis: > On the 'core-updates-frozen' branch, attempting to pull 'master' gives a > backtrace along the lines of ... > > Computing Guix derivation for 'x86_64-linux'... |Backtrace: [...] > 1. &store-protocol-error: > message: "derivation `/gnu/store/szv5fh043rrqq01xpycp7xci4y7myqfk-g= uile-3.0.7.tar.xz.drv' has incorrect output `/gnu/store/qwjhql8lqw40fqhaqw4= 0jwqs0hc0248w-guile-3.0.7.tar.xz', should be `/gnu/store/0zliqv8lcw13f9iasy= 14kmwsqj3d309w-guile-3.0.7.tar.xz'" > status: 1 > > I bisected it down to cb06f7c61e4b: > > commit cb06f7c61e4b8393abf38f1f5891e03c33d53b9b > Author: Ludovic Court=C3=A8s > Date: Thu Sep 9 23:22:10 2021 +0200 > > base32: Provide an open-coded 'bit-field'. > > This improves the throughput of 'bytevector->base32-string' a bit. > > * guix/base32.scm (bit-field): New macro. The problem is that at -O1 with Guile 3.0.7 (which is the default for imported modules on =E2=80=98core-updates-frozen=E2=80=99 since 331a09654eb7e9f6212b7e8469077fa7393e8b11), that code gets miscompiled: --8<---------------cut here---------------start------------->8--- $ rm guix/base32.go $ guild compile -O1 guix/base32.scm -o guix/base32.go wrote `guix/base32.go' $ ./pre-inst-env guile GNU Guile 3.0.7 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> ,use(guix base32) scheme@(guile-user)> (nix-base32-string->bytevector "0wqd8sjmxfskrflaxywc7g= qw7sfawrfvdxd9skxawzfgyy0pzdz6") $1 =3D #vu8(230 180 126 128 240 207 124 168 250 212 169 244 186 92 228 202 = 232 206 240 60 140 248 170 168 200 83 184 90 164 64 13 112) scheme@(guile-user)> (bytevector->nix-base32-string $1) $2 =3D "000d0080l00k00h0l00c0h00w00a0hq0lh090hl0hh0g0000wh06" --8<---------------cut here---------------end--------------->8--- Long story short: the =E2=80=9Cbaseline compiler=E2=80=9D (-O0 and -O1) wou= ld erroneously translate (ash x N) to (ash x (- N)) when N is a literal: --8<---------------cut here---------------start------------->8--- scheme@(guix base32)> (compile '(lambda (x) (ash x -2)) #:to 'value #:env (= current-module) #:optimization-level 1) $46 =3D # scheme@(guix base32)> (compile '(lambda (x) (ash x -2)) #:to 'value #:env (= current-module) #:optimization-level 2) $47 =3D # scheme@(guix base32)> ($47 4) $48 =3D 1 scheme@(guix base32)> ($46 4) $49 =3D 16 --8<---------------cut here---------------end--------------->8--- Fixed upstream: https://git.savannah.gnu.org/cgit/guile.git/commit/?id=3D74abae04aa68dc18= 676bd84c4a73324b0613475d However I=E2=80=99m not sure how to work around the bug, other than by reve= rting the change. I=E2=80=99ll think a bit more about it. Thanks, Ludo=E2=80=99.