Skip to content

release: prebuilt packages for Linux, Windows, macOS and Android - #10

Merged
hans00 merged 5 commits into
mainfrom
release-prebuilt
Nov 23, 2026
Merged

hans00 merged 5 commits into
mainfrom
release-prebuilt

Conversation

@hans00

@hans00 hans00 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Prebuilt codec-cli / tts-cli / tts-server + libraries, built on a v* tag and attached to a draft release (publish by hand).

Package Runner
linux-x64-cpu ubuntu-22.04 (glibc 2.35)
linux-x64-vulkan ubuntu-22.04 + LunarG SDK
linux-arm64-cpu ubuntu-22.04-arm
macos-arm64-metal macos-15
android-arm64-vulkan ubuntu-24.04, NDK cross build
windows-x64-cpu windows-2022, clang-cl (zip)
windows-x64-vulkan windows-2022, clang-cl + LunarG SDK (zip)

Budget: standard GitHub-hosted runners only (free on a public repo). The workflow runs on a tag, a manual dispatch, or a PR that touches the recipe, never on a plain push. No CUDA / ROCm / SYCL packages.

CPU baseline: both ggml copies build for x86-64 AVX2 / arm64 armv8.2-a+fp16+dotprod, with OpenMP off. The llama.cpp backbone has to stay GGML_BACKEND_DL=OFF for its isolation, so llama.cpp-style runtime CPU variants could only cover half of the binary.

Build fixes found on the way:

  • The backbone ExternalProject now builds after libcodec. Its nested build uses every core whatever the outer -j (Ninja), and side by side with the outer build it was OOM-killed in a 6 GB container. One after the other, peak memory is 2.6 GB on 4 cores.
  • SPIRV-Headers_DIR is forwarded to the backbone. Android tools get a $ORIGIN RUNPATH, which CMake's Android platform otherwise drops.
  • README: a bare cmake --build build -j starts every compile at once, the likely cause of the 16 GB + 32 GB swap exhaustion in What about prebuilt tts-cli? #4. The docs now give a number.

Windows: clang-cl against the MSVC runtime (/MD), with the VC++ runtime DLLs bundled in bin/ next to every other DLL (no rpath on Windows). The backbone DLL needs no symbol hiding there, because PE binds each import to a named DLL. llama.cpp built static has no dllexport, so a .def of the llama_* / common_sampler symbols is generated from its objects and linked with /WHOLEARCHIVE. Also: codec.dll exports all symbols, the static lib becomes codec_static.lib, _USE_MATH_DEFINES is defined, and tts-server no longer calls setvbuf(_IOLBF, 0), which the MSVC CRT aborts on.

Tested locally:

  • Windows cross build (clang-cl + MSVC SDK via xwin) run under wine: Soprano tts-cli synthesize CER 0.03, tts-server /v1/audio/speech CER 0.
  • linux-x64-cpu built in ubuntu:22.04 (GCC 11) with 4 CPUs and 14 GB. The install tree passes the smoke script in archlinux, ubuntu:22.04 and debian:12, and a full Soprano tts-cli synthesize in Arch gives Whisper CER 0.
  • android-arm64-vulkan cross build, run from the package layout on a Pixel 7 Pro: CPU CER 0.03, Vulkan (Mali-G710) CER 0.
  • macOS, linux-arm64, linux-x64-vulkan and windows-x64-vulkan are verified only by this PR's CI run.

Closes #4

🤖 Generated with Claude Code

hans00 and others added 4 commits November 20, 2026 14:56
A v* tag builds codec-cli / tts-cli / tts-server + libraries on standard
GitHub-hosted runners (free on a public repo) and drafts a release:
linux-x64 cpu + vulkan, linux-arm64, macos-arm64 metal, android-arm64
vulkan.  Each package is smoke-tested from its install tree in clean
containers (Arch, Ubuntu 22.04, Debian 12).  No CUDA / ROCm / SYCL
packages; Windows needs a port of the backbone isolation first.

- Both ggml copies build for one fixed CPU baseline (x86-64 AVX2,
  arm64 armv8.2-a+fp16+dotprod), OpenMP off: no libgomp at runtime.
- The llama.cpp backbone builds after libcodec, not beside it: its nested
  build runs its own parallelism (Ninja: every core), so side by side the
  two compile loads add up (OOM-killed in a 6 GB container; one after the
  other peaks at 2.6 GB on 4 cores).
- SPIRV-Headers_DIR is forwarded to the backbone (Android Vulkan cross build).
- Android tools get a $ORIGIN DT_RUNPATH; CMake's Android platform drops it.
- codec-cli is installed; tts-cli / tts-server --version.
- README: prebuilt packages, and a numbered -j (a bare -j exhausts memory).

Closes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds with clang-cl against the MSVC runtime.  The backbone DLL needs no
symbol hiding on Windows (a PE image binds each import to a named DLL, so
the two ggml copies cannot clash); its export list is a .def file of the
llama_* and common_sampler symbols, taken from the llama / common objects
with /WHOLEARCHIVE, as the version script does on ELF.

- codec.dll exports every symbol (no export macros in the headers); the
  static library becomes codec_static.lib so codec.lib is the import lib,
  which is now installed.
- The backbone DLL installs into bin/ next to the tools: no rpath.
- _USE_MATH_DEFINES on MSVC for M_PI.
- tts-server: the MSVC CRT aborts on setvbuf(_IOLBF, size 0) and has no
  line buffering; stdout is unbuffered there.
- The packages are zips with the VC++ runtime DLLs app-local in bin/.

Cross-built locally (clang-cl + xwin SDK) and run under wine: Soprano
`tts-cli synthesize` CER 0.03, tts-server /v1/audio/speech CER 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he library

Ninja refuses a file named twice as an output (every non-Windows build).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hans00 hans00 changed the title release: prebuilt packages for Linux, macOS and Android release: prebuilt packages for Linux, Windows, macOS and Android Nov 20, 2026
- The backbone's ggml-vulkan.cpp took ~14 minutes at -O3 with NDK clang:
  LLVM's register coalescer spent 822 of 880 s on it.  At -O2 it takes
  58 s.  It is host-side dispatch code; the GPU kernels are unaffected.
  This was nearly the whole Android job (backbone build 13.5 of ~14 min).
- ccache in the Release, CI and E2E builds (actions/cache).  Both ggml copies
  already compile through it once it is installed (GGML_CCACHE).
- E2E builds only codec-cli and libcodec, which the codec smokes use,
  without the llama.cpp backbone.  CI builds with Ninja.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hans00
hans00 merged commit c82abc2 into main Nov 23, 2026
28 checks passed
@hans00
hans00 deleted the release-prebuilt branch November 23, 2026 02:30
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.

What about prebuilt tts-cli?

1 participant