From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cAgJMzAh7GQJDQAA9RJhRA:P1 (envelope-from ) for ; Mon, 28 Aug 2023 06:23:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cAgJMzAh7GQJDQAA9RJhRA (envelope-from ) for ; Mon, 28 Aug 2023 06:23:12 +0200 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 55436674D8 for ; Mon, 28 Aug 2023 06:23:12 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=mfnGDiA9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693196592; a=rsa-sha256; cv=none; b=litYs9bMtAbvxAcI2YzQYgmhqm6my+dIRU2kZTGtclRplVP/onYSt2kepDdiMdtL8oaXwO JgqNY47K9htuEi7fBpGT/uzxIUsAM8EYVbTiIn7308FmQ0tpokUSCmWJdDERgY7pws4pvW nZEuS+Tq4GVB6FFCVPhtrWVEmeI4oSVeX6zzfvwndT+tadO+7i/c4KASPdxLMK3uyDedg2 iLlpyw/ImsWjEc3SHXb8oqIWEt0iHvNFErQxe3ArLk5hgX+lRf6SzQ6Q4W8WOqjLfOWP2p HZKgRhj/sXhxPg1ZrxiyyFJmb5GRsOhd1Ax1Wdq3FwuqKFCciBdNS/XmkOpUqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=mfnGDiA9; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693196592; h=from:from:sender:sender:reply-to: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=KEOVlidzL5E9MB/8ChPtp7SAmls2SP3QK/nGPaYnnTo=; b=hyQUBbZSe/Lw0bpgccZo9W9O/0QzsEHbcywExl7NA6JXlu95xUo46bd0I7PP6FaHwOiJza MZhL+1hjCR6UTKrGGDOzTeGoaOLEuEJclM3IYztz9pLm3/VwKi3ikRkUZ2N0OyLzLkxfrZ KSqBZRiGx/sW4zc4IiwM7pxp+3G4CICII7dlxfWxjvm+lkIxwvaRhUZfIfF50t5cMZcp1s B8aBc0hn4FctqurYjJSNTU0HCn91Q8+HwvuV7WPd7AqiwVFBBN9EKlXSAzj1VMy6TQ3z/Z le716sgfmo7MppoNQvvz0bfd1IRMtpUdujDYJl2Z/KTaQqLU4FpL0Mfa8TR3iA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaTmE-0006iH-4c; Mon, 28 Aug 2023 00:22:58 -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 1qaTmD-0006i4-4s for guix-patches@gnu.org; Mon, 28 Aug 2023 00:22:57 -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 1qaTmC-0004pF-TG for guix-patches@gnu.org; Mon, 28 Aug 2023 00:22:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaTmI-0002B3-Il for guix-patches@gnu.org; Mon, 28 Aug 2023 00:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65478] [PATCH emacs-team] gnu: emacs-flim-lb: Explicitly compile files to bytecode. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 28 Aug 2023 04:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 65478@debbugs.gnu.org, Andrew Tropin Received: via spool by 65478-submit@debbugs.gnu.org id=B65478.16931965498313 (code B ref 65478); Mon, 28 Aug 2023 04:23:02 +0000 Received: (at 65478) by debbugs.gnu.org; 28 Aug 2023 04:22:29 +0000 Received: from localhost ([127.0.0.1]:46631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaTlk-0002A0-5T for submit@debbugs.gnu.org; Mon, 28 Aug 2023 00:22:28 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:46002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaTld-00029n-CG for 65478@debbugs.gnu.org; Mon, 28 Aug 2023 00:22:26 -0400 Date: Mon, 28 Aug 2023 12:21:30 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1693196493; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=KEOVlidzL5E9MB/8ChPtp7SAmls2SP3QK/nGPaYnnTo=; b=mfnGDiA9f8DsvA9XVnjuCDmfVITcoQJ/LtSgWKl2wLhU+UlvWNFvxKgA6GHYtL/5f/EPh7 KpEadLl+q93hBhqj0WP4EkiCod9+tq8XOwlv1eG6+tnEe5IEH10inoJ12poIQbzqC0MDQ+ k76EkuVPR4WFDEyDylQ9SysiMbxVvRNnMYmZtKyEmCiGUb0Xu3Wgii/Vl+qODwwBU2Jq2N xXA0/isaoAg/uzIKj7AmP2tfrWzxc4r+FKfaVyamOPzDUjO2mZwFBGQ+0iYOPsnGOh88Sw +xdnSvgFsODbgJ7X3XAAqtsamzYZqDDE18j253ixOnnqE6BsL8be7txcBRsZhA== Message-ID: <87y1hv6blh.wl-hako@ultrarare.space> In-Reply-To: <2ea4d41e810638483c6c8e9f2dbfd901ecae8c98.camel@gmail.com> References: <5629f5f427c30caa6d43f37ac28c3dd3f1501d01.1692813553.git.hako@ultrarare.space> <8735047il4.wl-hako@ultrarare.space> <00b74be565b90c6f35cc14e607141da3e3540fbe.camel@gmail.com> <871qfo7avb.wl-hako@ultrarare.space> <2ea4d41e810638483c6c8e9f2dbfd901ecae8c98.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Spam-Score: -6.72 X-Migadu-Queue-Id: 55436674D8 X-Migadu-Spam-Score: -6.72 X-TUID: a0o4L8JxqyhK On Sun, 27 Aug 2023 23:49:49 +0800, Liliana Marie Prikler wrote: > > Am Sonntag, dem 27.08.2023 um 23:39 +0800 schrieb Hilton Chain: > > Currently on master: > > > > $ guix build emacs-flim-lb > > has elc files. > > > > $ guix build emacs-flim-lb --with-input=3Demacs-minimal=3Demacs > > has elc and eln files. > > > > $ guix build emacs-flim-lb --with-input=3Demacs-minimal=3Demacs-next > > has eln files. > > > > And I tried to build it with 'build phase deleted as well.=A0 Had them > > all tested and came to the conclusion that elc files are required. > Hmm, this sounds like a failure of emacs-build-system then. The > assumption (based on Emacs 28) had been that both bytecode and native > compilation are done with one function call. Maybe that no longer > holds? Found a change in `batch-byte+native-compile' with $ git diff emacs-28.2..emacs-29.1 lisp/emacs-lisp/comp.el --8<---------------cut here---------------start------------->8--- +(defun comp-write-bytecode-file (eln-file) + "After native compilation write the bytecode file for ELN-FILE. +Make sure that eln file is younger than byte-compiled one and +return the filename of this last. + +This function can be used only in conjuntion with +`byte+native-compile' `byte-to-native-output-buffer-file' (see +`batch-byte+native-compile')." + (pcase byte-to-native-output-buffer-file + (`(,temp-buffer . ,target-file) + (unwind-protect + (progn + (byte-write-target-file temp-buffer target-file) + ;; Touch the .eln in order to have it older than the + ;; corresponding .elc. + (when (stringp eln-file) + (set-file-times eln-file))) + (kill-buffer temp-buffer)) + target-file))) ;;;###autoload (defun batch-byte+native-compile () @@ -4221,17 +4345,16 @@ Generate .elc files in addition to the .eln files. Force the produced .eln to be outputted in the eln system directory (the last entry in `native-comp-eln-load-path') unless `native-compile-target-directory' is non-nil. If the environment -variable 'NATIVE_DISABLED' is set, only byte compile." +variable \"NATIVE_DISABLED\" is set, only byte compile." (comp-ensure-native-compiler) (if (equal (getenv "NATIVE_DISABLED") "1") (batch-byte-compile) (cl-assert (length=3D command-line-args-left 1)) - (let ((byte+native-compile t) - (byte-to-native-output-file nil)) - (batch-native-compile) - (pcase byte-to-native-output-file - (`(,tempfile . ,target-file) - (rename-file tempfile target-file t)))))) + (let* ((byte+native-compile t) + (byte-to-native-output-buffer-file nil) + (eln-file (car (batch-native-compile)))) + (comp-write-bytecode-file eln-file) + (setq command-line-args-left (cdr command-line-args-left))))) --8<---------------cut here---------------end--------------->8--- And the following patch should work for Emacs 29, but not 28: --8<---------------cut here---------------start------------->8--- diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 850b1f5f2a..6c27b186e3 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -138,7 +138,7 @@ (define* (emacs-compile-directory dir) (files (directory-files-recursively ,dir "\\.el$"))) (mapc (lambda (file) - (let (byte-to-native-output-file + (let (byte-to-native-output-buffer-file ;; First entry is the eln-cache of the homeless shelter, ;; second entry is the install directory. (eln-dir (and (native-comp-available-p) @@ -148,12 +148,12 @@ (define* (emacs-compile-directory dir) (comp-el-to-eln-filename file eln-dir)) (byte-compile-file file)) ;; Sadly, we can't use pcase because quasiquote works differen= t in - ;; Emacs. See `batch-byte+native-compile' in comp.el for the - ;; actual shape of byte-to-native-output-file. - (unless (null byte-to-native-output-file) - (rename-file (car byte-to-native-output-file) - (cdr byte-to-native-output-file) - t)))) + ;; Emacs. See `comp-write-bytecode-file' in comp.el for the a= ctual + ;; shape of byte-to-native-output-buffer-file. + (unless (null byte-to-native-output-buffer-file) + (byte-write-target-file + (car byte-to-native-output-buffer-file) + (cdr byte-to-native-output-buffer-file))))) files)) #:dynamic? #t)) --8<---------------cut here---------------end--------------->8---