Flaky Goodness

Upgrading to Emacs 29.1 on Apple Silicon Macs

August 13, 2023

This is an update to my post about compiling Emacs 28.1 from source. With the recent release of Emacs 29.1, here are the steps I used to upgrade.

Remove existing Emacs

Backup and delete /Applications/Emacs.app if you have one.

Install/re-install dependencies

brew update
brew reinstall gcc
brew install libgccjit texinfo tree-sitter jansson
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

It still seems to be necessary to re-install Xcode command-line tools to prevent Emacs from getting killed on launch.

Get a fresh clone of Emacs

I don’t tend to remote into my Emacs session any more so I didn’t bother updating or applying the multi-tty patch. I may reconsider that if my needs change in the future.

git clone https://bitbucket.org/mituharu/emacs-mac
cd emacs-mac
git checkout emacs-29.1-mac-10.0

Configure and make

autoreconf -i

./configure \ 
  --with-native-compilation \ 
  --with-modules \ 
  --enable-mac-app \ 
  --with-xwidgets \ 
  --with-tree-sitter \ 
  --prefix=/Applications/Emacs.app/Contents/Resources
    
make

Add additional required resources

The build process seems to leave out some required lisp resources, which you will discover if you try to launch the Emacs.app bundle from Finder or from console by typing:

mac/Emacs.app/Contents/MacOS/Emacs

You can manually move these required files into the bundle with:

mkdir -p mac/Emacs.app/Contents/Resources/share/emacs/29.1
mv lisp mac/Emacs.app/Contents/Resources/share/emacs/29.1
mv lative-lisp mac/Emacs.app/Contents

Move the built Emacs into /Applications

I didn’t have much luck with make install so I just manually moved emacs-mac/mac/Emacs.app into /Applications

This was pretty smooth for me, probably because I had things nicely wired up from my previous installation. Good luck!

UPDATE 2023-10-02 to add --with-tree-sitter configuration option and manual installation process. UPDATE 2024-08-17 to add additional required resources to prevent Emacs from being killed at launch