From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree Date: Sat, 27 Feb 2021 19:20:24 +0000 Message-ID: References: <865z3866my.fsf@gmail.com> <865z38a9vo.fsf@gmail.com> <86eehujcip.fsf@gmail.com> <86blch14qt.fsf@gmail.com> <83h7m84h9g.fsf@gnu.org> <86v9ao5czu.fsf@gmail.com> <86wnutogrh.fsf@gmail.com> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10872"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: andrewjmoreton@gmail.com To: 46256@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 27 20:21:15 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 1lG59O-0002hY-Rc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Feb 2021 20:21:14 +0100 Original-Received: from localhost ([::1]:41516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lG59N-0004r1-Sw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Feb 2021 14:21:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lG59C-0004qi-NX for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 14:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lG59C-0003ty-EC for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 14:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lG59C-00058E-AP for bug-gnu-emacs@gnu.org; Sat, 27 Feb 2021 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Feb 2021 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46256 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 46256@debbugs.gnu.org, Andy Moreton Original-Received: via spool by 46256-submit@debbugs.gnu.org id=B46256.161445362819651 (code B ref 46256); Sat, 27 Feb 2021 19:21:02 +0000 Original-Received: (at 46256) by debbugs.gnu.org; 27 Feb 2021 19:20:28 +0000 Original-Received: from localhost ([127.0.0.1]:45413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lG58e-00056t-6F for submit@debbugs.gnu.org; Sat, 27 Feb 2021 14:20:28 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:65238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lG58b-00056j-Lp for 46256@debbugs.gnu.org; Sat, 27 Feb 2021 14:20:26 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 11RJKOKk015805 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 27 Feb 2021 19:20:24 GMT In-Reply-To: (Andrea Corallo via's message of "Sat, 27 Feb 2021 19:14:20 +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:200978 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Andy Moreton writes: > >> On Fri 26 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: >> >>> Andy Moreton writes: >>> >>> [...] >>> >>>> The problem is with the file names used to generate the hashes, where >>>> comparison of file names. >>>> >>>> As an experiment, I changed epaths.h from: >>>> #define PATH_DUMPLOADSEARCH "C:/emacs/git/emacs/native/lisp" >>>> >>>> to: >>>> #define PATH_DUMPLOADSEARCH "c:/emacs/git/emacs/native/lisp" >>>> >>>> and then ran make (to build without regenerating the header). >>>> The resulting emacs did not complain about mismatched filenames. >>>> >>>> Thus the fix outlined by Eli above looks like it will solve the problem. >>>> >>>> AndyM >>> >>> Hi Andy, >>> >>> could you give it a try to the attached patch? It follows Eli's >>> suggestion of using 'Fw32_long_file_name'. >> >> The patch looks good - please apply it. > > Thanks for verifying it, installed as 312deba530. > >> I tried building with the patch applied to a clean tree, and the >> resulting emacs runs without the filename mismatch messages, and did not >> recompile the AOT files into the per-user eln-cache. >> >> There were also a couple of errors in the build: >> >> Backtrace: >> 00007ff78467a2a2 >> 00007ff78453be26 >> 00007ff7845a98ac >> ...[snipped]... >> 00007ff784626548 >> Eager macro-expansion failure: (file-error "Renaming" "Permission >> denied" >> "c:/emacs/git/emacs/native/build/mingw64-x86_64-O2-native/native-lisp/28.0.50-e09cfb99/cc-bytecomp-4817e810-d16f606e.eln" >> "c:/emacs/git/emacs/native/build/mingw64-x86_64-O2-native/native-lisp/28.0.50-e09cfb99/cc-bytecomp-4817e810-d16f606e.elnGMMUdn.eln.tmp") >> C:/emacs/git/emacs/native/src/alloc.c:3160: Emacs fatal error: assertion failed: cu->handle >> make[2]: *** [Makefile:319: progmodes/antlr-mode.elc] Error 3 >> >> The backtrace addresses did not give anything useful from addr2line. >> >> There are still some elisp files that did not get native compiled when >> the build was done with "make -j8 NATIVE_FULL_AOT=1", and so get async >> compiled when running the built emacs: >> >> ansi-color auth_source byte-opt bytecomp cconv cl-extra cl-lib cl-macs >> cl-seq comint comp comp-cstr cus-edit cus-start desktop >> display-fill-column-indicator easy-mmode easymenu edmacro eieio >> eieio-core frameset gv help-mode hl-line image-file info json kmacro >> map minibuf-eldef package paren password-cache pcase pp ring rx seq >> subr-x time-date warnings wid-edit >> >> That may be a result of the error during the build. > > Mmmmh, that's strange some of these are even compiled as COMPILE_FIRST > therfore are certainly native compiled. > > One thing you could do (before one of these is recompiled) is to use > `comp-el-to-eln-filename' to check what the native compiler is expecting > as eln filename and if this is present in any of the folders in your > `comp-eln-load-path'. Apologies, to be more precise: if the file is compiled during the build (as should be in this case) it should be in the "native-lisp/" dir in the build tree. Andrea