Problema al compilar Paddle-Lite para Android en Mac 03_No se encuentra una cadena de herramientas para ABI arm64-v8a en el NDK

Encontré un error

(py37_paddle) ➜  Paddle-Lite git:(zxdev) ./lite/tools/build_android.sh  --arch=armv8  --with_cv=ON --with_extra=ON         
-- Found Paddle host system: macosx, version: 10.15.5
-- Found Paddle host system's CPU: 12 cores
-- Found host C compiler: /usr/bin/gcc
-- Found host CXX compiler: /usr/bin/g++
-- Lite ARM Compile android with armv8 
-- Android: Targeting API '23' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
CMake Error at /usr/local/share/cmake-3.10/Modules/Platform/Android/Determine-Compiler-NDK.cmake:97 (message):
  Android: No toolchain for ABI 'arm64-v8a' found in the NDK:

    /Users/zhangxin/Library/Android/sdk/ndk/21.0.6113669

Call Stack (most recent call first):
  /usr/local/share/cmake-3.10/Modules/Platform/Android/Determine-Compiler.cmake:39 (include)
  /usr/local/share/cmake-3.10/Modules/Platform/Android-Determine-CXX.cmake:1 (include)
  /usr/local/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake:26 (include)
  CMakeLists.txt:32 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/Users/zhangxin/github/Paddle-Lite/build.lite.android.armv8.gcc/CMakeFiles/CMakeOutput.log".
make: *** No rule to make target `publish_inference'.  Stop.

Solución

Simplemente use el ndk recomendado por paddle-lite. Resulta que instalé NDK 21 y luego instalé NDK 17 a través de Herramientas-> Administrador de SDK -> Herramientas de SDK, y luego configuré las variables de entorno

export NDK_ROOT=/Users/zhangxin/Library/Android/sdk/ndk/17.2.4988734

Supongo que te gusta

Origin blog.csdn.net/sdlypyzq/article/details/108279757
Recomendado
Clasificación