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#58073: 29.0.50; Uninstalled emacs sends startup messages to stderr Date: Mon, 03 Oct 2022 22:01:48 +0300 Message-ID: <8335c4ybmr.fsf@gnu.org> References: <87pmfjmqnt.fsf@bernoul.li> <83tu4vl9wr.fsf@gnu.org> <87mtanmhn6.fsf@bernoul.li> <83h70ulgbp.fsf@gnu.org> <877d1img9g.fsf@bernoul.li> <83mtae1djg.fsf@gnu.org> <874jwmlzc1.fsf@bernoul.li> <877d1grj15.fsf@bernoul.li> <83o7usyg23.fsf@gnu.org> <874jwkvizq.fsf@bernoul.li> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39277"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58073@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 03 21:07:43 2022 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 1ofQmy-0009y0-TZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Oct 2022 21:07:41 +0200 Original-Received: from localhost ([::1]:55112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofQmx-0005Pb-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Oct 2022 15:07:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofQiW-0001iD-Bg for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 15:03:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofQiT-00083f-VE for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 15:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ofQiT-0000TJ-Q2 for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 15:03: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: Mon, 03 Oct 2022 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58073 X-GNU-PR-Package: emacs Original-Received: via spool by 58073-submit@debbugs.gnu.org id=B58073.16648237291750 (code B ref 58073); Mon, 03 Oct 2022 19:03:01 +0000 Original-Received: (at 58073) by debbugs.gnu.org; 3 Oct 2022 19:02:09 +0000 Original-Received: from localhost ([127.0.0.1]:51731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofQhc-0000SA-Oy for submit@debbugs.gnu.org; Mon, 03 Oct 2022 15:02:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofQha-0000Rf-RN for 58073@debbugs.gnu.org; Mon, 03 Oct 2022 15:02:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofQhU-0007yq-Sv; Mon, 03 Oct 2022 15:02:00 -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=t1GmvraBaH9uNK8uM/CCOF5dejMwsBsdU4p5wwIjRn8=; b=A63L3rlXEQy/ /dpkvPmnsmaTu+h/RzBncWsqa1w6Os+DKm92ngyMem2TTGRJ1ibQaQWSsyubxuUZ58zkG4L32kWsD g1/DzS3aL99B5ubsQdsp73okoBJOYfKWDA8CZdeZj7NDXBfNdW/e0Alj4nO6WqyinH/frRNAlu0tK QagrJNrWE4VzxVo9rVlOC9V/jvUa/howmj8/TSe9v8jBDAqjHjN7Wg14PKLjSG885QhnbCJB3ASEE em629OMAI8pI8aIpHFWpvzmU1qc4rsa3d0JgSlUoPdX981xoDNjNcg/TFr1yPZNwuZZBFo9yM0u1r US/iAFbKaYhEJlDK8CiYlQ==; Original-Received: from [87.69.77.57] (port=2746 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 1ofQhP-0007mM-4z; Mon, 03 Oct 2022 15:02:00 -0400 In-Reply-To: <874jwkvizq.fsf@bernoul.li> (message from Jonas Bernoulli on Mon, 03 Oct 2022 20:51:05 +0200) 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:244328 Archived-At: > From: Jonas Bernoulli > Cc: 58073@debbugs.gnu.org > Date: Mon, 03 Oct 2022 20:51:05 +0200 > > Before I switched away from Gdm3, I had to use a wrapper script, but as > we found out that does not actually work. For some reason that ends up > using the elisp libraries from where "make install" put them. Or if > that has never been run, then emacs fails because it cannot find the > libraries where it (IMO falsely) expects to find them. The same happens > when using a shell alias. > > The question now is whether *you* consider this a bug worth fixing. > I would say it is, but I won't insist on it. It may or may not be a bug; it could be a feature. When Emacs starts up it needs to decide where to find the pdumper file and where to find the *.eln files. It does that by looking at the directory where its executable lives, if it can determine that via argv[0]. But symlinks could trick that, and if you invoke Emacs through wrapper scripts or aliases, that could make the above impossible, because there are no valid leading directories in argv[0]. In that case, the startup code uses Plan B: it goes by its configured installation location. And since you have the same Emacs both installed and uninstalled, you get what you see. Or something like that: to see what really happens, you need to step with a debugger through the code of the load_pdump function, see where it finds the pdumper file, and where it decides to look for *.eln (by constructing the name in emacs_executable, whose leading directory is then used in dump_do_dump_relocation under 'case RELOC_NATIVE_COMP_UNIT').