TNN icon indicating copy to clipboard operation
TNN copied to clipboard

编译Android demo报错

Open WCZ93762 opened this issue 3 years ago • 3 comments

1. 环境(environment)

  • Build OS and Version: Mac
  • RunTime OS Version: Android
  • RunTime DEVICE: ARM/OPENCL

2. Github版本

  • branch:master
  • commit(optional):

3. 编译方式(compile method) 在安卓studio中编译提示cmake有问题: CMake Error at ../../../CMakeLists.txt:336 (message): No Python installation found! It is required by OpenCL codegen. 但是单独使用终端执行cmake会报以下错误 CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: log-lib linked by target "tnn_wrapper" in directory /Users/zego/Desktop/code/TNN/examples/android/demo

-- Generating done

4. 编译日志(build log)

将日志粘贴在这里
Paste log here or pastebin

在Android Studio中的错误: executing external native build for cmake /Users/zego/Desktop/code/TNN/examples/android/demo/CMakeLists.txt

CMake Error at ../../../CMakeLists.txt:336 (message): No Python installation found! It is required by OpenCL codegen.

在终端中的编译日志: -- The C compiler identification is AppleClang 13.0.0.13000027 -- The CXX compiler identification is AppleClang 13.0.0.13000027 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is Clang with GNU-like command-line -- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc /Users/zego/Desktop/code/TNN/examples/android/demo /Users/zego/Desktop/code/TNN -- >>>>>>>>>>>>> -- TNN BUILD INFO: -- System: Darwin -- Processor: arm64 -- Cpu: ON -- X86: OFF -- Arm: ON -- Arm82: OFF -- Metal: OFF -- OpenCL: ON -- CUDA: OFF -- DSP: OFF -- Atlas: OFF -- TensorRT: OFF -- AppleNPU: OFF -- HuaweiNPU: OFF -- RKNPU: OFF -- OpenVINO: OFF -- OpenMP: OFF -- TEST: OFF -- --Unit Test: OFF -- Quantization: OFF -- ModelCheck: OFF -- DEBUG: -- PROFILE: OFF -- BENCHMARK: OFF -- BENCHMARK Layer: OFF -- Model Converter: OFF -- ONNX2TNN Converter: OFF -- TNN2MEM: OFF -- BENCHMARK Test Lib: OFF -- Dynamic Range Quantization: OFF -- Found PythonInterp: /Users/zego/opt/anaconda3/bin/python (found version "3.9.12") Generate OpenCL Source done !!!

-- Looking for CL_VERSION_2_2 -- Looking for CL_VERSION_2_2 - not found -- Looking for CL_VERSION_2_1 -- Looking for CL_VERSION_2_1 - not found -- Looking for CL_VERSION_2_0 -- Looking for CL_VERSION_2_0 - not found -- Looking for CL_VERSION_1_2 -- Looking for CL_VERSION_1_2 - found -- Found OpenCL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenCL.framework (found version "1.2") -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: log-lib linked by target "tnn_wrapper" in directory /Users/zego/Desktop/code/TNN/examples/android/demo

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

5. 详细描述bug 情况 (Describe the bug)

6. 运行日志(runtime log)

将日志粘贴在这里
Paste log here or pastebin

7. 截图(Screenshots)

<img width="1143" alt="image" src="https://user-images.githubusercontent.com/22864724/182104605-8e68dc0d-b0c8-4d98-895c-0d07bb4f7f3e.png">

WCZ93762 avatar Aug 01 '22 08:08 WCZ93762

set(TNN_OPENCL_ENABLE OFF CACHE BOOL "" FORCE) TNN_OPENCL_ENABLE off for android

koala99 avatar Aug 13 '22 06:08 koala99

你好,已收到,感谢

WCZ93762 avatar Aug 13 '22 06:08 WCZ93762

set(TNN_OPENCL_ENABLE OFF CACHE BOOL "" FORCE) TNN_OPENCL_ENABLE off for android

牛啊牛啊,正常运行了

TheMelody avatar Apr 17 '24 06:04 TheMelody