Bug 295906 - misc/llama-cpp: fix webui
Summary: misc/llama-cpp: fix webui
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-07 03:25 UTC by Eric Camachat
Modified: 2026-06-08 06:29 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
Fix webui (1.09 KB, patch)
2026-06-07 03:25 UTC, Eric Camachat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Camachat 2026-06-07 03:25:40 UTC
Created attachment 271577 [details]
Fix webui

The WebUI from my local built llama-server is gone.
Not sure it's because of my local environment or not, but I have to put UI files in different location: ${WRKSRC}/build/ -> ${CONFIGURE_WRKSRC}/
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2026-06-07 18:08:10 UTC
I can't reproduce this problem with the local build and with the llama-cpp-9426 package installed from the builders.

I need to be able to understand what causes the problem, otherwise the patch like this would break it for others.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2026-06-07 18:09:39 UTC
Does llama-server WebUI work for you when you install it from the package builder using 'sudo pkg install llama-cpp'?
Comment 3 Eric Camachat 2026-06-07 20:27:31 UTC
(In reply to Yuri Victorovich from comment #2)
I tried llama-cpp-9426 from pkg.freebsd.org.
still the same error, llama-server replied:

{"error":{"message":"File Not Found","type":"not_found_error","code":404}}
Comment 4 Eric Camachat 2026-06-07 20:31:51 UTC
(In reply to Yuri Victorovich from comment #1)
The log from my local build (poudriere):

=======================<phase: stage          >============================
===== env: NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Staging for llama-cpp-9542
===>   Generating temporary packing list
[  0% 1/8] cd /wrkdirs/usr/ports/misc/llama-cpp/work/.build/tools/ui && /usr/local/bin/cmake -DUI_SOURCE_DIR=/wrkdirs/usr/ports/misc/llama-cpp/work/llama.cpp-b9542/tools/ui -DUI_BINARY_DIR=/wrkdirs/usr/ports/misc/llama-cpp/work/.build/tools/ui -DLLAMA_SOURCE_DIR=/wrkdirs/usr/ports/misc/llama-cpp/work/llama.cpp-b9542 -DHF_BUCKET=llama-ui -DHF_VERSION=b9542 -DHF_ENABLED=ON -DBUILD_UI=ON -DLLAMA_UI_EMBED=/wrkdirs/usr/ports/misc/llama-cpp/work/.build/tools/ui/llama-ui-embed -P /wrkdirs/usr/ports/misc/llama-cpp/work/llama.cpp-b9542/scripts/ui-assets.cmake
-- UI: npm not found, skipping npm build
-- UI: downloading from b9542: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/b9542
-- UI: download bundle.css from b9542 failed: "Could not resolve hostname"
-- UI: downloading from latest: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/latest
-- UI: download bundle.css from latest failed: "Could not resolve hostname"
-- UI: HF download failed
CMake Warning at /wrkdirs/usr/ports/misc/llama-cpp/work/llama.cpp-b9542/scripts/ui-assets.cmake:348 (message):
  UI: no assets available - building without an embedded UI.  In a
  disconnected environment, download the pre-built UI from a llama.cpp
  release at https://github.com/ggml-org/llama.cpp/releases and extract to
  tools/ui/dist.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2026-06-08 06:28:22 UTC
Fixed.

Thanks for reporting!
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-06-08 06:29:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=be1ff7c68956b1f5fa9c208e45e00bccc0aad797

commit be1ff7c68956b1f5fa9c208e45e00bccc0aad797
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-06-08 06:09:34 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-06-08 06:28:13 +0000

    misc/llama-cpp: Fix WebUI fetch

    PR:             295906
    Reported by:    Eric Camachat <eric@camachat.org>

 misc/llama-cpp/Makefile                      |    48 +-
 misc/llama-cpp/distinfo                      |    16 +-
 misc/llama-cpp/files/fetch-ui.sh (new)       |    91 +
 misc/llama-cpp/files/package-lock.json (new) | 10704 +++++++++++++++++++++++++
 4 files changed, 10834 insertions(+), 25 deletions(-)