最近更新了 MacOS 26,就想着再编译一次 Emacs-Plus,结果就一直装不上,请问有道友遇到类似的问题吗?或者有没有排查问题的建议?
通过 brew install emacs-plus 来安装的,报错的最后几行是:
checking for libgccjit.h... yes
configure: error: The installed libgccjit failed to compile and run a test program using
the libgccjit library; see config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>.
If reporting this issue please do so at (not Homebrew/* repositories):
https://github.com/d12frosted/homebrew-emacs-plus/issues
安装的 libgccjit 版本是15.2.0。
1 个赞
Jamie
2025 年12 月 10 日 09:36
2
试一试这个?
已打开 10:32PM - 09 May 24 UTC
已关闭 01:02PM - 10 May 24 UTC
### Version
emacs-plus@30
### Make sure to follow these steps before submittin… g the issue
- [X] run `brew update` and try to reproduce the issue again
- [X] run `brew doctor`, fix all issues and try to reproduce your issue again
- [ ] try to reproduce your issue without any custom options to the formula
### What happened?
<pre>
$ brew install emacs-plus --with-native-comp --with-modern-purple-flat-icon --with-cocoa --with-mailutils --with-imagemagick --with-poll --with-xwidgets
</pre>
<details>
<summary>Command output</summary>
<pre>
==> Fetching d12frosted/emacs-plus/emacs-plus@30
==> Cloning https://github.com/emacs-mirror/emacs.git
...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> Installing emacs-plus@30 from d12frosted/emacs-plus
==> Patching
==> Applying fix-window-role.patch
patching file 'src/nsterm.m'
==> Applying system-appearance.patch
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.m'
==> Applying poll.patch
patching file configure.ac
patching file 'src/nsterm.m'
patching file 'src/process.c'
patching file 'src/sysdep.c'
patching file 'src/syspoll.h'
patching file 'src/sysselect.h'
==> Applying round-undecorated-frame.patch
patching file 'src/frame.c'
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.h'
patching file 'src/nsterm.m'
==> ImageMagick PKG_CONFIG_PATH:
/usr/local/opt/imagemagick/lib/pkgconfig
==> ./autogen.sh
==> ./configure --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/
Last 15 lines from /Users/balac/Library/Logs/Homebrew/emacs-plus@30/02.configure:
checking for library containing inflateEnd... -lz
checking for dladdr... yes
checking for dlfunc... no
checking for gcc_jit_context_acquire in -lgccjit... yes
checking for libgccjit.h... yes
configure: error: The installed libgccjit failed to compile and run a test program using
the libgccjit library; see config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
</pre>
</details>
### brew doctor output
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
ghostscript
Warning: You have an unnecessary local Cask tap.
This can cause problems installing up-to-date casks.
Please remove it by running:
brew untap homebrew/cask
Warning: You have an unnecessary local Core tap!
This can cause problems installing up-to-date formulae.
Please remove it by running:
brew untap homebrew/core
### brew config output
HOMEBREW_VERSION: 4.2.21
ORIGIN: https://github.com/Homebrew/brew
HEAD: 82c2e743a5bcea725f9ca1429e3e21c3088ff904
Last commit: 4 days ago
Core tap HEAD: bfbcc8e5b9375eb91cf9eb53a1d4b759d236cfe5
Core tap last commit: 47 minutes ago
Core tap JSON: 09 May 22:23 UTC
Core cask tap HEAD: 7d8f1aed2f73b1d39022b4ec64e3eb0ac4873286
Core cask tap last commit: 16 minutes ago
Core cask tap JSON: 09 May 22:23 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: emacsclient -n
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ENV_HINTS: set
Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4.1-x86_64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
### Any extra information
_No response_
FYI,现在在 mac 上也可以直接 emacs 源码编译、运行
1 个赞
Deeson
2025 年12 月 10 日 12:38
3
感谢回复,尝试了一下,还是不太行,目前的 Emacs-Plus 甚至已经没有 --with-native-comp 这个参数了:
Error: invalid option: --with-native-comp
Did you mean? with-cacodemon-icon
我感觉似乎是 libgccjit 的问题,因为 homebrew 直接安装可以安装成功,但是
brew install libgccjit --HEAD
就会报错
我之前安装 emacs-plus 的时候遇到过这个问题,我也不知道怎么解决。现在我用 emacs-mac,感觉挺好的,就是版本落后一点(29.4)。
1 个赞
Deeson
2025 年12 月 10 日 13:26
5
我现在问题消失了:
Jamie:
试一试这个?
参考上面的链接,我重新安装了 gcc,就没问题了
之前一直出现问题,感觉是光把 libgccjit 重装还不够,还得把 gcc 重装才行(尤其是在 MacOS 系统在大版本升级后)
Jamie
2025 年12 月 10 日 14:11
6
hhh 如果不是必须要用 macos,可以试试 asahi linux
Deeson
2025 年12 月 12 日 14:03
7
曾经我有一台 Dell 的笔记本,当时就用 Arch Linux 长达3年多呢,后来是苹果设备越来越多,就把笔记本也换了,全家桶体验还是有点小惊艳的
0af
2026 年1 月 22 日 15:44
8
Asahi Linux 目前也就 M1/M2 支持的好一些吧?
emacs-plus 现在有 prebuilt 的 binary 可以直接下载了,自带 nativecomp,如果不想折腾依赖的问题直接用 prebuilt 的吧。