Skip to content

Upgrade llama.cpp from b8808 to b8831#88

Merged
bernardladenthin merged 4 commits intomasterfrom
claude/wonderful-feynman-FaKFd
Apr 17, 2026
Merged

Upgrade llama.cpp from b8808 to b8831#88
bernardladenthin merged 4 commits intomasterfrom
claude/wonderful-feynman-FaKFd

Conversation

@bernardladenthin
Copy link
Copy Markdown
Owner

@bernardladenthin bernardladenthin commented Apr 17, 2026

Upgrade llama.cpp from b8808 to b8831

Breaking changes fixed:

  • Rename CMake link target: commonllama-common (jllama and jllama_test)
  • Replace removed build_info string with llama_build_info() function in server.hpp (6 sites), jllama.cpp (1 site), utils.hpp (1 site)
  • Add #include "build-info.h" in server.hpp and utils.hpp
  • Fix Windows x86 linker failure: new ggml_graph_next_uid() uses _InterlockedIncrement64 via <intrin.h>, an MSVC intrinsic unavailable on 32-bit x86; provide an implementation in src/main/cpp/compat/ggml_x86_compat.c (wrapping Win32 InterlockedIncrement64) added to ggml-base via target_sources guarded by MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4

Documentation:

  • Update CLAUDE.md known-breaking-changes table to cover b8808→b8831 (3 new rows)
  • Update README.md badge and CLAUDE.md pinned version to b8831

https://claude.ai/code/session_01ABjsNTGnSH3WJvCGx7JbWB

claude added 4 commits April 17, 2026 16:25
Breaking changes fixed:
- Rename CMake link target: common → llama-common (jllama and jllama_test)
- Replace removed `build_info` string with `llama_build_info()` function
  in server.hpp (6 sites), jllama.cpp (1 site), utils.hpp (1 site)
- Add `#include "build-info.h"` in server.hpp and utils.hpp

https://claude.ai/code/session_01ABjsNTGnSH3WJvCGx7JbWB
… 32-bit MSVC

b8831 added ggml_graph_next_uid() in ggml.c which uses the MSVC compiler
intrinsic __InterlockedIncrement64. This intrinsic only exists on x64/ARM64;
on 32-bit x86 it causes LNK2019 at link time. Map it to the Win32 API
InterlockedIncrement64 (same signature, available on x86 via CMPXCHG8B) for
the ggml-base target when building with MSVC on a 32-bit host.

https://claude.ai/code/session_01ABjsNTGnSH3WJvCGx7JbWB
Add three new rows to the known breaking changes table:
- CMake target common → llama-common
- build_info string → llama_build_info() in build-info.h
- __InterlockedIncrement64 unavailable on Windows x86

Update range header from b8808 to b8831.

https://claude.ai/code/session_01ABjsNTGnSH3WJvCGx7JbWB
The compile-definition approach failed because <intrin.h> defines
#define __InterlockedIncrement64 _InterlockedIncrement64 after our /D
flag, so the compiler still emits an extern call to _InterlockedIncrement64
(linker symbol __InterlockedIncrement64) with no definition.

Provide the definition in a new compat TU (ggml_x86_compat.c) added to
ggml-base via target_sources, guarded by MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4.
The wrapper calls Win32 InterlockedIncrement64 (CMPXCHG8B, available on all
x86 Windows) satisfying <intrin.h>'s extern __cdecl declaration at link time.

https://claude.ai/code/session_01ABjsNTGnSH3WJvCGx7JbWB
@bernardladenthin bernardladenthin merged commit 46f233d into master Apr 17, 2026
14 checks passed
@bernardladenthin bernardladenthin deleted the claude/wonderful-feynman-FaKFd branch April 17, 2026 21:06
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