Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is --with-native-comp mandatory now? #32

Closed
SreenivasVRao opened this issue Mar 14, 2021 · 5 comments
Closed

Is --with-native-comp mandatory now? #32

SreenivasVRao opened this issue Mar 14, 2021 · 5 comments

Comments

@SreenivasVRao
Copy link

https://twitter.com/Koral_001/status/1365392277678530561

GCCEmacs maintainer posted this a few weeks ago.

I saw that the plain ./build-emacs-for-macos --git-sha <SHA> --native-full-aot didn't actually build with the native-comp. But when I retrieved with --with-native-comp it worked automatically.

@jimeh
Copy link
Owner

jimeh commented Mar 15, 2021

Are you using the latest version of the build script? And what git SHA did you use?

I suspect it might be a bug with the native comp detection code, but I'd need the exact SHA to verify.

if neither --with-native-comp or --no-with-native-comp options are given, the script will attempt to detect if the native-comp is supported by the emacs sources it's building. It does this by capturing the output of ./configure --help and checking for the native comp option. I did recently need to update the auto-detection code due to changes in the native-comp branch. I did test the change, but I might have missed an edge case.

@SreenivasVRao
Copy link
Author

This is the build I tried with. Emacs.app-[2021-03-02][1653536][macOS-10.15][x86_64].tbz

(if (and (fboundp 'native-comp-available-p)
       (native-comp-available-p))
  (message "Native compilation is available")
(message "Native complation is *not* available"))

"Native complation is not available"

It worked fine when I built Emacs.app-[2021-03-06][c60f2f4][macOS-10.15][x86_64].tbz with the --with-native-comp flag

@jimeh
Copy link
Owner

jimeh commented Mar 15, 2021

Ah, the issue there is that commit emacs-mirror/emacs@1653536 looks to be from the master branch, not the feature/native-comp branch. The lisp/emacs-lisp/comp.el file does not exist for example.

Commit emacs-mirror/emacs@c60f2f4 is on the feature/native-comp branch though, so it should yield a native-comp capable build even without the --with-native-comp flag.

The build script should print information about native-comp very early on when it runs, something like this:

==> INFO: Detecting native-comp support: Supported
==> INFO: Compiling from source. This will take a while...
==> INFO: Compiling with native-comp enabled

That said, I do need to improve implementation and/or docs for the --git-sha option, as it's effectively just a override which I added to enable building historically known good builds listed on #6. Potentially I'll add a "--ref-name-override" option instead of the --git-sha option just to make it more obvious what's actually happening.

Personally I use this diff view between the master and feature/native-comp branches to see which new commits have appeared on the native-comp branch: https://github.com/emacs-mirror/emacs/compare/feature/native-comp

@SreenivasVRao
Copy link
Author

Hm... I wasn't watching the logs closely.

I do see the commit show up on the feature branch: https://github.com/emacs-mirror/emacs/commits/feature/native-comp?after=5e4ec4d3c944f586892e08ea4fb7715e0f6ac365+174&branch=feature%2Fnative-comp if you Cmd-F for that commit.... Maybe I'm not reading the commit history right. Thanks anyhow :)

@jimeh
Copy link
Owner

jimeh commented Mar 15, 2021

Right, yeah just the list of commits for the branch can be misleading, as it includes all commits on the branch, regardless of if they originated in the branch in question or on another branch and was later merged in.

And the commit in question originated on the master branch, and wasn't merged into feature/native-comp till the 6th of March in this commit: emacs-mirror/emacs@43b0df6

If you look at the diff view I linked to earlier, there's only a single commit on the 2nd of March.

I'll close this issue now, but feel free to reply if you have any more questions :)

@jimeh jimeh closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants