GNU bug report logs -
#76573
30.1; native compilation fails for record inside function
Previous Next
Reported by: Lin Jian <me <at> linj.tech>
Date: Tue, 25 Feb 2025 23:29:02 UTC
Severity: normal
Found in version 30.1
Done: Andrea Corallo <acorallo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 09 Jul 2025 04:33:06 -0400
with message-id <yp1ple94vct.fsf <at> fencepost.gnu.org>
and subject line Re: bug#76573: 30.1; native compilation fails for record inside function
has caused the debbugs.gnu.org bug report #76573,
regarding 30.1; native compilation fails for record inside function
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
76573: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76573
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Run the following shell command and you see the error.
> emacs -Q --batch --eval="(native-compile (defun foo-f () (record 'foo-r)))"
Error: error (foo-f "Type foo-r missing from typeof-types!")
signal(error (foo-f "Type foo-r missing from typeof-types!"))
comp--native-compile(foo-f nil nil)
native-compile(foo-f)
eval((native-compile (defun foo-f nil (record 'foo-r))) t)
command-line-1(("--eval=(native-compile (defun foo-f () (record 'foo-r)))"))
command-line()
normal-top-level()
peculiar error: "Type foo-r missing from typeof-types!"
If you set `native-comp-speed' to -1, 0 or 1, there is no error.
> emacs -Q --batch --eval="(setopt native-comp-speed 1)" --eval="(native-compile (defun foo-f () (record 'foo-r)))"
Emacs 30.0.93 and 30.1 have this bug, while Emacs 29.4 does not.
Real world elisp packages triggering this bug are emacs-aio[1] and
el-easydraw[2].
[1]: https://github.com/skeeto/emacs-aio/issues/31
[2]: https://github.com/misohena/el-easydraw/blob/f6b0f43138693b73cb65327d28bd2a4ee1b6caa7/edraw-path.el
[Message part 3 (message/rfc822, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Lin Jian <me <at> linj.tech>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, monnier <at> iro.umontreal.ca,
>> misohena <at> gmail.com, 76573 <at> debbugs.gnu.org
>> Date: Tue, 17 Jun 2025 16:53:18 +0800
>>
>> Andrea Corallo <acorallo <at> gnu.org> writes:
>>
>> > Lin could you verify it works for your case?
>>
>> I cherry-picked commit f38e969 into Emacs 30.1. I can verify that
>> el-easydraw and emacs-aio compiles without error.
>
> Thanks.
>
> Andrea, what's next? Should we backport to emacs-30?
Hi Eli,
I applied the patch to emacs-30. Tests are clean here so I pushed the
backport as 05ecb2b8f02.
Closing this then.
Regards
Andrea
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.