* Known case that emacs lisp code doesn't work correctly if native compilde
@ 2021-08-30 18:30 Yasuhiro Kimura
2021-08-30 19:14 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Yasuhiro Kimura @ 2021-08-30 18:30 UTC (permalink / raw)
To: emacs-devel
Hello,
Mew is a mail reader for Emacs (http://www.mew.org/). I have been used
Mew as my mail readler for a while. But while testing native
compilation with FreeBSD amd64, I faced the problem that Mew doesn't
work correctly if .el files of Mew are native compiled.
I reported the problem to mailing list of Mew and recieved a reply
that Debian also faces it and works it around by setting
'no-native-compile' variable to 't' as file-local variable binding.
So it seems the problem is caused by native compilation itself and
isn't specific to some OS.
I would like to investigate it but probably it will take for a while.
So before starting it I would like to ask one question.
Is there any known case that some type of emacs lisp code doesn't work
correctly if it is native compiled?
Best Regards.
---
Yasuhiro Kimura
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Known case that emacs lisp code doesn't work correctly if native compilde
2021-08-30 18:30 Known case that emacs lisp code doesn't work correctly if native compilde Yasuhiro Kimura
@ 2021-08-30 19:14 ` Stefan Monnier
2021-08-30 19:35 ` Yasuhiro Kimura
2021-08-30 20:17 ` T.V Raman
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2021-08-30 19:14 UTC (permalink / raw)
To: Yasuhiro Kimura; +Cc: emacs-devel
> I would like to investigate it but probably it will take for a while.
> So before starting it I would like to ask one question.
I think you should open a bug report for that.
> Is there any known case that some type of emacs lisp code doesn't work
> correctly if it is native compiled?
IIRC native compilation recompiles the .el files instead of starting
from the .elc files, so if compilation of the .el to .elc is only
correct depending on specific packages being loaded in a specific order
it may happen that the native compilation will generate invalid code
(this is typically the case for large packages which force you to
compile the package via a `make` rule which takes care of preloading
the necessary files in the right order).
So far this has been a hypothetical problem, tho, so please report it so
we can better investigate.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Known case that emacs lisp code doesn't work correctly if native compilde
2021-08-30 19:14 ` Stefan Monnier
@ 2021-08-30 19:35 ` Yasuhiro Kimura
2021-08-30 20:17 ` T.V Raman
1 sibling, 0 replies; 6+ messages in thread
From: Yasuhiro Kimura @ 2021-08-30 19:35 UTC (permalink / raw)
To: emacs-devel
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Known case that emacs lisp code doesn't work correctly if native compilde
Date: Mon, 30 Aug 2021 15:14:28 -0400
> IIRC native compilation recompiles the .el files instead of starting
> from the .elc files, so if compilation of the .el to .elc is only
> correct depending on specific packages being loaded in a specific order
> it may happen that the native compilation will generate invalid code
> (this is typically the case for large packages which force you to
> compile the package via a `make` rule which takes care of preloading
> the necessary files in the right order).
Mew uses configure script and make to build and install it. So the
case of Mew seems fit for your explanation.
> So far this has been a hypothetical problem, tho, so please report it so
> we can better investigate.
OK, I'll submit bug report to Bug Tracker.
---
Yasuhiro Kimura
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Known case that emacs lisp code doesn't work correctly if native compilde
2021-08-30 19:14 ` Stefan Monnier
2021-08-30 19:35 ` Yasuhiro Kimura
@ 2021-08-30 20:17 ` T.V Raman
2021-08-30 20:28 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: T.V Raman @ 2021-08-30 20:17 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Yasuhiro Kimura, emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1312 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
I remember there was a thread on this earlier (one I perhaps started)
where there was an assertion that perhaps .eln files should be derived
from the .elc files, rather than from the .el files to avoid compilation
order issues.
>> I would like to investigate it but probably it will take for a while.
>> So before starting it I would like to ask one question.
>
> I think you should open a bug report for that.
>
>> Is there any known case that some type of emacs lisp code doesn't work
>> correctly if it is native compiled?
>
> IIRC native compilation recompiles the .el files instead of starting
> from the .elc files, so if compilation of the .el to .elc is only
> correct depending on specific packages being loaded in a specific order
> it may happen that the native compilation will generate invalid code
> (this is typically the case for large packages which force you to
> compile the package via a `make` rule which takes care of preloading
> the necessary files in the right order).
>
> So far this has been a hypothetical problem, tho, so please report it so
> we can better investigate.
>
>
> Stefan
>
>
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1 0Ü8
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Known case that emacs lisp code doesn't work correctly if native compilde
2021-08-30 20:17 ` T.V Raman
@ 2021-08-30 20:28 ` Stefan Monnier
2021-08-31 2:13 ` T.V Raman
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2021-08-30 20:28 UTC (permalink / raw)
To: T.V Raman; +Cc: Yasuhiro Kimura, emacs-devel
> I remember there was a thread on this earlier (one I perhaps started)
> where there was an assertion that perhaps .eln files should be derived
> from the .elc files, rather than from the .el files to avoid compilation
> order issues.
Indeed.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Known case that emacs lisp code doesn't work correctly if native compilde
2021-08-30 20:28 ` Stefan Monnier
@ 2021-08-31 2:13 ` T.V Raman
0 siblings, 0 replies; 6+ messages in thread
From: T.V Raman @ 2021-08-31 2:13 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Yasuhiro Kimura, emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1117 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
this might be worth fixing before releasing emacs 28 with native
compilation turned on, I suspect other complex packages will break in a
similar manner.
For my own part, I stopped pursuing native compilation since most of the
speedup native comp gives you is with respect to visual updates (or at
least that is my suspicion) for me, it made no difference running
emacspeak and using speech output, and given that I had to do a bunch of
dances to build emacspeak correctly with native-comp, I just moved on
hoping it would get fixed when I wasn't looking (in the spirit of
Douglas Adams' SEP (Someone Else's Problem) -- it gets solved when you
look away:-)
>> I remember there was a thread on this earlier (one I perhaps started)
>> where there was an assertion that perhaps .eln files should be derived
>> from the .elc files, rather than from the .el files to avoid compilation
>> order issues.
>
> Indeed.
>
>
> Stefan
>
>
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1 0Ü8
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-31 2:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-30 18:30 Known case that emacs lisp code doesn't work correctly if native compilde Yasuhiro Kimura
2021-08-30 19:14 ` Stefan Monnier
2021-08-30 19:35 ` Yasuhiro Kimura
2021-08-30 20:17 ` T.V Raman
2021-08-30 20:28 ` Stefan Monnier
2021-08-31 2:13 ` T.V Raman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).