I've had a play with the AUR packages too. The guile4emacs PKGBUILD works perfectly, but the guile-emacs build process segfaults when bootstrap-emacs attempts to load calendar/cal-loaddefs.el:

make[2]: Leaving directory '/home/wilfred/aur/guile-emacs-git/src/guilemacs/lisp'
if test "yes" = "yes"; then \
  rm -f bootstrap-emacs; \
  ln temacs bootstrap-emacs; \
else \
  ./temacs --batch --load loadup bootstrap || exit 1; \
  test "X" = X ||  -zex emacs; \
  mv -f emacs bootstrap-emacs; \
fi
make -C ../lisp autoloads EMACS="../src/bootstrap-emacs"
make[2]: Entering directory '/home/wilfred/aur/guile-emacs-git/src/guilemacs/lisp'
EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file --no-site-lisp -l autoload \
   --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
   --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"calendar/cal-loaddefs.el\")))" \
   -f batch-update-autoloads ./calendar
make[2]: *** [Makefile:466: calendar/cal-loaddefs.el] Segmentation fault (core dumped)
make[2]: Leaving directory '/home/wilfred/aur/guile-emacs-git/src/guilemacs/lisp'
make[1]: *** [Makefile:805: ../lisp/loaddefs.el] Error 2
make[1]: Leaving directory '/home/wilfred/aur/guile-emacs-git/src/guilemacs/src'
make: *** [Makefile:376: src] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Any suggestions?

On 30 August 2016 at 20:32, Wilfred Hughes <me@wilfred.me.uk> wrote:
> I think the variables you mentioned are for building in your home
> directory only. If you build system-wide, for instance under /usr/local
> -- and your mail makes me think you do so -- you should not need them.

I wanted to build them in my home directory. I already have Guile installed
and I didn't want to get things confused.

> I have made some packaging recipes for Arch Linux, and there it works
> without specifing these variables.
>
> https://aur.archlinux.org/packages/guile-emacs-git/ (for emacs)
> https://aur.archlinux.org/packages/guile4emacs-git/ (for guile)

Oh, that's really useful, thanks. I'll have a look at those for
reference (and I've documented them on the GuileEmacsBuild wiki
build).