From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third 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 17:37:55 +0100 Message-ID: References: <83y2be6zj8.fsf@gnu.org> 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="31350"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48994@debbugs.gnu.org, Matthew Bauer , akrl@sdf.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 13 18:40:33 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 1lsTA0-0007sI-Tn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 18:40:33 +0200 Original-Received: from localhost ([::1]:45434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsT9z-0004DZ-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 12:40:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsT8Y-0001NY-5U for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 12:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsT8X-0002EJ-QU for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 12:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsT8X-0002JP-NX for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 12:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Jun 2021 16:39:01 +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.16236022888818 (code B ref 48994); Sun, 13 Jun 2021 16:39:01 +0000 Original-Received: (at 48994) by debbugs.gnu.org; 13 Jun 2021 16:38:08 +0000 Original-Received: from localhost ([127.0.0.1]:44285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsT7f-0002I9-Ow for submit@debbugs.gnu.org; Sun, 13 Jun 2021 12:38:08 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:49379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsT7d-0002HY-Ss for 48994@debbugs.gnu.org; Sun, 13 Jun 2021 12:38:06 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id CBAE9600C1; Sun, 13 Jun 2021 16:37:59 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1623602278; bh=T5FW9FM6+J41tjLT3rLFNINoxIqS5Xz2hR3tCwSWuos=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q9H3KAeTWaawpxWSBy+0yc6E30DnPB6cYe2RnxZ5XX+HBSDpG6+OobaCoF2KCpTW6 /j06MUuGmgErH+f/SrgyfiAHqOY3acWUCzBl+z4i3Ql+xvAnDRnH+qXdA+LJRQImp6 HShPEsZjFzDDlFRlCyFQJziqRz16PJSvAMapYZeFkDHlaJjZF/dQ35dEc91A9l7Aoy VEE2LTlarHAqXTXz7o6Hs6C92a/p6aM4G9y7CvFsVIAuFHuULSMe5eA8WyFgVRNeEp HymTSMEUEVoHK5WjrWd9C6goFsv1I2fGKjnm6MqFxsN9YDGZ+GoktD/vaNQQj5TqDo qmkL2uOewykcA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1lsT7T-00208v-Lg; Sun, 13 Jun 2021 17:37:55 +0100 Mail-Followup-To: Alan Third , Eli Zaretskii , Matthew Bauer , 48994@debbugs.gnu.org, akrl@sdf.org Content-Disposition: inline In-Reply-To: <83y2be6zj8.fsf@gnu.org> 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:208453 Archived-At: On Sun, Jun 13, 2021 at 09:37:15AM +0300, Eli Zaretskii wrote: > > 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? I suggested previously we handle this like we do the other install paths (see ns_etc_path, ns_exec_path and ns_load_path in nsterm.m), but Andrea didn't like that solution. > And could you explain to this macOS-illiterate why this mess happens > on macOS? It's because we support both a relocatable application format and a normal unix style install. In the .app case the path to the installed files has to be configured at run-time (although I think Andrea used a directory relative to the executable), but in the unix case it's hard-coded. FWIW, we will have exactly the same problems with GNUstep builds, because they use the same .app format. -- Alan Third