I'm struggling to build Emacs from the feature/android branch. I tried running the ./configure script this way:



But I get the following error:

configure: WARNING: Unable to locate a usable pkg-config
configure: error: The following required libraries were not found:
Maybe some development libraries/packages are missing?
To build anyway, give:
as options to configure.
configure: error: Failed to cross-configure Emacs for android.

I manually downloaded the GnuTLS devel package for AArch64 and extracted somewhere in my home folder, but I have no idea how to make it recognizable from the script. I already tried --with-build-sysroot=... or setting PKG_CONFIG_PATH, but with no success.

Then I just gave up and set --with-gnutls=ifavailable. However, I naturally got another similar error:

checking for library containing tputs... no
configure: error: The required function 'tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libcurses, libtermcap
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.

But I encounter the the same difficulties, since I've yet to find a systematic approach for dealing with libraries when cross-compiling.

I'm using Fedora 37.

  • You have to install all of the Emacs dependencies in the appropriate place within your cross-compilation tool chain. It would probably also help to have pkg-config properly installed too.
    – nega
    Apr 24, 2023 at 14:01
  • This question could be on stackoverflow, superuser, android, or here, with reasonably equal chance of finding someone who can answer it. For instance, see android.stackexchange.com/a/19559/413 which also links to a FAQ for building emacs.
    – Trevoke
    Apr 28, 2023 at 19:37


Your Answer

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

Browse other questions tagged or ask your own question.