Background: Termux is a Linux terminal environment that runs under Android. It provides a terminal version of Emacs 25.3.

However, I would like to build Emacs directly from the master branch in the archive. However, I have stumbled on two problems:

1) The emacs build recipe for termux patches a number of files. I will need to apply those patches as well.

2) When running autoconf.sh (to generate the configure script), I get a number of errors. (I can't copy-paste from the android device, unfortunately). When running autoreconf -fi -I m4 the following is emitted:

/PATH/TO/bin/m4: m4_syscmd subprocess failed
configure.ac:5191: error: expected source file, required through AC_LIBSOURCES, not found
m4/gnulib-comp.m4:177:gl_INIT is expanded from...
configure.ac:5191: the top level
autom4te: /PATH/TO/bin/m4 failed with exit status 1

Does anybody has a step by step description on how to build Emacs from source on Termux? Alternatively, do you have any suggestion on how I should modify the build scripts myself so that they get the latest version rather than a specific one? (The build scripts downloads the sources as a tar.gz file, presumably with a pre-generated configure file, so a great help would be if someone would provide the latest sources the same way.)

1 Answer 1


Latest source tarball is available from


  • Thanks, this is just what I need! I'll try to build Emacs on termux and get back with a full recipe. Dec 6, 2017 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.