rust-lang / rust-mode

Emacs configuration for Rust
Apache License 2.0
1.1k stars 176 forks source link

SIGGEGV when enable tree-sitter on macos #547

Closed Moroshima closed 1 month ago

Moroshima commented 1 month ago

I config rust-mode on my archlinux device, it works well.

(use-package rust-mode
  :init
  (setq rust-mode-treesitter-derive t))

But when I try to use the same init.el on my macbook (with apple silicon), after I press enter or input symbol like "(", the emacs crashed with the error below:

$ emacs main.rs
Fatal error 11: Segmentation fault
zsh: segmentation fault  emacs main.rs
SEGV $

I have no idea how to debug the error.

Moroshima commented 1 month ago

It seems to be a bug of emacs built-in rust-ts-mode, it's confusing.

Moroshima commented 1 month ago

brew install --build-from-source solved the problem.