Skip to content

Compile bug: failed to build llama-server after #22937 #23055

Description

@MaxKruse

Git commit

253ba11

Operating systems

Windows

GGML backends

CUDA

Problem description & steps to reproduce

Trying to build the project locally, i encounter an error in regards to the webui bucket download. I did manually delete any cmake cache beforehand.

Furthermore, the download seems to try to do... something weird:

C:\Dev\llama.cpp\tools\server>dir public
 Datenträger in Laufwerk C: ist Samsung 990 Pro
 Volumeseriennummer: ECAF-52AB

 Verzeichnis von C:\Dev\llama.cpp\tools\server\public

14.05.2026  16:06    <DIR>          .
14.05.2026  16:01    <DIR>          ..
14.05.2026  16:06                 0 index.html;bundle.js;bundle.css;loading.html
               1 Datei(en),              0 Bytes
               2 Verzeichnis(se), 426.989.477.888 Bytes frei

First Bad Commit

#22937

Compile command

@echo off
setlocal

:: Get the directory where this script is located
SET SCRIPT_DIR=%~dp0

:: Remove trailing backslash if present
IF "%SCRIPT_DIR:~-1%"=="\" SET SCRIPT_DIR=%SCRIPT_DIR:~0,-1%

:: take the first positional argument to be either release (default) or debug
IF "%1"=="" (
  SET BUILD_TYPE=release
) ELSE (
  SET BUILD_TYPE=%1
)

:: Define the preset as a string here, so we copy and build the correct preset
SET PRESET=x64-windows-llvm-%BUILD_TYPE%

echo Script directory: %SCRIPT_DIR%

:: Set OpenSSL variables to help CMake find the correct libraries
set "OPENSSL_ROOT_DIR=C:\Program Files\OpenSSL-Win64"
set "OPENSSL_INCLUDE_DIR=%OPENSSL_ROOT_DIR%\include"
set "OPENSSL_LIBRARIES=%OPENSSL_ROOT_DIR%\lib"
set "OPENSSL_CRYPTO_LIBRARY=%OPENSSL_ROOT_DIR%\lib\libcrypto.lib"
set "OPENSSL_SSL_LIBRARY=%OPENSSL_ROOT_DIR%\lib\libssl.lib"

echo Configuring CMake with preset: %PRESET%
cmake --preset %PRESET% ^
  -DGGML_NATIVE=ON ^
  -DGGML_CUDA=ON ^
  -DGGML_CPU=ON ^
  -DLLAMA_BUILD_SERVER=ON ^
  -DCMAKE_CUDA_ARCHITECTURES=89 ^
  -DLLAMA_BUILD_TESTS=OFF ^
  -DGGML_BUILD_TESTS=OFF ^
  -DLLAMA_OPENSSL=ON ^
  -DOPENSSL_ROOT_DIR="%OPENSSL_ROOT_DIR%" ^
  -DOPENSSL_INCLUDE_DIR="%OPENSSL_INCLUDE_DIR%" ^
  -DOPENSSL_LIBRARIES="%OPENSSL_LIBRARIES%" ^
  -DOPENSSL_CRYPTO_LIBRARY="%OPENSSL_CRYPTO_LIBRARY%" ^
  -DOPENSSL_SSL_LIBRARY="%OPENSSL_SSL_LIBRARY%"
if errorlevel 1 exit /b 1

popd
:: -----------------

echo Building CMake project...
cmake --build build-%PRESET% --config Release -j 24
if errorlevel 1 exit /b 1

:: Copy the files inside "./build-x64-windows-llvm-%BUILD_TYPE%\bin" to the folder "C:\tools\llamacpp"
echo Copying binaries to C:\tools\llamacpp\
xcopy /y /s /i "%SCRIPT_DIR%\build-%PRESET%\bin\*" "C:\tools\llamacpp\"

endlocal

Relevant log output

[502/510] Building/provisioning WebUI assets (npm build -> HF Bucket fallback)
-- WebUI: building from source in C:/Dev/llama.cpp/tools/server/webui
-- WebUI: running npm install (first time)
-- WebUI: npm install failed (no such file or directory), falling back to download
--   stderr:
-- WebUI: npm build failed (no such file or directory), falling back to download
--   stderr:
-- WebUI: downloading assets from version: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/9152
-- WebUI: failed to download index.html;bundle.js;bundle.css;loading.html from version: "HTTP response code said error"
-- WebUI: downloading assets from latest: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/latest
-- WebUI: failed to download index.html;bundle.js;bundle.css;loading.html from latest: "HTTP response code said error"
CMake Warning at C:/Dev/llama.cpp/scripts/webui-download.cmake:199 (message):
  WebUI: failed to download assets from HF Bucket (llama-ui)


CMake Warning at C:/Dev/llama.cpp/scripts/webui-download.cmake:211 (message):
  WebUI: no source available.  Neither local build
  (C:/Dev/llama.cpp/tools/server/webui) nor HF Bucket download succeeded.


CMake Warning at C:/Dev/llama.cpp/scripts/webui-download.cmake:212 (message):
  WebUI: building server without embedded WebUI.  Set LLAMA_BUILD_WEBUI=OFF
  to suppress this warning.


[503/510] Generating index.html.hpp
FAILED: tools/server/index.html.hpp C:/Dev/llama.cpp/build-x64-windows-llvm-release/tools/server/index.html.hpp
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Dev\llama.cpp\build-x64-windows-llvm-release\tools\server && "C:\Program Files\CMake\bin\cmake.exe" -DINPUT=C:/Dev/llama.cpp/tools/server/public/index.html -DOUTPUT=C:/Dev/llama.cpp/build-x64-windows-llvm-release/tools/server/index.html.hpp -P C:/Dev/llama.cpp/scripts/xxd.cmake"
CMake Error at C:/Dev/llama.cpp/scripts/xxd.cmake:10 (file):
  file failed to open for reading (No such file or directory):

    C:/Dev/llama.cpp/tools/server/public/index.html

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions