From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2Ha8DSSeQWVSQQAAauVa8A:P1 (envelope-from ) for ; Wed, 01 Nov 2023 01:39:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2Ha8DSSeQWVSQQAAauVa8A (envelope-from ) for ; Wed, 01 Nov 2023 01:39:00 +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 7CE713E0EA for ; Wed, 1 Nov 2023 01:38:59 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=MQzRu4ML; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (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=1698799140; a=rsa-sha256; cv=none; b=T5Q7xxuxdskyAmY/w6fxprL7vdq0dogFUbyJqfDR0ZJ7RcdN4QkOCZkP3DDOpWRdV8Okh8 Nc/gES6ThC7lezJbFH2XACJ0VeohmEUiqrROiArvrIx/fvgde8N3HjR5S6mT6kXfMwRo6a qS+zyfNOp6yZ0yrm+jyVWotjjzONnZRIpeE9PvQzklWOexcFmKO0Zc+9w924r/xtCOfINY tCvs9Li5wjHpJapL+X2216BhYYigiBH8/YFvG5r93gOjEcMWy+bo4W+uyPa+RFF5oWkby3 6eGwVAs4UI+ABFNyKF31AQDOHq2jd+DOdg/8RSZSr5DBqboDDLTDrsvnsUDs9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698799140; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=/OroI4I4xhyXg4m5L6YgSHCR9VaAknHIfgiCID/jbGs=; b=iX7lneCF4EvVp8sytLFvefEmfQE4pFPK0Amiameg7c3Xgk6n/rbtGCm1kfxDg+oAVoKnIo //qIKrc7kS8jFtC3QYD1WaORBodzWERuB9futSNC1v96d2YElGyIDg2QGRbt5JDx2NR7nT 9saj4dc6vIKFf92g1wRGYWSmc1chNIaemmrdyGIgcY7qxdtj2rbwVaY/G1Kj32DO0M6/aO MG7+2SP4ZrOtHZYAW+6U5wW0VqWyYZdhuDVl6Nch+DKqpa0OEpFQup3Tvc9anRGxk5HkHV rT+8eABhivCJ7sufIcmm0jFKnaOjJslVxOdVkARFFi4mQHU7Va7UivQKJWJJXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=MQzRu4ML; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxzFj-0004Pw-2k; Tue, 31 Oct 2023 20:38:35 -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 1qxzFc-0004Mz-Gw for bug-guix@gnu.org; Tue, 31 Oct 2023 20:38:29 -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 1qxzFb-0005aE-Rj for bug-guix@gnu.org; Tue, 31 Oct 2023 20:38:28 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxzG9-0004QE-R9 for bug-guix@gnu.org; Tue, 31 Oct 2023 20:39:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#66864: emacs-build-system builds .eln-files with mismatching path-hashes Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 01 Nov 2023 00:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66864 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 66864@debbugs.gnu.org Cc: dev@jpoiret.xyz, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, andrew@trop.in X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169879913716986 (code B ref -1); Wed, 01 Nov 2023 00:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2023 00:38:57 +0000 Received: from localhost ([127.0.0.1]:49522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxzG1-0004Pp-MY for submit@debbugs.gnu.org; Tue, 31 Oct 2023 20:38:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:54338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxzFw-0004PU-GM for submit@debbugs.gnu.org; Tue, 31 Oct 2023 20:38:52 -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 1qxzF9-0004Bp-5d for bug-guix@gnu.org; Tue, 31 Oct 2023 20:38:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxzF4-0005Tk-IP for bug-guix@gnu.org; Tue, 31 Oct 2023 20:37:58 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 99177240027 for ; Wed, 1 Nov 2023 01:37:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1698799069; bh=dAMII0QcQeexCHENQmXOLGzh2Vs5zV9dYMJkIealysw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=MQzRu4MLvmf5O82V/c/YBaZva0Hpy2QBWTlFQ7NzPbxPKLmedK65+4Z1GUJWc4e9q pgSk5TURA5RwQgGoTwazfTPwGuJl+OJ3FftfPqBhbSMtpgJby0Jk853t/F5fO4yiZz drgxfGlECJQkCi0rj0YQvQ6or3O3UBx9Da4Q6MqyR3A5DWIRGntE/HiswISIMwiIiw ZZkx/3pFYfdsbH//MS/T+HtIVGjhdmm+m7ZbN8RQXi3s6fh4YY4XixQhJcWBOEo3qS t3wnMWWyQSU2yWn8jPrtrwyVxamUBgxQ5u/CYn9S3px8nSp42Wk638DCxl59ktoiOk rN6d4G+SkKQJg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SKp4r2TVpz9rxB; Wed, 1 Nov 2023 01:37:48 +0100 (CET) From: Mekeor Melire Date: Tue, 31 Oct 2023 23:49:49 +0000 Message-ID: <8734xq48dd.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Scanner: mx11.migadu.com X-Spam-Score: 4.19 X-Migadu-Queue-Id: 7CE713E0EA X-Migadu-Spam-Score: 4.19 X-TUID: YqpC/GLbeb3a BUG EXPLANATION Emacs's natively-compiled .eln-files have a basename following the pattern "{feature-name}-{path-hash}-{content-hash}.eln". [0] Guix' emacs-build-system is used to build Emacs-related packages. By default, it uses the "emacs-minimal" package during build, which does not support native-compilation. But if you replace the "emacs-minimal" input with "emacs-no-x", e.g. by using --with-input=emacs-minimal=emacs-no-x, then emacs-build-system will make use of emacs-no-x' support of native-compilation [1]: The build will contain .eln-files. 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). BUG REPRODUCTION To reproduce this bug follow the following steps. Please note that guix-shell seems to leak .eln-files. (This should be reported as another bug.) That why the reproduction steps avoid guix-shell. Instead, we'll work with the current user profile. Delete Emacs' eln-cache (so that we can later see if new .eln-files have been generated): rm -rf ~/.emacs.d/eln-cache Remove all Emacs- and Emacs-related packages from Guix profile: guix package -I | cut -f 4 | grep emacs | xargs guix remove Install Emacs and emacs-unfill, as exemplary package, while replacing input "emacs-minimal" with "emacs", so that .eln-files are generated during the build: guix install emacs emacs-unfill --with-input=emacs-minimal=emacs Launch the freshly installed Emacs and load the "unfill" package. If the .eln-files that the emacs-unfill package provides match Emacs' expectations (path- and content-hash), it'll use it; otherwise, Emacs will compile a new .eln-file and save it into ~/.emacs.d/eln-cache/*/unfill-{path-hash}-{content-hash}.eln. emacs -q --eval "(require 'unfill)" Close Emacs after some seconds. Now determine the path-hash from Guix' build: basename ~/.guix-profile/lib/emacs/native-site-lisp/*/unfill-*.eln \ | cut -d - -f 2 Determine the path-hash from Emacs' native-compilation, which apparently has happened: basename ~/.emacs.d/eln-cache/*/unfill*.eln \ | cut -d - -f 2 The path-hashes from the last two steps are not equal. BUG SOLUTION HINTS In the #guix:libera.chat IRC channel, jpoiret pointed out: "the .eln file hash problem is due to grafts, grafts change the final output name, but they can't also update the file hashes... we'd need to modify emacs' behavior for this to work". CITATIONS [0]: Emacs' source code documents the meaning of the two hashes here: https://git.sv.gnu.org/cgit/emacs.git/tree/src/comp.c?h=194a8f5c1406dd7e762376bdfde78d1b7d01b6b1#n4405 [1]: Here you can see that emacs-no-x supports native-compilation unlike emacs-minimal: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/emacs.scm?h=92913703448c8e1a488ab066f60741262cdbf923#n294