Building emacs 🐃 native 🆙

This blog post describes how to build Emacs with native comp activated.

Install build dependencies (Ubuntu 22)

sudo apt install build-essential sudo apt build-dep emacs sudo apt install libgccjit0 libgccjit-11-dev

Build native emacs

cd ~/src git clone git:// pushd emacs ./ popd mkdir -p build/emacs99-99 cd build/emacs99-99 ../../emacs/configure --with-mailutils \ --with-native-compilation \ --with-x-toolkit=gtk3 \ --prefix=$HOME/.local/emacs \ --with-tree-sitter make make install

Compile packages

(native-compile-async "~/.emacs.d/elpa/" 4 t)