Skip to content

feat: bump llama.cpp b8772 → b9222 and rebuild all platforms#12

Merged
hsinatfootprintai merged 1 commit into
mainfrom
feat--bump-llamacpp-b9222
May 19, 2026
Merged

feat: bump llama.cpp b8772 → b9222 and rebuild all platforms#12
hsinatfootprintai merged 1 commit into
mainfrom
feat--bump-llamacpp-b9222

Conversation

@hsinatfootprintai

Copy link
Copy Markdown
Contributor

Summary

  • Bumps llama.cpp from b8772 to b9222 (version.go)
  • Rebuilds all 7 prebuilt static-library targets against b9222
  • Picks up the upstream library split: libcommon.alibllama-common.a + libllama-common-base.a (CGO LDFLAGS updated everywhere)
  • New linux-arm64 build path via aarch64-linux-gnu cross-compile

Toolchain changes

  • Dockerfile.libs
    • ARCH_SUFFIX build-arg on the CPU stage so the same Dockerfile can output linux-amd64 or linux-arm64 paths
    • CUDA + Vulkan stages switched to gcc-12 — gcc-13 hits a reproducible internal-compiler-error on fattn-mma-f16 templates (CUDA) and arg.cpp (Vulkan) at b9222
    • Vulkan stage now installs spirv-headers (new b9222 dep — ggml-vulkan calls find_package(SPIRV-Headers))
    • All stages now copy mtmd headers from tools/mtmd/ (previously the headers were committed manually because the Dockerfile didn't track them)
  • Dockerfile.libs-arm64 (new) — aarch64-linux-gnu cross-compile; works in unprivileged LXC where binfmt_misc is read-only (so qemu-emulation isn't an option)
  • Dockerfile.android — same mtmd-header fix
  • Makefile — new build-libs-linux-arm64 target

Platforms rebuilt

Platform Build location
linux-amd64 (CPU) sandbox / Dockerfile.libs
linux-amd64-cuda sandbox / Dockerfile.libs (gcc-12)
linux-amd64-vulkan sandbox / Dockerfile.libs (gcc-12 + spirv-headers)
linux-arm64 sandbox / Dockerfile.libs-arm64 (cross-compile)
android-arm64 sandbox / Dockerfile.android (NDK r27c)
darwin-amd64 host native (make build-libs)
darwin-arm64 host cross (CMAKE_OSX_ARCHITECTURES=arm64)

Test plan

  • CGO_ENABLED=0 go build/test ./ggml/... (stub) — darwin-amd64
  • CGO_ENABLED=1 go build -tags llamacpp ./ggml/llamacpp/... — darwin-amd64
  • CGO_ENABLED=1 go build -tags whispercpp ./ggml/whispercpp/... — darwin-amd64
  • Same three on linux-amd64 (inside sandbox using golang:1.24-bookworm + gcc-12)
  • CGO link test on linux-amd64-cuda / -vulkan / linux-arm64 / android-arm64 (artifacts present and contain expected symbols; runtime link not exercised in this PR)

🤖 Generated with Claude Code

Upstream b9222 splits the legacy libcommon.a into libllama-common.a
and libllama-common-base.a; update CGO LDFLAGS across all platform
build files. Also pick up a new spirv-headers dep for Vulkan and
work around a gcc-13 internal-compiler-error on fattn-mma-f16 /
arg.cpp templates by switching CUDA + Vulkan stages to gcc-12.

Platforms rebuilt against b9222:
  - linux-amd64 (CPU, CUDA, Vulkan)
  - linux-arm64 (new; cross-compiled via Dockerfile.libs-arm64)
  - android-arm64 (NDK r27c)
  - darwin-amd64, darwin-arm64

Toolchain changes:
  - Dockerfile.libs: ARCH_SUFFIX arg on CPU stage, gcc-12 in
    CUDA/Vulkan stages, spirv-headers in Vulkan stage, copy mtmd
    headers from tools/mtmd/
  - Dockerfile.libs-arm64: new — aarch64-linux-gnu cross-compile
    (works in unprivileged LXC where binfmt_misc is read-only)
  - Dockerfile.android: copy mtmd headers from tools/mtmd/
  - Makefile: new build-libs-linux-arm64 target

Verified via stub + CGO build + tests on linux-amd64 (in sandbox)
and darwin-amd64 (native).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hsinatfootprintai hsinatfootprintai merged commit 49fdd84 into main May 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants