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

From: Andrea Corallo <[email-masked]>
Date: Fri, 16 Apr 2021 19:23:51 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
>> Date: Fri, 16 Apr 2021 09:27:51 +0000
>> 
>> > 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.
>
> I think the issue is slightly more complex.

That's very possible today I had really no time to reproduce and
investigate this in details sorry.

> Andrea, is native-compilation supported with unexec, or only with
> pdumper?

Only pdumper.

> If the former, where in the code and when do we load the
> preloaded *.eln files? are they dumped into the Emacs executable?

We re-load the eln for each compilation unit around pdumper.c:5277.  The
position of the eln is already stored in CU object (formed in
loadup.el:467).

> If we don't support native-compilation with unexec, we should reject
> that combination in configure, right?

That's correct.

Thanks

  Andrea