Help with Android cross build
I tried to cross build webrtc-audio-processing for Android on Linux using --cross-file ./meson-android.txt:
[binaries]
c = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android2
8-clang'
cpp = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android2
8-clang++'
ar = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-
ar'
as = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-
as'
ranlib = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-
ranlib'
ld = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-
ld'
strip = '/opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-
strip'
cmake = '/usr/bin/cmake'
[properties]
sys_root = '/opt/Android/ndk/21.1.6352462/sysroot'
[host_machine]
system = 'android'
cpu_family = 'arm'
cpu = 'aarch64'
endian = 'little'
Command
$ meson . build -Dprefix=$PWD/install --cross-file ./meson-android.txt
failed like this:
The Meson build system
Version: 0.56.1
Source dir: /usr/src/libbaresip-android/webrtc-audio-processing
Build dir: /usr/src/libbaresip-android/webrtc-audio-processing/build
Build type: cross build
Project name: webrtc-audio-processing
Project version: 1.1
C compiler for the host machine: /opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang (clang 9.0.8 "Android (6317467 based on r365631c1) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project e0caee08e5f09b374a27a676d04978c81fcb1928) (based on LLVM 9.0.8svn)")
C linker for the host machine: /opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang ld.bfd 2.27.0.20170315
C++ compiler for the host machine: /opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++ (clang 9.0.8 "Android (6317467 based on r365631c1) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project e0caee08e5f09b374a27a676d04978c81fcb1928) (based on LLVM 9.0.8svn)")
C++ linker for the host machine: /opt/Android/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++ ld.bfd 2.27.0.20170315
C compiler for the build machine: cc (gcc 8.3.0 "cc (Debian 8.3.0-6) 8.3.0")
C linker for the build machine: cc ld.bfd 2.31.1
C++ compiler for the build machine: c++ (gcc 8.3.0 "c++ (Debian 8.3.0-6) 8.3.0")
C++ linker for the build machine: c++ ld.bfd 2.31.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: arm
Target machine cpu: aarch64
Found CMake: /usr/bin/cmake (3.13.4)
Run-time dependency absl found: NO
meson.build:43:0: ERROR: Dependency absl not found: Unable to obtain CMake system information
A full log can be found at /usr/src/libbaresip-android/webrtc-audio-processing/build/meson-logs/meson-log.txt
Without
cmake=/usr/bin/cmake
in meson-android.txt, also cmake is not found: Found CMake: NO
Log file has:
Found CMake: /usr/bin/cmake (3.13.4)
None of 'CMAKE_PREFIX_PATH' are defined in the environment, not changing global flags.
Extracting basic cmake information
Try CMake generator: auto
Calling CMake (['/usr/bin/cmake']) in /usr/src/libbaresip-android/webrtc-audio-processing/build/meson-private/cmake_absl with:
- "--trace"
- "--trace-expand"
- "--no-warn-unused-cli"
- "-DCMAKE_TOOLCHAIN_FILE=/usr/src/libbaresip-android/webrtc-audio-processing/build/meson-private/cmake_absl/CMakeMesonToolchainFile.cmake"
- "."
CMake failed to gather system information for generator with error code 1
OUT:
Running with trace output on.
Running with expanded trace output on.
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!
Any hints why the build fails?