Subject: Re: bug#60996: 29.0.60; Native compile fails to remove temp file for trampoline

From: Eli Zaretskii <[email-masked]>
Date: Tue, 24 Jan 2023 21:12:38 +0200

> Cc: [email-masked]
> Date: Tue, 24 Jan 2023 19:50:27 +0200
> From: Eli Zaretskii <[email-masked]>
> 
> and I still don't have a clear picture regarding which code calls
> delete-file and why.  For example, the first backtrace above says that
> comp--native-compile calls delete-file via some byte-compiled
> function, not directly.  But what is that byte-compiled function? can
> you figure that out?
> 
> There is a direct call to delete-file in comp--native-compile, but is
> that the call which fails?  And if so, why does it fail?  Which code
> created the .eln file that comp--native-compile tries to delete?

With this simple .emacs:

  (require 'delight nil t)

I cannot reproduce these errors from delete-file, although the
trampoline for advice-add in delight.el does get natively-compiled.
After the compilation finishes, I see no left-over *.eln files in my
system temporary directory.  So there's definitely more in your case
than meets the eye, and just getting Emacs to compile a trampoline is
not enough to trigger the problem.