Building Emacs 27.1 on macOS Big Sur

1 minute read

It’s been a while since I posted a Emacs build walk-through, one version of macOS has come and gone and a new major version of Emacs has arrived, let’s get to it.

Building Emacs has only gotten easier since macOS Catalina, so, let’s make this quick.

The Prerequisites

  • Xcode.
  • Autoconf and Automake. Used to build the build configuration.
  • GnuTLS for making SSL connections. Replaced the more commonly available OpenSSL in Emacs 26.

The easiest way to get everything, save Xcode (which you already have) is with Homebrew. In fact, the Emacs 27.1 build process now plays nicely with Homebrew, making this my preferred method.

brew install autoconf automake gnutls

The Source

git clone git://git.savannah.gnu.org/emacs.git
cd emacs
git checkout emacs-27

(master is the development branch, emacs-27 is the current released version.)

The Environment

The version 27.1 build process knows about Homebrew and where it stores stuff. In the past you’d have to add the path to makeinfo (“/usr/local/opt/texinfo/bin”) to your PATH, but this is no longer necessary.

Emacs 26 and possibly early versions of 27 also had problems finding Libxml2 but this has been corrected as well.

In short, as long as you have installed the prerequisites with Homebrew, you no longer need to do anything to your environment.

Build

make configure
./configure --with-ns
make install

Note, make install builds the macOS app bundle, it doesn’t actually install anything.

Install

make install builds nextstep/Emacs.app. Test it with:

open nextstep/Emacs.app

Then reveal it in the Finder:

open -R nextstep/Emacs.app

drag it to the Applications folder. Done.

Tags: ,

Updated:

Comments