Looking at the Emacs bug tracker, there’s a bunch of Apple-specific Emacs bugs, and I thought it would be fun to take a look at some of the more trivial bugs. So I wondered what you’d have to do to build Emacs under Macos, and… I found a bunch of people talking about how easy it is, but nobody actually, like, says how to do it. I mean, for somebody who’s barely switched their Apple laptops on.
So since I know naaathing, I’m the ideal person to write this how-to, since people who know everything don’t know what you don’t know.
1a) Install Xcode. This is found in “App Store”, and then search for “Xcode”. Click on the cloud symbol to get it to download. (Just figuring out that took me at least three hours.) It’ll turn into a circle with a square in the middle. That means it’s downloading. It’ll take a while.
1b) Alternatively, just say “gcc” in a terminal. You’ll get a popup asking whether to install command line stuff. Answer yes.
The rest you can do via ssh from your normal Linux machine.
2) Install Homebrew in this insane way:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
It’s a variation on the time-honoured “curl | sh” method. It’ll prompt you for your password, but don’t worry — it’s probably safe.
3) Install the Emacs dependencies and build Emacs. Just cut’n’paste the rest into your ssh session:
brew analytics off mkdir src cd src git clone https://git.savannah.gnu.org/git/emacs.git cd emacs brew install pkg-config automake texinfo jpeg giflib\ libtiff jansson libpng librsvg gnutls make -j4 ./src/emacs
See? It really is that easy, and you almost don’t have to work on the Apple laptop itself. (Although you do if you’re futzing around with display stuff, I guess.)
Go forth and hack.
One thought on “Emacs on Macos for Linux Peeps”