android-ndk

Could NOT find LibLZMA when building android ndk


I'm following this document https://android.googlesource.com/toolchain/llvm_android/+/refs/heads/llvm-r450784 to compile the NDK.

repo init --partial-clone --no-use-superproject -b  llvm-toolchain -u https://android.googlesource.com/platform/manifest
repo init -m manifest_9352603.xml
repo sync -c
python3 toolchain/llvm_android/build.py --no-build windows --skip-tests --skip-package

error log is:

ndk25/prebuilts/cmake/linux-x86/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER
  LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.2.5")
Call Stack (most recent call first):

my linus os is debian12


Solution

  • Oh! I found the reason. because liblzma was installed in out/lib/liblzma-linux-install/lib64. Copy lib64 as lib will work it out.