Skip to content

Instantly share code, notes, and snippets.

@ambirdsall
Last active March 21, 2023 07:51
Show Gist options
  • Save ambirdsall/1abef266ee57b97c14f63a3e118ef7f2 to your computer and use it in GitHub Desktop.
Save ambirdsall/1abef266ee57b97c14f63a3e118ef7f2 to your computer and use it in GitHub Desktop.

How I made my millions compiled emacs on an M1 running linux

First, you have to clone emacs and checkout your branch of choice (most likely a major version branch like `emacs29`). Go nuts, though, this step is half the fun of building from source.

Once you’ve done that, you have to generate a bunch of c files templatized for different operating systems:

./autogen.sh

twiddles thumbs

Then you have to choose what features to compile in:

./configure --with-pgtk \
            --with-native-compilation \
            --with-json \
            --with-xwidgets \
            --with-imagemagick \
            --without-sound

twiddles thumbs

Then you actually compile the program, build the docs, yada yada yada Is 10 the right number for this computer? Is -j, as I supposed, used for setting the number of cores used to compile? I didn’t check any of that, I just blindly followed the example of some macOS blog post. It was the same sort of hardware, anyway:

make -j10

Congratulations, you’re at the finish line. Nothing left but to install the files on your system:

sudo make install

A question for another day: how can I provide an arbitrary binary name for a given emacs build that won’t conflict with my trusty emacs daily driver command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment