From: Eli Zaretskii <eliz@gnu.org>
To: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
Cc: psainty@orcon.net.nz, 47800@debbugs.gnu.org
Subject: bug#47800: [native-comp] could not resolve realpath of "emacs"
Date: Thu, 15 Apr 2021 18:08:01 +0300 [thread overview]
Message-ID: <83im4ny4a6.fsf@gnu.org> (raw)
In-Reply-To: <fv2zoj7dl3fwt8.fsf@gmail.com> (message from Dario Gjorgjevski on Thu, 15 Apr 2021 16:26:43 +0200)
> From: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
> Date: Thu, 15 Apr 2021 16:26:43 +0200
> Cc: 47800@debbugs.gnu.org
>
> > Hi Dario. See also:
> >
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44128
>
> Thanks Phil. What Eli wrote in message#28 there describes the issue
> very well.
Does the untested patch below fix the problem?
diff --git a/src/emacs.c b/src/emacs.c
index a256564..7eaaa28 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -846,7 +846,11 @@ load_pdump_find_executable (char const *argv0, ptrdiff_t *candidate_size)
struct stat st;
if (file_access_p (candidate, X_OK)
&& stat (candidate, &st) == 0 && S_ISREG (st.st_mode))
- return candidate;
+ {
+ if (lstat (candidate, &st) == 0 && S_ISLNK (st.st_mode))
+ return realpath (candidate, NULL);
+ return candidate;
+ }
*candidate = '\0';
}
while (*path++ != '\0');
next prev parent reply other threads:[~2021-04-15 15:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 14:09 bug#47800: [native-comp] could not resolve realpath of "emacs" Dario Gjorgjevski
2021-04-15 14:17 ` Phil Sainty
2021-04-15 14:26 ` Dario Gjorgjevski
2021-04-15 15:08 ` Eli Zaretskii [this message]
2021-04-16 5:41 ` bug#44128: " Phil Sainty
2021-04-16 6:41 ` bug#44128: #44128: [feature/native-comp] When invoking a symlink to the 'emacs' binary Emacs fails to start Eli Zaretskii
2021-04-16 11:18 ` Phil Sainty
2021-04-16 8:57 ` bug#47800: [native-comp] could not resolve realpath of "emacs" Dario Gjorgjevski
2021-04-16 9:08 ` Dario Gjorgjevski
2021-04-16 9:23 ` Dario Gjorgjevski
2021-04-16 9:27 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-16 9:37 ` Dario Gjorgjevski
2021-04-16 10:56 ` Phil Sainty
2021-04-16 11:32 ` Phil Sainty
2021-04-16 12:32 ` Eli Zaretskii
2021-04-16 19:23 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-16 19:38 ` Eli Zaretskii
2021-04-16 20:07 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-17 7:13 ` Eli Zaretskii
2021-04-17 7:39 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-17 14:16 ` Eli Zaretskii
2021-04-15 14:44 ` Eli Zaretskii
2021-04-16 9:53 ` wilde
2021-04-17 14:00 ` Eli Zaretskii
2021-04-17 19:12 ` wilde
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=83im4ny4a6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=47800@debbugs.gnu.org \
--cc=dario.gjorgjevski@gmail.com \
--cc=psainty@orcon.net.nz \
/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.