all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bhavin Gandhi <bhavin7392@gmail.com>, Andrea Corallo <akrl@sdf.org>
Cc: 52488@debbugs.gnu.org
Subject: bug#52488: Try basename of agrv0's realpath for .pdmp lookup in libexecdir
Date: Tue, 14 Dec 2021 21:42:04 +0200	[thread overview]
Message-ID: <83h7bbj7n7.fsf@gnu.org> (raw)
In-Reply-To: <CAOn=hbcpRgtyq3j3oxDZo5Y0+akNUBfHdyX8O+=ECPBp7U0wbw@mail.gmail.com> (message from Bhavin Gandhi on Wed, 15 Dec 2021 00:31:02 +0530)

> From: Bhavin Gandhi <bhavin7392@gmail.com>
> Date: Wed, 15 Dec 2021 00:31:02 +0530
> 
> IIUC when searching for the .pdmp file in the libexecdir (path_exec), it
> uses argv0 and does not find the actual binary name by resolving
> symlinks.
> 
>       /* Finally, look for basename(argv0)+".pdmp" in PATH_EXEC.
> This way, they can rename both the executable and its pdump
> file in PATH_EXEC, and have several Emacs configurations in
> the same versioned libexec subdirectory.  */
> 
> Why do you want that?

Why do we want what?

> As the comment from load_pdump_find_executable explains, there are
> setups where the /usr/bin/emacs is a symlink managed by something like
> alternatives. This symlink eventually points to an Emacs binary like
> emacs-28.0.90. These kind of setups are used to have installation of
> multiple versions of Emacs on the same system.
> 
> Supporting resolution of these symlinks while searching for a .pdmp file
> will make it possible to put the .pdmp files in libexecdir instead of
> putting those in the /usr/bin/. I think this should be in addition to
> the possibilities tried currently.

Patches to support that are welcome, I think.  We support several
tricks people play with placing the binaries and the auxiliary files,
but there could well be other possibilities.

However, in general, keeping the .pdmp file in the same directory as
the binary is not recommended, AFAIU, as that file is not an
executable program.  That path in the code exists mainly for running
Emacs uninstalled, from the build tree.

> > Why don't you configure each Emacs build with a different libexecdir
> > instead?
> 
> Sure, but there are some common files in that directory like hexl,
> movemail, etc, which package maintainers have put into a common package
> like emacs-common.

And you cannot use symlinks for those files, whose target is in the
common directory?

> $ emacs -Q
> Loading loadup.el (source)...
> Dump mode: nil
> Using load-path (/usr/share/emacs/28.0.90/lisp /usr/share/emacs/28.0.90/lisp/emacs-lisp
> /usr/share/emacs/28.0.90/lisp/progmodes /usr/share/emacs/28.0.90/lisp/language
> /usr/share/emacs/28.0.90/lisp/international /usr/share/emacs/28.0.90/lisp/textmodes
> /usr/share/emacs/28.0.90/lisp/vc)
> Loading emacs-lisp/byte-run...
> Symbol's function definition is void: file-name-sans-extension

Andrea, can you please look into this error?  Emacs is supposed to
load *.elc files in this case, and then start normally.  Which code
tries to call file-name-sans-extension so early?





      parent reply	other threads:[~2021-12-14 19:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 19:01 bug#52488: Try basename of agrv0's realpath for .pdmp lookup in libexecdir Bhavin Gandhi
2021-12-14 19:25 ` Bhavin Gandhi
2021-12-14 19:32 ` Ken Brown
2021-12-15 17:56   ` Ken Brown
2021-12-15 18:19     ` Glenn Morris
2021-12-15 18:53       ` Ken Brown
2021-12-15 22:08         ` Ken Brown
2021-12-19 12:57           ` Lars Ingebrigtsen
2021-12-19 15:26             ` Ken Brown
2021-12-23 13:48               ` Ken Brown
2021-12-23 13:50               ` Bhavin Gandhi
2021-12-15 18:24     ` Bhavin Gandhi
2021-12-15 19:32       ` Eli Zaretskii
2021-12-14 19:42 ` 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=83h7bbj7n7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52488@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=bhavin7392@gmail.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.