Open railwaycat opened 2 years ago
I don't know if this is the right place to put this and it may be obvious but it may be helpful to some people.
If you get an error like ld returned 1 exit status\nlibgccjit.so: error: error invoking gcc driver
and have Anaconda enabled try to disable it with conda deactivate
in the terminal you're trying to open emacs in. Conda apparently has another version of ld which caused trouble with the SDK.
After disabling Conda everything compiled as they should for me.
@matteha I have switched to a MacPorts version of emacs-mac which is not giving me any issues or crashes so far (3 days of usage). I'm running 28.2 with native-comp, installed from here with no flags.
In reply to the comment from @jdtsmith, I could not find a way to trigger my earlier issues reliably and have found this MacPorts version to be sufficient. I want to be less of a leech as I learn this ecosystem - but I'm just finding my feet right now. I appreciate your suggestions though and I take them to heart.
I'm using the pre-built 28.2 release on an Intel iMac running Monterey 12.6.1 and (native-comp-available-p)
returns nil. What do I have to do to enable native-comp? Do I need to build emacs myself?
@hmelman I'd suggest installing MacPorts and then using that framework to install emacs by the command
sudo port install emacs-mac-app-devel +nativecomp
See also my 8/1/2022 comment.
Thanks, but what I'd like to know (and couldn't find anywhere) is what is the expected current state of these builds and build scripts.
Got the same postinstall ln
error when building --with-native-comp
:
❯ brew postinstall -vd railwaycat/emacsmacport/emacs-mac
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /opt/homebrew/Library/Taps/railwaycat/homebrew-emacsmacport/Formula/emacs-mac.rb
==> Postinstalling emacs-mac
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall railwaycat/emacsmacport/emacs-mac
==> An exception occurred within a child process:
Errno::ENOENT: No such file or directory @ rb_file_s_symlink - (/native-lisp, /opt/homebrew/opt/emacs-mac/Emacs.app/Contents/native-lisp)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:363:in `symlink'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:363:in `block in ln_s'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1574:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:361:in `ln_s'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:380:in `ln_sf'
/opt/homebrew/Library/Taps/railwaycat/homebrew-emacsmacport/Formula/emacs-mac.rb:164:in `post_install'
/opt/homebrew/Library/Homebrew/formula.rb:1160:in `block (2 levels) in run_post_install'
/opt/homebrew/Library/Homebrew/formula.rb:967:in `with_logging'
/opt/homebrew/Library/Homebrew/formula.rb:1159:in `block in run_post_install'
/opt/homebrew/Library/Homebrew/utils.rb:605:in `with_env'
/opt/homebrew/Library/Homebrew/formula.rb:1148:in `run_post_install'
/opt/homebrew/Library/Homebrew/postinstall.rb:24:in `<main>'
The "work" branch of upstream is aligned with 28 pretest since the recent commit, the latest alignment is to 28.0.91. Which means the native-comp feature finally comes to emacs mac port.
I will use this issue to track the work to support homebrew formula to build with native-comp.