homebrew-emacs-plus: Could not install with @28 --with-native-comp - libgccjit not supported on M1
Please make sure to follow these steps (and mark the checkboxes):
- run
brew updateand try to reproduce the issue again - run
brew doctor, fix all issues and try to reproduce your issue again - run
brew configandbrew doctorand include their output
What you were trying to do
brew install emacs-plus@28 --with-native-comp
What happened (include command output)
$ brew install emacs-plus@28 --with-native-comp
Command output
==> Installing emacs-plus@28 from d12frosted/emacs-plus ==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.35.4.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/ecb945b9df98160dd9c935fc128e862fbc7d4593ff50 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/python%403.9-3.9.4.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9d38ac550179a6b6004a30eb063ce659ba5d14c2412d ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/ghostscript-9.53.3_1.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/e1a01add6b5692ebfd462591db21dd029d081529fbe4 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/libde265-1.0.8.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/856e3db9a951f15fc2e3c416ddf64c8336d405fc1e40 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/docbook-5.1_1.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/53a9dc79db8b2d06dc75009d5d09fc797ddcd5eb4ca0 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/docbook-xsl-1.79.2_1.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9604b8989c3cc180c641b00f595e59d887aa85fbd410 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/gnu-getopt-2.36.2.arm64_big_sur.bottle.tar.gz ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/xmlto-0.0.28.arm64_big_sur.bottle.2.tar.gz ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/shared-mime-info-2.1.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/c2c98a7a02e1b23f5c7f7baafe0e4b04f22a7b1a6df7 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/libheif-1.11.0_2.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/6fb1565de0cf3f02dacaf0c1ca8631132900ecd2fb65 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/liblqr-0.4.2_1.arm64_big_sur.bottle.1.tar.gz ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/libomp-11.1.0.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/f87f7841eb8b72650fa771af39642361aec371ea1a1f ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/ilmbase-2.5.5.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/f465c8e3f824777ab727d17e11c018eff8d8afc12ffe ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/openexr-2.5.5.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/b484c97399b2317707c2685fceeb4e8ba26b9eea3d03 ######################################################################## 100.0% ==> Downloading https://homebrew.bintray.com/bottles/imagemagick-7.0.11-6.arm64_big_sur.bottle.tar.gz ==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/87fd9f93911df4e835c4fa834156dfcb44e566f174cb ######################################################################## 100.0% Error: libgccjit: no bottle available! You can try to install from source with: brew install --build-from-source libgccjit Please note building from source is unsupported. You will encounter build failures with some formulae. If you experience any issues please create pull requests instead of asking for help on Homebrew’s GitHub, Twitter or any other official channels.
Output of brew config
$ brew config HOMEBREW_VERSION: 3.0.11 ORIGIN: https://github.com/Homebrew/brew HEAD: 8e11f03fa93b148e26044a331654241a2c307039 Last commit: 4 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: efa89684e992ed605e9faa975677174c42be70a8 Core tap last commit: 16 minutes ago Core tap branch: master HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_DISPLAY: :0 HOMEBREW_MAKE_JOBS: 8 Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby CPU: octa-core 64-bit arm_firestorm_icestorm Clang: 12.0 build 1200 Git: 2.24.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 7.64.1 => /usr/bin/curl macOS: 11.2.3-arm64 CLT: 12.4.0.0.1.1610135815 Xcode: 12.4 Rosetta 2: false
Output of brew doctor
$ brew doctor Your system is ready to brew.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 23 (5 by maintainers)
@hexagonal-sun this sounds great! thanks for fixing
libgccjitfor M1 💯@DanMossa and @cacology it’s time to some native compilation 😉
Eli fixed the nativecomp segfault a bit later yesterday!
@hexagonal-sun Over here on vanilla Emacs with my own home-grown config everything seems to be fine. I’ve tried different kinds of ways of opening files, and also orgmode, org-roam, mu4e, magit and everything runs great. Whenever I use a new mode for the first time, I can see the compiler doing its thing in
*Async-native-compile-log*.For now I’ve addressed the path problem by adding this to the start of my init.el:
(this only works because the basic stuff has already been native compiled during the first startup from the terminal, and that path gets added early enough for a normal gui startup to work perfectly.)
@hexagonal-sun I modified the emacs-plus formula to use the commit right before that one, and then it builds!
I wonder if that last Emacs commit will break the nativecomp compilation on more systems than just homebrew on M1.
segfaults while building emacs, goodness!
I did
brew reinstall emacs-plus@28 --verbose --with-no-titlebar --with-native-compIn my case, an explicit
brew link libgccjitbeforehand was necessary, else the emacs configure did not find gccjit.Thanks for the links @cacology 💯 It’s sad that it’s still not there.
P. S. pinned for visibility.
Re: Apple Silicon
Not me.
brew install --build-from-source libgccjitfails with:The absence of an arm bottle, noted above, https://formulae.brew.sh/formula/libgccjit suggests this hasn’t come to the attention of someone who knows how to fix it.
brew install --build-from-source libgccjit --HEADfares differently but no better.Furthermore,
brew install --build-from-source libgccjit -iand handholding:./configure --prefix=/opt/homebrew/Cellar/libgccjit/10.2.0_1 --libdir=/opt/homebrew/Cellar/libgccjit/make BOOT_LDFLAGS=-Wl,-headerpad_max_install_namesGives what I think is the real problem:
Mutatis mutandis for handholding
HEAD:EDIT:
A quick follow-up, the issue seems to be that GCC isn’t ported yet:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168 and https://github.com/iains/gcc-darwin-arm64
That’s strange, there is a bottle (formula) for Big Sur. Though maybe it’s just not provided for
arm. So maybe just use the suggestion provided by brew itself:Though I love this controversity in their message. Sigh. But it’s really not related to
emacs-plus.