From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48994: 28.0.50; [PATCH] 28.0.50; Native compilation unnecessarily recompiles .eln (macOS) Date: Sun, 13 Jun 2021 09:37:15 +0300 Message-ID: <83y2be6zj8.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31412"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48994@debbugs.gnu.org, akrl@sdf.org To: Matthew Bauer , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 13 08:38:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsJl3-0007xt-V4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 08:38:09 +0200 Original-Received: from localhost ([::1]:60092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsJl2-0008BG-GE for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 02:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsJkw-0008Au-R7 for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 02:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsJkw-0002rb-FW for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 02:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsJkw-00052e-EF for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 02:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Jun 2021 06:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48994-submit@debbugs.gnu.org id=B48994.162356624819339 (code B ref 48994); Sun, 13 Jun 2021 06:38:02 +0000 Original-Received: (at 48994) by debbugs.gnu.org; 13 Jun 2021 06:37:28 +0000 Original-Received: from localhost ([127.0.0.1]:42496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsJkN-00051r-QZ for submit@debbugs.gnu.org; Sun, 13 Jun 2021 02:37:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsJkM-00051c-N1 for 48994@debbugs.gnu.org; Sun, 13 Jun 2021 02:37:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35196) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsJkG-0002Kh-HK; Sun, 13 Jun 2021 02:37:20 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3945 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsJkG-0005RT-5O; Sun, 13 Jun 2021 02:37:20 -0400 In-Reply-To: (message from Matthew Bauer on Sat, 12 Jun 2021 22:13:13 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208407 Archived-At: > From: Matthew Bauer > Date: Sat, 12 Jun 2021 22:13:13 -0500 > Cc: Andrea Corallo > > This is similar to bug#48497, but appears to still happen even after > commit 3f207753a0. > > The basic problem is that the installed lisp path does not match either > of the search expressions in comp-el-to-eln-rel-filename, meaning that > native lisp needs to be recompiled needlessly. > > The problem seems to come from PATH_REL_LOADSEARCH being set for me (on > macOS) to Contents/Resources/lisp, but the lisp files actually being > installed to > /nix/store/...-emacs-gcc-20210612.0/share/emacs/28.0.50/lisp (path > generated by Nix). As a result, comp-el-to-eln-rel-filename used the > filename comp-034d3699-516ce4bf.eln for comp.el.gz where 516ce4bf is the > md5sum of the contents of comp.el and 034d3699 is the md5sum of the full > path of comp.el, not of //emacs-lisp/comp.el (7672a6ed), which is what > Emacs installs. > > To fix this, I propose using PATH_LOADSEARCH in addition to > PATH_REL_LOADSEARCH so that we can catch both types of macOS installs > (.app and unix). I’ve attached a patch which implements this, adding > relative and absolute loadsearch resolution. Thanks. Alan, any comments? And could you explain to this macOS-illiterate why this mess happens on macOS? In any case, if this only happens on macOS, I see no reason to run the additional code on other systems, it's just waste of cycles.