Closed kris-anderson closed 1 year ago
While the stuttering's happening, do you have a buffer called *Async-native-compile-log*
? (SPC-b-B
to switch to it) Emacs used significant CPU for me until that buffer's process finished after a few minutes.
While the stuttering's happening, do you have a buffer called
*Async-native-compile-log*
? (SPC-b-B
to switch to it) Emacs used significant CPU for me until that buffer's process finished after a few minutes.
Thank you for the reply. That looks like it solves my first problem! 👍
I wasn't giving emacs enough time, and it was still compiling for about 4-5 minutes the first time I open the app (after install Doom emacs).
Cool! I'm also here from Doom - found your issue while looking through doom doctor
output.
Can confirm I've also got your second issue. Though adding the LIBRARY_PATH
value at the end of ~/.config/emacs/early-init.el
doesn't prevent the crashes on exit for me (adding it earlier tells me that string-join
's definition is void). I've confirmed I have all 3 directories.
Looks like the last path in LIBRARY_PATH
is missing a leading /
.
The crashes only happen for me after opening files (elisp config), not if I exit from the splash screen. They happen whether loading the last session in Doom or opening files directly.
Cool! I'm also here from Doom - found your issue while looking through
doom doctor
output.Can confirm I've also got your second issue. Though adding the
LIBRARY_PATH
value at the end of~/.config/emacs/early-init.el
doesn't prevent the crashes on exit for me (adding it earlier tells me thatstring-join
's definition is void). I've confirmed I have all 3 directories.Looks like the last path in
LIBRARY_PATH
is missing a leading/
.The crashes only happen for me after opening files (elisp config), not if I exit from the splash screen. They happen whether loading the last session in Doom or opening files directly.
Are you on an ARM or Intel Mac? The LIBRARY_PATH
I posted above is for an ARM Mac. Homebrew uses a different base path for Intel machines, so if you're on Intel I think that needs to be changed to /usr/local
.
@kris-anderson you still have a missing slash above:
"opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin22/13")
@kris-anderson you still have a missing slash above:
"opt/homebrew/opt/gcc/lib/gcc/current/gcc/aarch64-apple-darwin22/13")
Thank you for catching that!
Just to update my post, this seems to have been fixed in version 29 of Emacs. I no longer get error reports (my second issue) when exiting Emacs! :)
Are you on an ARM or Intel Mac? The
LIBRARY_PATH
I posted above is for an ARM Mac. Homebrew uses a different base path for Intel machines, so if you're on Intel I think that needs to be changed to/usr/local
.
Sorry for the delayed reply, I'm on an ARM Mac as well. Glad that it's fixed, my error reports are gone too! 🎉
What you were trying to do
Install emacs-mac with the
--with-native-compilation
option on both an Intel and M1 MacBook running macOS 13.4.1.What happened
Everything appears to install okay. At first doom emacs was giving me errors when I tried to run any doom command like
doom sync
. I fixed that by reinstalling gcc and libgccjit though.Now emacs-mac installs without error, and
doom sync
,doom upgrade
, anddoom doctor
all work without errors.So far so good! But here's where I run into two problems.
Problem 1
When scrolling through a file in emacs, there are stutters every 0.5-1.0 seconds. This is when holding the j/k keys to move the cursor up and down the file.
Problem 2
When exiting emacs
C-x C-c
, immediately upon exiting, macOS throws up an error report. Sometimes I get 1 report, sometimes I get 2, and sometimes I get 3, all when quitting the application a single time.Solution
The only thing that fixes both of the above problems, at least that I've been able to determine, is not using the
--with-native-compilation
when building emacs-mac.When I build without native-compilation, scrolling works without issue, and I get no errors when exiting the app.
It's worth noting that I was able to get rid of the errors when exiting the app by creating an early-init.el file that contained the following (when I was running emacs with the
--with-native-compilation
option):Even though this fixed my error when exiting the application, I still ended up with stuttering when scrolling through files.
Output of
brew config
Output of
brew doctor