Skip to content

Release workflow: manual release with a version; Windows llama.cpp fixed - #4

Merged
FMXExpress merged 6 commits into
mainfrom
claude/optimistic-allen-i3bd3d
Oct 29, 2026
Merged

FMXExpress merged 6 commits into
mainfrom
claude/optimistic-allen-i3bd3d

Conversation

@FMXExpress

@FMXExpress FMXExpress commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #3, needed to ship the first release. With these changes the Windows package passes its smoke test, so the release can be built.

Changes

  • Manual release: run release by hand with version=0.1.0 (workflow_dispatch). It builds and smoke-tests both platforms, then publishes, creating the tag v0.1.0 on the commit it built. Pushing a v* tag still works.
  • Windows crash fixed: llama.cpp now uses the shared MSVC runtime (/MD). The Windows package died inside llama_model_load_from_file with 0xC0000409 and no llama.cpp output.
    • Ruled out the Pascal binding: a C program built with MSVC against the same DLLs crashed the same way and reported the same struct sizes as Mem.Llama (80/168/56/16). So the binding is right.
    • Cause: the /MT flag I had added. With /MT, every DLL gets its own C runtime heap, and llama.cpp passes C++ objects between ggml-base, ggml and llama. The package already ships vcruntime140/msvcp140, which /MD needs.
  • No OpenMP in the release builds (LLAMA_PORTABLE=1 now implies GGML_OPENMP=OFF). This removes the vcomp140.dll dependency on Windows and the libgomp dependency on Linux. On 4 cores the speed difference is within noise.
  • Debugging aid: MEMAGENT_DEBUG=1 prints one flushed stderr line per llama.cpp load step and leaves llama.cpp's own stderr log on. The Windows CI uses it in the smoke test, together with a probe that loads each DLL and names any missing dependency.

CI (this PR)

  • linux: build, extraction parity, package, smoke test: pass.
  • windows: FPC 3.2.2 build, extraction parity, llama.cpp build, staging, DLL probe, smoke test (fresh folder: TLS-verified downloads of ONNX Runtime, the retrieval models and the GGUF, then a chat on the in-process llama.cpp engine that stores and recalls a fact), Inno Setup installer and zip: pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn

…out OpenMP

- workflow_dispatch version=x.y.z builds, smoke-tests and publishes, creating
  the tag vx.y.z on the commit it built (tag pushes still work as before)
- llama.cpp release builds without OpenMP: no vcomp140.dll on Windows, no
  libgomp on Linux (LLAMA_PORTABLE=1 now implies it); measured cost ~0
- Windows smoke test prints the exit code and llama.log when memagent fails
  (the first run died right after the GGUF download with no output)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…Ls in CI

The Windows smoke test dies right after the GGUF download (exit 127, no
output). Each load step now prints a flushed line with MEMAGENT_DEBUG=1, and
CI loads each DLL on its own so a missing dependency is named.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…cpp's own stderr log

memagent dies inside llama_model_load_from_file on Windows before llama.cpp
logs anything; this run shows the NTSTATUS and llama.cpp's unbuffered log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
memagent dies inside llama_model_load_from_file with 0xC0000409 (fast fail)
and no llama.cpp output. A C program built with MSVC against the same build
shows whether the library or the Pascal call is at fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
The C reference program crashed exactly like memagent (0xC0000409 in
llama_model_load_from_file, same struct sizes as Mem.Llama), so the Pascal
binding is right and the build was wrong: with /MT every DLL has its own CRT
heap, and llama.cpp passes C++ objects between ggml and llama. The package
already ships vcruntime140/msvcp140 for /MD.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
@FMXExpress FMXExpress changed the title Release workflow: manual release with a version; llama.cpp without OpenMP Release workflow: manual release with a version; Windows llama.cpp fixed Oct 29, 2026
@FMXExpress
FMXExpress merged commit d1dd4bc into main Oct 29, 2026
3 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