- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.5k
 
Closed
Labels
Description
Git commit
Operating systems
Windows
GGML backends
Vulkan
Problem description & steps to reproduce
I am trying to build llama.cpp in Msys64 in Windows with Vulkan support.
First Bad Commit
No response
Compile command
cmake -S . -B build -G Ninja -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release -DGGML_CCACHE=OFF -DZLIB_LIBRARY=/mingw64/lib/libz.dll.a -DZLIB_ROOT=/mingw64/lib -DZLIB_INCLUDE_DIR=/mingw64/include
cmake --build build --config ReleaseRelevant log output
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Strawberry/c/bin/gcc.exe - 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: C:/Strawberry/c/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/msys64/usr/bin/git.exe (found version "2.50.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- GGML_SYSTEM_ARCH: x86
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native
-- Found Vulkan: C:/VulkanSDK/1.4.309.0/Lib/vulkan-1.lib (found version "1.4.309") found components: glslc glslangValidator
-- Vulkan found
-- GL_KHR_cooperative_matrix supported by glslc
-- GL_NV_cooperative_matrix2 supported by glslc
-- GL_EXT_integer_dot_product supported by glslc
-- GL_EXT_bfloat16 not supported by glslc
-- Including Vulkan backend
-- ggml version: 0.0.6027
-- ggml commit:  aa79524c
-- Found CURL: C:/msys64/ucrt64/lib/cmake/CURL/CURLConfig.cmake (found version "8.15.0")
-- Configuring done (6.8s)
-- Generating done (0.5s)
-- Build files have been written to: C:/Users/gera/localLlama/llama.cpp/build
[0/2] Re-checking globbed directories...
[16/254] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.obj
FAILED: ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.obj
C:\Strawberry\c\bin\gcc.exe -DGGML_SCHED_MAX_COPIES=4 -DGGML_USE_CPU_REPACK -DGGML_USE_LLAMAFILE -DGGML_USE_OPENMP -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x602 -D_XOPEN_SOURCE=600 -IC:/Users/gera/localLlama/llama.cpp/ggml/src/.. -IC:/Users/gera/localLlama/llama.cpp/ggml/src/. -IC:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu -IC:/Users/gera/localLlama/llama.cpp/ggml/src/../include -O3 -DNDEBUG -std=gnu11 -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wdouble-promotion -march=native -fopenmp -MD -MT ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.obj -MF ggml\src\CMakeFiles\ggml-cpu.dir\ggml-cpu\ggml-cpu.c.obj.d -o ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.obj -c C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c: In function 'ggml_thread_apply_priority':
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2402:9: error: unknown type name 'THREAD_POWER_THROTTLING_STATE'; did you mean 'PPROCESS_POWER_THROTTLING_STATE'?
 2402 |         THREAD_POWER_THROTTLING_STATE t;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         PPROCESS_POWER_THROTTLING_STATE
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2404:10: error: request for member 'Version' in something not a structure or union
 2404 |         t.Version     = THREAD_POWER_THROTTLING_CURRENT_VERSION;
      |          ^
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2404:25: error: 'THREAD_POWER_THROTTLING_CURRENT_VERSION' undeclared (first use in this function); did you mean 'PROCESS_POWER_THROTTLING_CURRENT_VERSION'?
 2404 |         t.Version     = THREAD_POWER_THROTTLING_CURRENT_VERSION;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         PROCESS_POWER_THROTTLING_CURRENT_VERSION
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2404:25: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2405:10: error: request for member 'ControlMask' in something not a structure or union
 2405 |         t.ControlMask = THREAD_POWER_THROTTLING_EXECUTION_SPEED;
      |          ^
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2405:25: error: 'THREAD_POWER_THROTTLING_EXECUTION_SPEED' undeclared (first use in this function); did you mean 'PROCESS_POWER_THROTTLING_EXECUTION_SPEED'?
 2405 |         t.ControlMask = THREAD_POWER_THROTTLING_EXECUTION_SPEED;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         PROCESS_POWER_THROTTLING_EXECUTION_SPEED
C:/Users/gera/localLlama/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c:2406:10: error: request for member 'StateMask' in something not a structure or union
 2406 |         t.StateMask   = 0;
      |          ^
[36/254] Performing configure step for 'vulkan-shaders-gen'
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Strawberry/c/bin/gcc.exe - 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: C:/Strawberry/c/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Enabling coopmat glslc support
-- Enabling coopmat2 glslc support
-- Enabling dot glslc support
-- Configuring done (4.5s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/gera/localLlama/llama.cpp/build/ggml/src/ggml-vulkan/vulkan-shaders-gen-prefix/src/vulkan-shaders-gen-build
[40/254] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.obj
ninja: build stopped: subcommand failed