Subject: bug#47800: [native-comp] could not resolve realpath of "emacs"

From: Phil Sainty <[email-masked]>
Date: Fri, 16 Apr 2021 22:56:51 +1200

On 16/04/21 9:27 pm, Andrea Corallo wrote:
> Dario Gjorgjevski <[email-masked]> writes:
>> But I can at least confirm that the issue is that raw_name is not
>> resolved according to PATH prior to the call of real_filename in
>>
>>   char *filename = real_filename (SSDATA (raw_name));
> 
> I agree that's the issue.

My (perhaps naive) impression is that set_invocation_vars should
be using load_pdump_find_executable (or a copy of the result that
it already established) to establish what argv0 is referring to?

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46790#38 may have
been driving at the same point.

In https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44128#49 I'm
seeing load_pdump_find_executable successfully figuring out the
genuine path to the executable every time.