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
add native-comp-branch option #188
Conversation
031c90f
to
70b3965
Compare
Oh well, I can't test it locally now. So... power of CI? |
70b3965
to
be11aae
Compare
@d12frosted i saw you add this option |
No, |
be11aae
to
b29d56f
Compare
It becomes too much hassle. |
b29d56f
to
0cd86e0
Compare
Has anyone built it successfully? I've wasted two days trying to get it right. Darn thing takes forever to compile. I have failed to build it with Cocoa. I need GUI, I can't use terminal only Emacs. Are things really that fast as people claim them to be? It it worth it going through the hassle? |
Oh yeah, it takes so much time to compile everything. For me it starts with 105 minutes to compile It seems that for some people these instructions worked fine. Regarding your question about speed - I am also curious, but never succeeded to build it 😭 |
I successfully built and use it, yeah (following the instructions I posted - these should also work). Honestly I haven't seen a lot of improvements in terms of speed, but I switched from Spacemacs to Doom around the same time so it's hard to know for sure. In any case the benchmarks definitely show a huge improvement. Whether that translates to real-life improvements... maybe? |
I have brushed up this branch to make it compile, that's not to say it's actually working yet. But should i make a WIP PR just so that if someone else wants to try they can? I think the current issues I'm facing are related to upstream bugs. It seems that the binary storage location handling is different when compiling with NS vs without. |
I believe we are waiting on this PR Homebrew/homebrew-core#59134 (or actually, this one? bit weird that they would just take over the PR: Homebrew/homebrew-core#60338) to be merged into Brew so that we have a gcc-with-jit-enabled to build with. |
9ad405f
to
e4c8c19
Compare
😿
|
I got this issue as well when compiling from scratch on linux. I wish I could remember my fix - I think I just picked a different emacs commit to build from from a few days prior... |
e4c8c19
to
d0df202
Compare
It seems that I need to configure include path. Checkout my latest commit. Still doesn't work though :D |
Now I get this:
|
The same error as here :) https://gist.github.com/AllenDang/f019593e65572a8e0aefc96058a2d23e#gistcomment-3412087 Trying clagn as |
Wow, I'm surprised you can somehow build with clang and have it still work, I don't really understand how that works! I haven't seen the AppKit issue before sadly. I wonder if it's just a symlink missing somewhere. |
Ah, the gist mentions different GCC versions which sparked a memory. I think I also had to tweak the version of libgcc I was building with. The version I have installed now is
which I assume is the one I built with. |
🤔 But I am getting it dynamically gcc_ver = Formula["gcc"].any_installed_version
gcc_ver_major = gcc_ver.major
gcc = Formula["gcc"].opt_bin/"gcc-#{gcc_ver_major}"
ENV["CFLAGS"] = "-I#{Formula["gcc"].include} -I#{Formula["libgccjit"].include}"
ENV["LDFLAGS"] = "-L#{HOMEBREW_PREFIX}/lib/gcc/#{gcc_ver_major} -I#{Formula["gcc"].include} -I#{Formula["libgccjit"].include}"
ENV["LIBRARY_PATH"] = "#{HOMEBREW_PREFIX}/lib/gcc/#{gcc_ver_major}:${LIBRARY_PATH:-}" |
Nice, I think we are getting closer:
|
Sorry, no idea :) Let me just post the relevant bit of the flatpak I eventually got building as well (on pop_os, from https://github.com/fejfighter/pgtk-emacs-flatpak), in case it's somehow helpful.
|
I've managed to build with the latest commit, but running fails:
And indeed, there is no |
Ah, this one is common! Edit: I misread the error message, so the rest of this comment may not be used, sorry! The lisp directory gets placed somewhere odd by the build process, but the .app expects it to be inside the app bundle. Most of the time people get around it by symlinking like so:
I expect in your case the actual location of the |
54ef437
to
5b4c3b4
Compare
Update: this comment was related to another PR. Posted here by mistake. |
It seems that it works even in the end of In order to reproduce, put
Notice that it works. But once you ask Well, one more step! |
Hm... I see logs like
|
I'm smashing my head on this since two days :) ... |
On the most recent version, this fails for me at a ❯ ./build 28 --with-native-comp
==> Downloading https://homebrew.bintray.com/bottles/c-ares-1.17.1.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/bcc766ef22142c2c04b122ea0f2070befdf145693edd77d92676d70af6f561b0--c-ares-1.17.1.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/jemalloc-5.2.1_1.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/dc9654699a1655295a1319ee956e64a6318387e860c95b5c7ed43b71af05a47d--jemalloc-5.2.1_1.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/libev-4.33.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/25986a407604060b345a80ce81f51c69f9632ef16de0474e2efcfc69aaf83f2e--libev-4.33.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/nghttp2-1.42.0.catalina.bottle.1.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/88508f0b5b6fe8f4b6ebafa4ccdf474dc326791958553871b31813a251c9a84d--nghttp2-1.42.0.catalina.bottle.1.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/unbound-1.12.0_1.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/17e648ea023235502b669989b07f73005cb916013c12f2054a34e606277f52da--unbound-1.12.0_1.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/python%403.9-3.9.0_2.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/f40ec7142538a2d124655023300e9ba1c6d01ab20656ab9908a4472e284b5b13--python@3.9-3.9.0_2.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/librsvg-2.50.2.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/ac42f39d9a09c89317808276df7860b16cf04130460c4c5d9d60366f4d6922b8--librsvg-2.50.2.catalina.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/imagemagick-7.0.10-44.catalina.bottle.tar.gz
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/38e739ec1cbdb9ad8ac2589520b5db025fdfd34910d245562ce38989699e82cb--imagemagick-7.0.10-44.catalina.bottle.tar.gz
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/feature/native-comp-branch/patches/emacs-2
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/d6aa38272a9f2e6925f681c6591e896e9bdfef71409d424d1ac08f99be30daf7--fix-window-role.patch
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/feature/native-comp-branch/patches/emacs-2
Already downloaded: /Users/ianwahbe/Library/Caches/Homebrew/downloads/48f5e4e5927692c9e6ea2ccecd13440f0c4a59d305dab990c93420bbe6f555a9--system-appearance.patch
Error: SHA256 mismatch
Expected: 22b541e2893171e45b54593f82a0f5d2c4e62b0e4497fc0351fc89108d6f0084
Actual: b4ccc981e461ac12661fc4cf0ad7211a1dcab61dccf4bd4eee49ca5f7d66c496
File: /Users/ianwahbe/Library/Caches/Homebrew/downloads/48f5e4e5927692c9e6ea2ccecd13440f0c4a59d305dab990c93420bbe6f555a9--system-appearance.patch
To retry an incomplete download, remove the file above. |
Understand why :)
Just delete cached file and it will be good. Unfortunately, brew doesn't have versioning for resources. Apparently we should manually mimic it. |
@d12frosted I have opened an issue on brew GitHub page. Let's see what the developers tell us ... brew uses https://www.rubydoc.info/gems/ruby-macho/ for mangling the dylibs and I suspect a bug there. |
A PR request have been created out of the opened issue: Homebrew/brew#10075. I hope it will be merged soon :) |
@d12frosted This 6ecfa3c should make the trick ;) |
@daviderestivo 💯 thank you very much! adding dummy commit to fix CI |
status in CI is fake! :) will test it locally and if everything ok, merge it |
Yep, locally it builds, so merging! |
fixes #187