From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 73318@debbugs.gnu.org, larsi@gnus.org, acorallo@gnu.org
Subject: bug#73318: 31.0.50; with-native-compilation=aot breaks exec -a emacs
Date: Tue, 17 Sep 2024 20:47:56 +0300 [thread overview]
Message-ID: <864j6eb29f.fsf@gnu.org> (raw)
In-Reply-To: <iero74mgvfy.fsf@janestreet.com> (bug-gnu-emacs@gnu.org)
> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Andrea Corallo <acorallo@gnu.org>
> Date: Tue, 17 Sep 2024 11:18:41 -0400
> From: Spencer Baugh via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
>
> 1. Compile and install Emacs with --with-native-compilation=aot, e.g.:
> prefix=~/prefix
> mkdir $prefix
> ./configure --with-native-compilation=aot --prefix=$prefix
> make -j64 && make install
> 2. Run emacs with "exec -a" to change its argv[0]:
> sh -c "exec -a emacs $prefix/bin/emacs -Q --batch"
> 3. Observe an error like:
> Error using execdir /usr/local/home/sbaugh/workspaces/24833141-bffb-3c99-a9d6-c366d37c4f5e/+share+/app/emacs/bin/:
> emacs: /usr/local/home/sbaugh/workspaces/24833141-bffb-3c99-a9d6-c366d37c4f5e/+share+/app/emacs/bin/../native-lisp/31.0.50-a88a37f5/preloaded/minibuffer-b2d9c221-284ab177.eln: cannot open shared object file: No such file or directory
>
> "exec -a emacs" works fine for with-native-compilation=yes or
> with-native-compilation=no.
Invocation via "exec -a" is not supported, if it messes with the
leading directories of the argv[0] value passed to Emacs. That's
because the search for the preloaded *.eln files is based on the
directory in which the Emacs executable is installed, as passed via
argv[0], and breaks if "exec -a" messes with that.
IOW, "don't do that, it will hurt".
P.S. If someone knows how to teach Emacs how to find the absolute file
name of its executable without depending on argv[0], speak up. We do
that on Windows, but not on Posix platforms, since (I'm being told)
there's no reliable way of having that on GNU/Linux and other Posix
platforms.
next prev parent reply other threads:[~2024-09-17 17:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 15:18 bug#73318: 31.0.50; with-native-compilation=aot breaks exec -a emacs Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 15:40 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 17:47 ` Eli Zaretskii [this message]
2024-09-17 18:14 ` Ship Mints
2024-09-17 19:07 ` Eli Zaretskii
2024-09-17 19:22 ` Ship Mints
2024-09-17 19:31 ` Eli Zaretskii
2024-09-17 22:31 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 22:45 ` Ship Mints
2024-09-18 13:11 ` Eli Zaretskii
2024-09-19 3:09 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-19 12:54 ` Ship Mints
2024-09-19 13:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-19 13:51 ` Ship Mints
2024-09-19 15:45 ` Eli Zaretskii
2024-10-04 12:09 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-04 12:51 ` Eli Zaretskii
2024-10-04 13:22 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-04 13:57 ` Eli Zaretskii
2024-10-04 14:02 ` shipmints
2024-10-04 16:51 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-04 19:09 ` Eli Zaretskii
2024-10-07 14:18 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-07 18:44 ` Eli Zaretskii
2024-10-07 20:16 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-08 11:47 ` Eli Zaretskii
2024-10-08 12:16 ` Eli Zaretskii
2024-10-04 19:16 ` Eli Zaretskii
2024-10-08 23:35 ` Stefan Kangas
2024-10-09 12:13 ` Eli Zaretskii
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=864j6eb29f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73318@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=larsi@gnus.org \
--cc=sbaugh@janestreet.com \
/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.