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#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time Date: Mon, 24 May 2021 19:22:12 +0300 Message-ID: <834kesdruz.fsf@gnu.org> References: <83k0nrkzem.fsf@gnu.org> <0D04DA9F-BDFB-431E-9F14-385BE7CAAD54@gnu.org> <1064AF16-6F08-4DEA-A63B-D8781420F287@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31959"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48578@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 24 18:23:26 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 1llDMS-00085D-Go for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 18:23:24 +0200 Original-Received: from localhost ([::1]:56456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llDMR-000116-Jn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 12:23:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llDM6-00010A-FE for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 12:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llDM6-0006as-7f for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 12:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llDM6-0007xR-3D for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 12:23: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: Mon, 24 May 2021 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48578 X-GNU-PR-Package: emacs Original-Received: via spool by 48578-submit@debbugs.gnu.org id=B48578.162187334930538 (code B ref 48578); Mon, 24 May 2021 16:23:02 +0000 Original-Received: (at 48578) by debbugs.gnu.org; 24 May 2021 16:22:29 +0000 Original-Received: from localhost ([127.0.0.1]:43769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llDLZ-0007wT-Hm for submit@debbugs.gnu.org; Mon, 24 May 2021 12:22:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llDLW-0007wE-66 for 48578@debbugs.gnu.org; Mon, 24 May 2021 12:22:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42618) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llDLP-0006N7-F1; Mon, 24 May 2021 12:22:20 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1856 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 1llDLO-0004f6-UK; Mon, 24 May 2021 12:22:19 -0400 In-Reply-To: (message from Andrea Corallo on Mon, 24 May 2021 08:48:39 +0000) 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:207132 Archived-At: > From: Andrea Corallo > Cc: 48578@debbugs.gnu.org > Date: Mon, 24 May 2021 08:48:39 +0000 > > > Suggestions for where to look for the reasons of the problem? > > I'd start verifying what given the el source file > `comp-el-to-eln-rel-filename' suggests as eln filename and if this is > present as native compiled file (I guess so if you recompiled manually). > > The next step would be verifying why when loading in lread.c > 'maybe_swap_for_eln' does not decide to load the eln file in place of > the elc one. Thanks. The problem is in comp-el-to-eln-rel-filename, in this fragment at its beginning: /* Use `file-truename' or fall back to `expand-file-name' when the first is not available (bug#44701). `file-truename' is not available only for a short phases of the bootstrap before file.el is loaded, given we do not symlink inside the build directory this should work. */ filename = NILP (Ffboundp (intern_c_string ("file-truename"))) ? Fexpand_file_name (filename, Qnil) : CALL1I (file-truename, filename); During loadup, file-truename is not available until files.elc/eln is loaded. But the assumption above that it isn't a problem because "we do not symlink inside the build directory" in false in my case, because my home directory, where I build Emacs, is itself a symlink: (expand-file-name "~") => "/home/e/eliz" (file-truename "~") => "/srv/data/home/e/eliz" So every one of the *.eln files loaded before and including files.elc will fail in the above logic and will produce a different path_hash, thus failing the attempt to find the correct .eln file. We could use 'realpath' (and a suitable emulation on WINDOWSNT) instead of file-truename.