GuileEmacsBuild

You can get a GuileEmacs binary by compiling it yourself, or using a build script for your distro.

Compiling from source

Dependencies

Dependencies - NicFerrier built on Ubuntu and needed everything from EmacsSnapshotAndDebian:

autoconf automake libtool texinfo build-essential xorg-dev libgtk2.0-dev libjpeg-dev libncurses5-dev libgif-dev libtiff-dev libm17n-dev libpng12-dev librsvg2-dev libotf-dev

as well as these:

flex libgmp-dev libunistring-dev libffi-dev libgc-dev libltdl-dev

See also the README file in the Guile repo. A recent version of libgc is best, like 7.4.2. Also recent versions of autotools components and gcc (4.7 is known to work).

Compile Guile

First you need to clone and build the ‘wip-elisp’ branch of the Guile repository.

$ mkdir -p $HOME/guile-emacs/guile
$ mkdir ~/src

$ cd ~/src
$ git clone git://git.sv.gnu.org/guile.git
$ cd guile
$ git checkout wip-elisp

$ ./autogen.sh
$ ./configure --prefix=$HOME/guile-emacs/guile
$ make
$ make install

This requires all the usual Guile dependencies; see the README file in the repo. Compilation is very slow, especially for the first few “.go” files. You then need to install this Guile build somewhere where it will be accessible during subsequent compilation of Emacs; you can set the installation root via the ‘--prefix’ option to ./configure.

To make the Guile installation available to subsequent compilation processes, you will need to set or augment some environment variables like PATH, PKG_CONFIG_PATH, CPATH, and LIBRARY_PATH. If you just installed it in /usr/local then this is probably not necessary.

Compile Emacs

Next you clone and build the ‘wip’ branch of this Emacs repository. This requires all the usual Emacs dependencies, though you can disable some features via the ./configure script. (Non-GTK didn’t work for me so let me advise against disabling that.)

While building Emacs, you might need to run “make -k” several times if plain “make” fails. I also had to export LD_LIBRARY_PATH=/path/to/libguile during the build, and for launching the resulting emacs executable.

cd ~/src
git clone --depth 1 -b wip git://git.hcoop.net/git/bpt/emacs.git
cd emacs

# These make Emacs' configure stuff find the stuff guile has left
export ACLOCAL_PATH=$HOME/guile-emacs/guile/share/aclocal
export PKG_CONFIG_PATH=$HOME/guile-emacs/guile/lib/pkgconfig
export LD_RUN_PATH=$HOME/guile-emacs/guile/lib
# ... and of course we need to tell Emacs about Guile binaries too...
PATH=$HOME/guile-emacs/guile/bin:$PATH

./autogen.sh 
# ... and build Emacs
./configure --prefix=$HOME/guile-emacs/emacs
make
make install

Note that there’s a known bug with GCC 5 and Emacs trunk where gcc miscompiles the code. See Emacs bug #24065. You can work around this by -fno-builtin-malloc or using clang (e.g. `./configure CC=clang’).

A transcript of a successful build of both Guile and Guile-Emacs on Ubuntu 14.04 can be found on pastebin.

Warning it takes a long time to compile Guile-Emacs. This is because Guile-Emacs has to compile every single Elisp file, it doesn’t have the ability to dump a ‘temacs’ like C Emacs does. It took me several hours on a fast, modern laptop in 2014.

Using your build

Once you’ve compiled and installed you can start Guile-Emacs like so:

$HOME/guile-emacs/emacs

this is a real Emacs remember, so it will try and load your personal config files unless you:

$HOME/guile-emacs/emacs -q

might be worth doing.

Another warning it takes a while to start.

Updating

The Guile and Emacs repositories should normally be updated at the same time. If the Guile repository has changed, you’ll need to rebuild and reinstall it before building a new version of Guile-Emacs to ensure compatibility.

The most convenient way to update is by running ‘git pull --rebase wip’ in each repository. The repositories are rebased themselves from time to time, and the rebase option will prevent the creation of unnecessary merge commits. The rebase option is safe to use for tracking upstream development; if you make local changes, you should read the ‘git pull’ documentation to make sure that its effect is acceptable, and consider doing development in a separate branch.

Build scripts

Even if you’re not using these distros, you may find the build scripts useful to refer to (e.g. they list build dependencies).

Guix

GNU Guix has a Guile-Emacs package:

$ guix package -i guile-emacs

The Guix package uses a known-good commit for both Guile and Emacs. You can see which commits are being used by looking at the package scripts:

$ guix edit guile-emacs
$ guix edit guile-for-guile-emacs

If you don’t have Guix installed, you can view the guile-emacs package description and the guile-for-guile-emacs package description in your browser.

Arch Linux

A guile Emacs package is available in AUR: