Another, macOS (Mojave), another major Emacs release, let’s get building.
Ironically, I started this post in
vi. Why? I’d updated brew and a
change in the ImageMagik version broke Emacs.
The complexity of this exercise waxes and wanes as the dependencies of Emacs change and as the versions of tools Apple ships get old or get updated. This time around, there is one new requirement.
Emacs has replaced OpenSSL with GnuTLS for
making SSL connections, you’ll want to install it. With Homebrew is
brew install gnutls. If you use another package manager, you know
how to work it. Building that from scratch is left as an exercise for
Then there are the things you’ve needed for a while now.
Xcode free in the Mac App Store. If you don’t have this already why are you trying to compile Emacs?
Automake. The easiest way to
install is Homebrew via
autoconf automake. If you use another package manager, you know how
to work it. If you are all-in on building from source, check out the
makeinfo (part of the
Texinfo suite). Apple ships
makeinfo, but at some point, the system version fell below the
minimum version Emacs needs to build. Once again, Homebrew is the
easiest way with
brew install texinfo.
However you get
makeinfo, make sure that the path to your new
version comes before /usr/bin where Apple has installed theirs. For
the Homebrew version you’d want:
Now that you have what you need, grab the source:
emacs-26 branch (master is the development branch):
One last bit of housekeeping. Emacs 26 uses Libxml2 to parse XML. The library is included with Xcode, but the Emacs build process can’t find it. Give it a hint with:
Now you’re ready to configure and build:
1 2 3
As always, the
make install step doesn’t actually install anything,
it’s used to create the App bundle after building Emacs.
If it looks good, reveal it in the Finder
Emacs to the Applications folder and you’re good to go!