8000 Compile bug: how to enable opencl in termux · Issue #12911 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content
Compile bug: how to enable opencl in termux #12911
Closed
@ZJY0516

Description

@ZJY0516

Git commit

git rev-parse HEAD
e59ea53

Operating systems

Other? (Please let us know in description)

GGML backends

CPU

Problem description & steps to reproduce

When I followed the instructions in https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/OPENCL.md to compile llama.cpp in termux, I encountered an error.

# Install OpenCL Headers and Library

cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE=$HOME/android-sdk/ndk/26.3.11579264/build/cmake/android.toolchain.cmake \
  -DOPENCL_ICD_LOADER_HEADERS_DIR=$HOME/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
  -DANDROID_ABI=arm64-v8a \
  -DANDROID_PLATFORM=24 \
  -DANDROID_STL=c++_shared

-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:8 (project):
  The CMAKE_C_COMPILER:

    /data/data/com.termux/files/home/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/bin/clang

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


ls /data/data/com.termux/files/home/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/

linux-x86_64

First Bad Commit

No response

Compile command

cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE=$HOME/android-sdk/ndk/26.3.11579264/build/cmake/android.toolchain.cmake \
  -DOPENCL_ICD_LOADER_HEADERS_DIR=$HOME/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
  -DANDROID_ABI=arm64-v8a \
  -DANDROID_PLATFORM=24 \
  -DANDROID_STL=c++_shared

Relevant log output

CMake Error at CMakeLists.txt:8 (project):
  The CMAKE_C_COMPILER:

    /data/data/com.termux/files/home/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/bin/clang

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0