GNU bug report logs - #58073
29.0.50; Uninstalled emacs sends startup messages to stderr

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Sun, 25 Sep 2022 15:16:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 58073 <at> debbugs.gnu.org
Subject: bug#58073: 29.0.50; Uninstalled emacs sends startup messages to stderr
Date: Mon, 03 Oct 2022 22:01:48 +0300
> From: Jonas Bernoulli <jonas <at> bernoul.li>
> Cc: 58073 <at> 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').




This bug report was last modified 2 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.