From bb692efaa43809dd8584fefddda42a54a9a50846 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 24 Nov 2026 20:31:24 +0200 Subject: [PATCH] cmake : include the llguidance header from the source tree (#32928) Cargo 1.100 changed the build directory layout for intermediate artifacts, so the header destination llguidance derives from $OUT_DIR no longer resolves to target/release, and the build fails on a missing llguidance.h. The header is a source file that cargo only copies around, so include it from the llguidance source tree instead of from the build output. ref: https://github.com/rust-lang/cargo/pull/17354 Assisted-by: dsh:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (MacBook, M5 Max, 128GB) --- common/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e38485ca01..c454f6bb3c 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -171,7 +171,7 @@ if (LLAMA_LLGUIDANCE) CONFIGURE_COMMAND "" BUILD_COMMAND cargo build --release --package llguidance INSTALL_COMMAND "" - BUILD_BYPRODUCTS ${LLGUIDANCE_PATH}/${LLGUIDANCE_LIB_NAME} ${LLGUIDANCE_PATH}/llguidance.h + BUILD_BYPRODUCTS ${LLGUIDANCE_PATH}/${LLGUIDANCE_LIB_NAME} ${LLGUIDANCE_SRC}/parser/llguidance.h UPDATE_COMMAND "" ) target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_LLGUIDANCE) @@ -180,7 +180,7 @@ if (LLAMA_LLGUIDANCE) set_target_properties(llguidance PROPERTIES IMPORTED_LOCATION ${LLGUIDANCE_PATH}/${LLGUIDANCE_LIB_NAME}) add_dependencies(llguidance llguidance_ext) - target_include_directories(${TARGET} PRIVATE ${LLGUIDANCE_PATH}) + target_include_directories(${TARGET} PRIVATE ${LLGUIDANCE_SRC}/parser) target_link_libraries(${TARGET} PRIVATE llguidance) if (WIN32) target_link_libraries(${TARGET} PRIVATE ws2_32 userenv ntdll bcrypt)