求助:Homebrew 安装 Emacs-Plus 出错 (或由于 libgccjit?)

最近更新了 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 个赞

试一试这个?

FYI,现在在 mac 上也可以直接 emacs 源码编译、运行

1 个赞

感谢回复,尝试了一下,还是不太行,目前的 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 个赞

我现在问题消失了:

参考上面的链接,我重新安装了 gcc,就没问题了

之前一直出现问题,感觉是光把 libgccjit 重装还不够,还得把 gcc 重装才行(尤其是在 MacOS 系统在大版本升级后)

hhh 如果不是必须要用 macos,可以试试 asahi linux

曾经我有一台 Dell 的笔记本,当时就用 Arch Linux 长达3年多呢,后来是苹果设备越来越多,就把笔记本也换了,全家桶体验还是有点小惊艳的 :laughing:

Asahi Linux 目前也就 M1/M2 支持的好一些吧?

emacs-plus 现在有 prebuilt 的 binary 可以直接下载了,自带 nativecomp,如果不想折腾依赖的问题直接用 prebuilt 的吧。

恩,我的设备比较久没换了