all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: 58073@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	[thread overview]
Message-ID: <8335c4ybmr.fsf@gnu.org> (raw)
In-Reply-To: <874jwkvizq.fsf@bernoul.li> (message from Jonas Bernoulli on Mon,  03 Oct 2022 20:51:05 +0200)

> From: Jonas Bernoulli <jonas@bernoul.li>
> 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').





      reply	other threads:[~2022-10-03 19:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 15:15 bug#58073: 29.0.50; Uninstalled emacs sends startup messages to stderr Jonas Bernoulli
2022-09-25 16:02 ` Eli Zaretskii
2022-09-25 18:30   ` Jonas Bernoulli
2022-09-26  7:56     ` Eli Zaretskii
2022-10-02 14:50       ` Jonas Bernoulli
2022-10-02 14:54         ` Eli Zaretskii
2022-10-02 20:55           ` Jonas Bernoulli
2022-10-02 22:14             ` Stefan Kangas
2022-10-03  2:30             ` Eli Zaretskii
2022-10-03 16:03             ` Jonas Bernoulli
2022-10-03 17:26               ` Eli Zaretskii
2022-10-03 18:51                 ` Jonas Bernoulli
2022-10-03 19:01                   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8335c4ybmr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58073@debbugs.gnu.org \
    --cc=jonas@bernoul.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.