Subject: Re: 28.0.50; [native-comp] Emacs doesn't start when run from a symlink

From: Eli Zaretskii <[email-masked]>
Date: Tue, 13 Apr 2021 16:55:55 +0300

> Cc: Andrea Corallo <[email-masked]>, Eli Zaretskii <[email-masked]>,
>  Thierry Volpiatto <[email-masked]>
> From: Phil Sainty <[email-masked]>
> Date: Wed, 14 Apr 2021 00:37:38 +1200
> 
> I've compiled the feature/native-comp branch and it starts if I run
> the real path to the executable; but if I run it from a symlink it
> fails:
> 
> $ ls -l /home/phil/bin/emacs-native-comp
> lrwxrwxrwx 1 phil phil 48 Apr 14 00:01 /home/phil/bin/emacs-native-comp -> /home/phil/emacs/native-comp/usr/local/bin/emacs
> 
> $ emacs-native-comp -Q
> emacs: /home/phil/bin/../native-lisp/28.0.50-abd7aa58/preloaded/window-0d1b8b93-513ac8ca.eln: cannot open shared object file: No such file or directory

Andrea, I think the code which resolves symlinks in load_pdump should
also affect how Vinvocation_directory etc. are computed in
set_invocation_vars.