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#73318: 31.0.50; with-native-compilation=aot breaks exec -a emacs Date: Fri, 04 Oct 2024 22:09:50 +0300 Message-ID: <86bjzzy9a9.fsf@gnu.org> References: <864j6eb29f.fsf@gnu.org> <861q1iayk6.fsf@gnu.org> <86wmja9iwi.fsf@gnu.org> <86plp19kei.fsf@gnu.org> <86ldz4xc93.fsf@gnu.org> <86iku8x95w.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35608"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73318@debbugs.gnu.org, larsi@gnus.org, acorallo@gnu.org, schwab@linux-m68k.org, shipmints@gmail.com To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 04 21:13:18 2024 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 1swnjp-00096E-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Oct 2024 21:13:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swnjZ-0008PG-GR; Fri, 04 Oct 2024 15:13:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swnjY-0008Or-2p for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 15:13:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swnjW-0008Mk-V3 for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 15:12:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=XfhiAY+iRg4LJm+v0e2fzBi8bSsJ+qwl0oOsBRNyZwk=; b=mU30kBwUY8zM6U4Rt0G2/I0l4FhK+f7Mtbsk+tAVxRYmHweMCqOlxRClzvBQcq5tDX9tLl5evIFIm3hz9W6fEM4Lyqgwn+3GE0I7aRqhxcolQBBE2PqJBrGDMuWGAS2einjzbSgAs7CCHyJEbjPAKBwVbJKBzEL8u0FKoL0JqnAgEWtRv0ge4AYhJbQ7TSY+NZCt2+7lktIzIR/sBm+dDW6PyL9aKfYGh+JbevxcB+2U6/+8NQR0igRvG1eTwE/xY8PFpysb4JInRBTuyYEOIVRO4+Tb5RK1nTQsSAQOlJgpKVy/GbAtOs1nCMu0TbRHukPEkgriq1FVNnOqjZHFwg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swnja-0007q5-69 for bug-gnu-emacs@gnu.org; Fri, 04 Oct 2024 15:13: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: Fri, 04 Oct 2024 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73318 X-GNU-PR-Package: emacs Original-Received: via spool by 73318-submit@debbugs.gnu.org id=B73318.172806914330078 (code B ref 73318); Fri, 04 Oct 2024 19:13:02 +0000 Original-Received: (at 73318) by debbugs.gnu.org; 4 Oct 2024 19:12:23 +0000 Original-Received: from localhost ([127.0.0.1]:36588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swnix-0007p3-3W for submit@debbugs.gnu.org; Fri, 04 Oct 2024 15:12:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swniv-0007op-52 for 73318@debbugs.gnu.org; Fri, 04 Oct 2024 15:12:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swngc-00080p-U9; Fri, 04 Oct 2024 15:09:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XfhiAY+iRg4LJm+v0e2fzBi8bSsJ+qwl0oOsBRNyZwk=; b=g+a2pDvjgZaG EyT0SoL2pRlqxShHRigMrKUtBaICWvO/U5P45C8heEuQh8LJrgGjavNRERgQfbTBdHHV+EFacxB4P qd4JOXF6A2ynD3ReZeyc8YeqWSlot0rftwLvLWAZ7VpcJfvs+QNEvUPGUVSS8pgAwdYC6PqDDSTuv 2WdrxDas1RTNOdHnnxlPzGwfzXq19smLArhNdFAQwKsH95bWEbRAF2NB6PZlCdHCR1fcA4MZbBDsh gpci4JG94I/sc9DxgjgO7bqUGnDHRW+KKYsm3yg96gukJxqbeoOf8oYqWVl2vptcJF0zyrMleaGbX zae8cy87r2FTJwU6d00F+A==; In-Reply-To: (message from Spencer Baugh on Fri, 04 Oct 2024 12:51:59 -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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292976 Archived-At: > From: Spencer Baugh > Cc: 73318@debbugs.gnu.org, larsi@gnus.org, acorallo@gnu.org, > schwab@linux-m68k.org, shipmints@gmail.com > Date: Fri, 04 Oct 2024 12:51:59 -0400 > > > It isn't that easy. We need to support 2 possible locations for the > > preloaded *.eln files: in the source tree and in the installation > > tree. You now want us to look in yet a third place. Take a look at > > dump_do_dump_relocation where we look for the *.eln files. What you > > suggest is to add a third place to that code. > > Yes. I suggest that if installation_state == INSTALLED, and we fail to > find an eln file in emacs_execdir, we fall back to look in PATH_EXEC (or > some other path compiled into the Emacs binary). > > But it occurs to me that there's another possible solution. We already > have a robust way to find the pdump. My Emacs finds the pdump and loads > it just fine. Maybe we could look for the eln files relative to the > pdump? That means to throw away a lot of code in emacs.c which we use now and was tested for several Emacs releases. No, thanks, not for this obscure scenario. I still don't understand why you insist on not changing your script to include the leading directories in argv[0]. It makes absolutely no sense to me to invent new code in such a place, when the alternative is so easy and reliable. > > See above. If you insist to go this much more complicated way, we'll > > need to modify the code in dump_do_dump_relocation to use PATH_EXEC, > > and deal with possible false positives. > > Yes, I am willing to put in the effort to do that. Makes no sense to me, so I urge you to reconsider. You are destabilizing Emacs for the benefit of an obscure use pattern that is easy to fix without any changes in Emacs.