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#43137: 28.0.50; [feature/native-comp] .eln path fixup confused using relative paths Date: Tue, 01 Sep 2020 19:51:18 +0000 Message-ID: References: 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="17985"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 43137@debbugs.gnu.org, Vibhav Pant To: Andreas Fuchs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 01 21:52:09 2020 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 1kDCK9-0004WX-1i for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Sep 2020 21:52:09 +0200 Original-Received: from localhost ([::1]:52106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDCK7-0001Jt-Ui for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Sep 2020 15:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDCK2-0001JY-4i for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 15:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDCK1-0000Zl-Rb for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 15:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kDCK1-0001Ss-Oq for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 15:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Sep 2020 19:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43137 X-GNU-PR-Package: emacs Original-Received: via spool by 43137-submit@debbugs.gnu.org id=B43137.15989898835584 (code B ref 43137); Tue, 01 Sep 2020 19:52:01 +0000 Original-Received: (at 43137) by debbugs.gnu.org; 1 Sep 2020 19:51:23 +0000 Original-Received: from localhost ([127.0.0.1]:57409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDCJP-0001S0-Hu for submit@debbugs.gnu.org; Tue, 01 Sep 2020 15:51:23 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:54151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDCJL-0001Rq-Ui for 43137@debbugs.gnu.org; Tue, 01 Sep 2020 15:51:22 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 081JpIIH002351; Tue, 1 Sep 2020 19:51:18 GMT In-Reply-To: (Andreas Fuchs's message of "Tue, 1 Sep 2020 15:32:05 -0400") 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:186888 Archived-At: Andreas Fuchs writes: > I wrote: >> This makes sense too. I'll investigate when `Vinvocation_directory` > gets >> set. Does sound like that doesn't happen early enough, maybe we can > pull >> it forward a bit. > > I dug into this, and the way main() progresses is that it first tries > to > load the pdump (via load_pdump in line 1076, > https://github.com/emacs-mirror/emacs/blob/feature/native-comp/src/ > emacs.c#L1076), > and only much later, sets invocation-directory and other cmdargs via > set_invocation_vars called from init_cmdargs (called in main on line > 1794, > https://github.com/emacs-mirror/emacs/blob/feature/native-comp/src/ > emacs.c#L1794). > > I think this should be failing cross-platform; is it working for you? > > Thanks, Hi Andreas, yes for me is set before. I've made set_invocation_vars to be called before doing what I've called LATE_RELOCS in the pdumper. Here is my backtrace of where gdb stops just after Vinvocation_directory is set. (gdb) bt #0 set_invocation_vars (argv0=0x7fffffffe693 "/home/andcor03/emacs2/src/emacs", original_pwd=0xacb6f0 "/home/andcor03/emacs2/src") at emacs.c:455 #1 0x000000000057ade2 in pdumper_load ( dump_filename=0xacb750 "/home/andcor03/emacs2/src/emacs.pdmp", argv0=0x7fffffffe693 "/home/andcor03/emacs2/src/emacs", original_pwd=0xacb6f0 "/home/andcor03/emacs2/src") at pdumper.c:5593 #2 0x00000000004e3a2f in load_pdump (argc=2, argv=0x7fffffffe428, original_pwd=0xacb6f0 "/home/andcor03/emacs2/src") at emacs.c:868 #3 0x00000000004e3f4d in main (argc=2, argv=0x7fffffffe428) at emacs.c:1076 Is it possible that set_invocation_vars on macos fails to set the correct value? I'd look into it as I guess something may go wrong there. Andrea