Skip to content

Instantly share code, notes, and snippets.

@lopesivan
Created April 30, 2022 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lopesivan/10511803a6805f679e763dc98192cce3 to your computer and use it in GitHub Desktop.
Save lopesivan/10511803a6805f679e763dc98192cce3 to your computer and use it in GitHub Desktop.
Build emacs

Build emacs

A one-liner to install all dependencies is:

$ sudo apt update
$ sudo apt install build-essential libgtk-3-dev libgnutls28-dev \
  libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev \
  libncurses-dev texinfo \
  libxml2-dev \
  libjansson4 libjansson-dev \
  libgccjit0 libgccjit-11-dev gcc-11 g++-11

Download source

$ sudo apt update
$ git clone git://git.sv.gnu.org/emacs.git
$ cd emacs
$ ./autogen.sh

To use native Elisp compilation we will use gcc-11 so before starting the build run:

 $ export CC=$(which gcc-11) CXX=$(which gcc-11)
 $ ./configure \
 --with-native-compilation \
 --with-json               \
 --with-xml2               \
 --with-x-toolkit=no       \
 --with-xpm=no             \
 --with-jpeg=no            \
 --with-png=no             \
 --with-gif=no             \
 --with-tiff=no

 $ make
@lopesivan
Copy link
Author

$ export CC=$(which gcc-11) CXX=$(which gcc-11)
$ ./configure
--with-native-compilation
--with-json
--with-xml2

$ make

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