The current version of app-editors/emacs-28.0.9999.ebuild does not set NATIVE_FULL_AOT=1 when the jit use flag is set. This should probably be enabled by default to avoid issues with binary packages and to avoid multi-user systems building the eln files for every user. Reproducible: Always
I wonder if we should control this with a USE flag, especially since it isn't the upstream default. It will considerably increase build time, so some users may want to opt out.
I also wondered whether an additional use flag might be desirable, but couldn't decide whether it made sense because the native compilation will have to happen at some point in time. For development and testing I could see having a use flag to disable AOT being useful, but under normal circumstances if a user sets jit then we know that the compilation will be happening at some point.
Upstream discussion: https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00569.html
(In reply to Ulrich Müller from comment #3) > Upstream discussion: > https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00569.html What was the outcome of this? If I enable JIT, this is pretty much what I want.
I think we want to follow upstream there, i.e. not make any distro specific changes to the default.
I think upstream's objections to having a way to enable this are ... not well founded to say the least. Anyone sysadmin that doesn't want to waste resources on actual multi-user systems, or even users that occasionally need to test as another user, will be burned by the default behavior. In the meantime I put the NATIVE_FULL_AOT=1 in /etc/portage/env/emacs-native-comp and then add app-editors/emacs emacs-native-comp to /etc/portage/package.env/app-editors.
(In reply to Tom Gillespie from comment #6) > In the meantime I put the NATIVE_FULL_AOT=1 in > /etc/portage/env/emacs-native-comp and then add app-editors/emacs > emacs-native-comp to /etc/portage/package.env/app-editors. That won't make much of a difference for the released version. Presumably we'd have to purge all *.elc files in order to trigger native compilation.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e426bc7311ebc80bc5e3e556a23d81b41705fa4 commit 1e426bc7311ebc80bc5e3e556a23d81b41705fa4 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-08-19 17:55:30 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-08-19 17:57:59 +0000 app-editors/emacs: Enable NATIVE_FULL_AOT=1 with USE=jit Unfortunately, upstream doesn't provide any configure option for this. Work around it by setting the environment variable. Bug: https://bugs.gentoo.org/808522 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-28.1-r3.ebuild | 455 +++++++++++++++++++++ ...macs-28.1.91.ebuild => emacs-28.1.91-r1.ebuild} | 3 + app-editors/emacs/emacs-28.1.9999.ebuild | 3 + app-editors/emacs/emacs-29.0.9999.ebuild | 3 + 4 files changed, 464 insertions(+)
As discussed in #gentoo-lisp. I'm leaving this bug open because I consider the current fix only as a workaround, not as a proper solution.
Just a note that my env solution does not work. I think that was an old exploration before I realized that the setting does indeed have to go in the ebuild (as has now been done).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aedc449824b883caf8c9a20579d51aea98d9fd3e commit aedc449824b883caf8c9a20579d51aea98d9fd3e Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-10-03 12:12:48 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-10-03 12:12:48 +0000 app-editors/emacs: Drop NATIVE_FULL_AOT workaround with USE=jit This is now supported as a configure option: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e245c4f226979ccb717cccc8f82b2b0a0f96bdac Closes: https://bugs.gentoo.org/808522 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-29.0.9999.ebuild | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)