From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GOy5GUc8QmVwYAAAauVa8A:P1 (envelope-from ) for ; Wed, 01 Nov 2023 12:53:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GOy5GUc8QmVwYAAAauVa8A (envelope-from ) for ; Wed, 01 Nov 2023 12:53:43 +0100 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 141BA3408D for ; Wed, 1 Nov 2023 12:53:43 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="N/fvoM18"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698839623; 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:dkim-signature; bh=Wi99bS5Wt+aXeMcsWk2TgJVTCHz8FjeVuarUtI+neEg=; b=fd919KGdqkvQOWTqFNLpqL4pK98w4Ct5x057UGNKl8311kG28qMj176Zlud3EWcyzqm7tf 4rU+T+1ILIeEiORI5/c6cUxUwrZA9G9yOQr1HkbS62wZ6JGex0ZeInVRGe1LZipgXGozOh lezKgj9NxzPIfi83lbHZSl1s0OsHADyBjBsG3cEkriuFsF545zuF2b78iYkOzfMtFlIHo+ x2BhsRegpZYl04kPZpjPS5y9k3gJgrSIt5vXEehYWpgN3wMdYiaaQWZdKI4DZdU9DSksyK I7v62BsQUSR4w9RXLh30R8I9yFJTH1gttUqixDzpsek4uDH63RTkMWPol2XOHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="N/fvoM18"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698839623; a=rsa-sha256; cv=none; b=EHFezDeyf7wUG7N1PQnOffaZtYqRlg+Awj4YVg1LgV+NX/lufqSKdAEEYDuF2kNc/CPgR2 Kof1DBaP38+z/GWp/DK5w5R3WBya40LCKy41u+Q4vwwe06M9cmaBkcAl+IXkJNcVYipp2Z EkVd9hiWk0VkJypXdO3COKI68vQhFsk38eLyiU6lADWqSGO2QqD4p+iUzMMY1+CEp2x/zv SjwLibuOFu1xbbuPj3U5/xFyRHUUWp9/cVO8qFKo6BDKz9doUyeSi89HWSQN2c+kLr6R2U NI2LSA0basWujulpnKakljyKsBXj7F4M3nPUUHN4ttdReqa+YcV8822Q41IYuw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qy9ms-0006a6-L6; Wed, 01 Nov 2023 07:53:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qy9mq-0006ZL-RS for bug-guix@gnu.org; Wed, 01 Nov 2023 07:53:28 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qy9mq-0003Wn-9E for bug-guix@gnu.org; Wed, 01 Nov 2023 07:53:28 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qy9nO-0005QB-CG for bug-guix@gnu.org; Wed, 01 Nov 2023 07:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#66864: emacs-build-system builds .eln-files with mismatching path-hashes Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 01 Nov 2023 11:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66864 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mekeor Melire , 66864@debbugs.gnu.org Cc: dev@jpoiret.xyz, cox.katherine.e+guix@gmail.com, andrew@trop.in Received: via spool by 66864-submit@debbugs.gnu.org id=B66864.169883958420747 (code B ref 66864); Wed, 01 Nov 2023 11:54:02 +0000 Received: (at 66864) by debbugs.gnu.org; 1 Nov 2023 11:53:04 +0000 Received: from localhost ([127.0.0.1]:50066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy9mS-0005OY-6i for submit@debbugs.gnu.org; Wed, 01 Nov 2023 07:53:04 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:45235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy9mQ-0005O0-6m for 66864@debbugs.gnu.org; Wed, 01 Nov 2023 07:53:03 -0400 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-32f7bd27c2aso3190284f8f.2 for <66864@debbugs.gnu.org>; Wed, 01 Nov 2023 04:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698839541; x=1699444341; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Wi99bS5Wt+aXeMcsWk2TgJVTCHz8FjeVuarUtI+neEg=; b=N/fvoM18hjJlSILORmMDwrfXhgUEMziwdmIbJly1d/O7bW3kBcnyoZ2OSjlmMttwG8 DcNUbteCdoOkSD1YK1D/+kyHwJKVmib85d/fHFw9Eb6mpuVOoittSFU4aE7qmuORlDCh b3CkQGnPvuOBN5vT117NEc1IamUhCFBK/q17bAtixPj4xazUbh9GqB0eZ3myAPPR97nP YdxTDIIsV74YiLLMJz43MJ3wdmfCQ+xe+BlsiLIQNatqpO5+QXM8BWaXW0utRe5imCuR EPuvXrlYRzwupJ2I/zp5pERfDG/fl7WHlLjM0Ezxlzz8SDl/Rp8dNeNmyGIu/AlLmrXo n7Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698839541; x=1699444341; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Wi99bS5Wt+aXeMcsWk2TgJVTCHz8FjeVuarUtI+neEg=; b=ESKjlD6p0/0ZbuboSyJKB2lU9EBcBHwUDfr/zXStqjNuZioU/5wfQzd64tQh6EU26J 7AbXAfRjXNoakgRpCiX9TneK4/H1DHkOKZxKGyd+33D8diGK9Fj+spyEQ+4AH3tzBlO1 DqaDDGsebWpjh374kSVglq7degEx85h7DCCYyLlrrXP+ZquBJ0mik6/IUjKyjwIkGcxG dFV6XQSocu0rQrYjE39A1BBajebsCjQsxYvCE4AAKJSnabW9qTMzttRdyLUM8NNBstTm CnbLMrlwS401NdiaHsTNSg8vk6c3C6f5dFyUVc3KhjDp6p2pKTq4Io6RY4nggyhbw4b+ xbCA== X-Gm-Message-State: AOJu0YzvvEAeJO5c8zqWU71FETNqMVO3Gweu3HN6wtA4SdanNWeHujXA y2FQdTqZlOKzFUJmc5oKjRGFm7vJWT2HLw== X-Google-Smtp-Source: AGHT+IE96boApKCPto+AQWaFGLRPsw9Mf34DOaNx+9XcnbGPM9V72yKT3874BkXM7asYRTxKWYB3rw== X-Received: by 2002:a5d:47cb:0:b0:32f:8032:cc45 with SMTP id o11-20020a5d47cb000000b0032f8032cc45mr12147481wrc.15.1698839541166; Wed, 01 Nov 2023 04:52:21 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id q11-20020a5d658b000000b0032dcb08bf94sm3987613wru.60.2023.11.01.04.52.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 04:52:20 -0700 (PDT) Message-ID: <82eff0d4c81512f13f7c6b28671af364ec13de87.camel@gmail.com> From: Liliana Marie Prikler Date: Wed, 01 Nov 2023 12:52:19 +0100 In-Reply-To: <8734xq48dd.fsf@posteo.de> References: <8734xq48dd.fsf@posteo.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 5.89 X-Spam-Score: 5.89 X-Migadu-Queue-Id: 141BA3408D X-Migadu-Scanner: mx10.migadu.com X-TUID: ub0jtSjnTYMB Am Dienstag, dem 31.10.2023 um 23:49 +0000 schrieb Mekeor Melire: > BUG EXPLANATION >=20 > Emacs's natively-compiled .eln-files have a basename following the > pattern "{feature-name}-{path-hash}-{content-hash}.eln". [0] >=20 > Guix' emacs-build-system is used to build Emacs-related packages. By=20 > =C2=A0default, it uses the "emacs-minimal" package during build, which= =20 > =C2=A0does not support native-compilation. But if you replace the=20 > =C2=A0"emacs-minimal" input with "emacs-no-x", e.g. by using=20 > =C2=A0--with-input=3Demacs-minimal=3Demacs-no-x, then emacs-build-system= =20 > =C2=A0will make use of emacs-no-x' support of native-compilation [1]:=20 > =C2=A0The build will contain .eln-files. >=20 > Hereby I'd like to report the bug that consists of mismatched path- > hashes in the .eln-files that builds of Emacs-related packages > contain when build with emacs-no-x (or any other Emacs that supports > native compilation). >=20 > BUG REPRODUCTION >=20 > To reproduce this bug follow the following steps. Please note that > guix-shell seems to leak .eln-files. (This should be reported as=20 > another bug.) What do you mean by "leaks .eln-files"? > That why the reproduction steps avoid guix-shell. Instead, we'll > work with the current user profile. >=20 > Delete Emacs' eln-cache (so that we can later see if new=20 > .eln-files have been generated): >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0rm -rf ~/.emacs.d/eln-cac= he >=20 > Remove all Emacs- and Emacs-related packages from Guix profile: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0guix package -I | cut -f = 4 | grep emacs | xargs guix remove >=20 > Install Emacs and emacs-unfill, as exemplary package, while=20 > replacing input "emacs-minimal" with "emacs", so that .eln-files=20 > are generated during the build: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0guix install emacs emacs-= unfill=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0--with-input=3Demacs-mini= mal=3Demacs Just deleting the eln-cache should be enough for a MWE. When doing an MWE, make sure that its actually minimal :) > Launch the freshly installed Emacs and load the "unfill" package.=20 > If the .eln-files that the emacs-unfill package provides match=20 > Emacs' expectations (path- and content-hash), it'll use it;=20 > otherwise, Emacs will compile a new .eln-file and save it into=20 > ~/.emacs.d/eln-cache/*/unfill-{path-hash}-{content-hash}.eln. >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0emacs -q --eval "(require= 'unfill)" >=20 > Close Emacs after some seconds. Now determine the path-hash from=20 > Guix' build: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0basename=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0~/.guix-profile/lib/emacs= /native-site-lisp/*/unfill-*.eln \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | cut -d - -f 2 >=20 > Determine the path-hash from Emacs' native-compilation, which=20 > apparently has happened: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0basename ~/.emacs.d/eln-c= ache/*/unfill*.eln \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | cut -d - -f 2 This is already the bug. There should not be a file written to the eln-cache (save for the trampolines that we still write there, which is also a known bug among those who care). > The path-hashes from the last two steps are not equal. >=20 > BUG SOLUTION HINTS >=20 > In the #guix:libera.chat IRC channel, jpoiret pointed out: "the .eln > file hash problem is due to grafts, grafts change the=20 > final output name, but they can't also update the file hashes...=20 > we'd need to modify emacs' behavior for this to work". As jpoiret points out, this has to do with the file naming choices of Emacs, not with emacs-build-system per se. We would need to get rid of a lot of hashes if we wanted interoperable native-compiled Emacs libraries. I wonder what upstream has to say about this. Cheers