Skip to content

Instantly share code, notes, and snippets.

@wunki
Last active November 3, 2023 06:32
Show Gist options
  • Save wunki/badf76c400a037032b095c759b90c6d0 to your computer and use it in GitHub Desktop.
Save wunki/badf76c400a037032b095c759b90c6d0 to your computer and use it in GitHub Desktop.
Emacs with PGTK, native compilation and JSON on Ubuntu
# Checkout Emacs
$ git clone git://git.sv.gnu.org/emacs.git
# Vanilla Emacs requirements
$ sudo apt install build-essential autoconf libgtk-3-dev libgnutls28-dev libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev libncurses-dev texinfo adwaita-icon-theme-full
# Required for Native JSON
$ sudo apt install libjansson4 libjansson-dev
# Required for GCC
$ sudo apt install gcc-10 libgccjit0 libgccjit-10-dev
$ cd emacs
$ export CC=/usr/bin/gcc-10 CXX=/usr/bin/gcc-10
$ ./autogen.sh
$ ./configure --with-pgtk --with-native-compilation --with-json --without-pop
$ make -j$(nproc)
$ sudo make install
@wunki
Copy link
Author

wunki commented Apr 28, 2022

I use the above to install the latest Emacs with pure GTK, native compilation, and JSON support on my Windows WSL with Ubuntu 22.04. Works like a charm, just don't tell Stallman.

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