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#47800: [native-comp] could not resolve realpath of "emacs" Date: Fri, 16 Apr 2021 22:38:28 +0300 Message-ID: <83pmyuvx3f.fsf@gnu.org> References: <86f92666-5978-14b7-9d55-f87cb9010f3f@orcon.net.nz> <83im4ny4a6.fsf@gnu.org> <83tuo6wgte.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38818"; mail-complaints-to="usenet@ciao.gmane.io" Cc: psainty@orcon.net.nz, dario.gjorgjevski@gmail.com, 47800@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 16 21:39: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 1lXUJ4-0009zq-0a for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Apr 2021 21:39:10 +0200 Original-Received: from localhost ([::1]:46810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXUJ2-00043s-Ti for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Apr 2021 15:39:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXUIw-000429-4u for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 15:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXUIv-0001aY-TZ for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 15:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXUIv-0000Qm-RO for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 15:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Apr 2021 19:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47800 X-GNU-PR-Package: emacs Original-Received: via spool by 47800-submit@debbugs.gnu.org id=B47800.16186019281634 (code B ref 47800); Fri, 16 Apr 2021 19:39:01 +0000 Original-Received: (at 47800) by debbugs.gnu.org; 16 Apr 2021 19:38:48 +0000 Original-Received: from localhost ([127.0.0.1]:41735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXUIi-0000QH-Ds for submit@debbugs.gnu.org; Fri, 16 Apr 2021 15:38:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXUId-0000Pz-0o for 47800@debbugs.gnu.org; Fri, 16 Apr 2021 15:38:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47236) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXUIV-0001Ig-7I; Fri, 16 Apr 2021 15:38:37 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2564 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lXUIU-00010f-J8; Fri, 16 Apr 2021 15:38:35 -0400 In-Reply-To: (message from Andrea Corallo on Fri, 16 Apr 2021 19:23:51 +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:204159 Archived-At: > From: Andrea Corallo > Cc: dario.gjorgjevski@gmail.com, psainty@orcon.net.nz, 47800@debbugs.gnu.org > Date: Fri, 16 Apr 2021 19:23:51 +0000 > > >> > char *filename = real_filename (SSDATA (raw_name)); > >> > >> I agree that's the issue. > > > > I think the issue is slightly more complex. > > That's very possible today I had really no time to reproduce and > investigate this in details sorry. > > > Andrea, is native-compilation supported with unexec, or only with > > pdumper? > > Only pdumper. OK, that simplifies the solution. The problem we need to solve is that we have two decisions that run in parallel, but are not really synchronized: where to look for the pdumper file and where to look for the *.eln files. These two must correspond to each other, but currently they have little in common, which is a problem waiting to bite us. The other issue is the reliance on Vinvocation_directory. To rely on it, we must change how and when it is computed, and that will most probably change its value in some use cases. So I think we need to leave the Vinvocation_directory calculation as it was before, in init_cmdargs, and use other variables to tell pdumper_load how to resolve the native-lisp directory when restoring from the pdumper file. I'm currently working on making these changes, and hope to have a solution which will solve all the known issues with symlinks etc.