0

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

ANDROIDJAR=~/Android/platforms/android-33-ext4/android.jar
BUILDTOOLS=~/Android/build-tools/33.0.2
ANDROIDCC=~/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang

./configure --with-android=$ANDROIDJAR ANDROID_CC=$ANDROIDCC SDK_BUILD_TOOLS=$BUILDTOOLS

But I get the following error:

configure: WARNING: Unable to locate a usable pkg-config
configure: error: The following required libraries were not found:
     gnutls
Maybe some development libraries/packages are missing?
To build anyway, give:
     --with-gnutls=ifavailable
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.

2
  • 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

0

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.