Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808522 - app-editors/emacs-28.0.9999 does not set NATIVE_FULL_AOT=1 on use jit
Summary: app-editors/emacs-28.0.9999 does not set NATIVE_FULL_AOT=1 on use jit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-08-15 21:51 UTC by Tom Gillespie
Modified: 2022-10-03 12:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Gillespie 2021-08-15 21:51:27 UTC
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
Comment 1 Ulrich Müller gentoo-dev 2021-08-16 18:15:31 UTC
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.
Comment 2 Tom Gillespie 2021-08-16 19:25:35 UTC
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.
Comment 3 Ulrich Müller gentoo-dev 2021-08-17 12:37:26 UTC
Upstream discussion:
https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00569.html
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 19:10:53 UTC
(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.
Comment 5 Ulrich Müller gentoo-dev 2022-08-18 22:33:00 UTC
I think we want to follow upstream there, i.e. not make any distro specific changes to the default.
Comment 6 Tom Gillespie 2022-08-18 22:37:53 UTC
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.
Comment 7 Ulrich Müller gentoo-dev 2022-08-19 09:51:45 UTC
(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.
Comment 8 Larry the Git Cow gentoo-dev 2022-08-19 17:58:04 UTC
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(+)
Comment 9 Ulrich Müller gentoo-dev 2022-08-19 17:59:48 UTC
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.
Comment 10 Tom Gillespie 2022-08-19 18:40:54 UTC
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).
Comment 11 Larry the Git Cow gentoo-dev 2022-10-03 12:16:26 UTC
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(-)