Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile bug: How to build llama.android example with -DGGML_VULKAN=ON through android studio. #12085

Open
gaykawadpk opened this issue Feb 26, 2025 · 0 comments

Comments

@gaykawadpk
Copy link

Git commit

master

Operating systems

Linux

GGML backends

Vulkan

Problem description & steps to reproduce

I'm trying to compile llama.android with vulkan backend enabled: i.e. with -DGGML_VULKAN=ON.

Build is failing with error - glslc not found.

First Bad Commit

No response

Compile command

./gradlew build

Relevant log output

Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':llama:buildCMakeRelease[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a'
  [1/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-hbm.cpp.o
  [2/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.o
  [3/65] Creating directories for 'vulkan-shaders-gen'
  [4/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/mmq.cpp.o
  [5/65] No download step for 'vulkan-shaders-gen'
  [6/65] No update step for 'vulkan-shaders-gen'
  [7/65] No patch step for 'vulkan-shaders-gen'
  [8/65] Generating build details from Git
  -- Found Git: /usr/bin/git (found version "2.43.0") 
  [9/65] Building CXX object build-llama/common/CMakeFiles/build_info.dir/build-info.cpp.o
  [10/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-traits.cpp.o
  [11/65] Building C object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
  [12/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/amx.cpp.o
  [13/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.o
  [14/65] Building C object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-quants.c.o
  [15/65] Performing configure step for 'vulkan-shaders-gen'
  FAILED: build-llama/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-stamp/vulkan-shaders-gen-configure /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a/build-llama/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-stamp/vulkan-shaders-gen-configure 
  cd /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a/build-llama/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-build && /home/dcaimlpune/Android/Sdk/cmake/3.22.1/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a/host-toolchain.cmake -DCMAKE_INSTALL_PREFIX=/home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a -GNinja /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders && /home/dcaimlpune/Android/Sdk/cmake/3.22.1/bin/cmake -E touch /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a/build-llama/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-stamp/vulkan-shaders-gen-configure
  CMake Warning (dev) in CMakeLists.txt:
    No project() command is present.  The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command.  Add a line of
    code such as
  
      project(ProjectName)
  
    near the top of the file, but after cmake_minimum_required().
  
    CMake is pretending there is a "project(Project)" command on the first
    line.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- The C compiler identification is GNU 13.3.0
  -- The CXX compiler identification is GNU 13.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/gcc - 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: /usr/bin/g++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE  
  CMake Error at CMakeLists.txt:4 (message):
    glslc not found.
  
  
  CMake Warning (dev) in CMakeLists.txt:
    No cmake_minimum_required command is present.  A line of code such as
  
      cmake_minimum_required(VERSION 3.22)
  
    should be added at the top of the file.  The version specified may be lower
    if you wish to support older CMake versions for this project.  For more
    information run "cmake --help-policy CMP0000".
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Configuring incomplete, errors occurred!
  See also "/home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a/build-llama/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-build/CMakeFiles/CMakeOutput.log".
  [16/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.o
  [17/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o
  [18/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
  [19/65] Building C object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
  [20/65] Building CXX object build-llama/ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.o
  [21/65] Building C object build-llama/ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.o
  [22/65] Building C object build-llama/ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /home/dcaimlpune/Android/Sdk/cmake/3.22.1/bin/ninja \
        -C \
        /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama/.cxx/Release/5x6s385r/arm64-v8a \
        ggml \
        ggml-base \
        ggml-cpu \
        ggml-vulkan \
        llama \
        llama-android
    from /home/dcaimlpune/ashwini_wp/bmw/llama.cpp/examples/llama.android/llama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant