Repository navigation
Conversation
|
Closing this in favour of #27, but not because anything is wrong with the work here — the analysis was right and the solution you chose is sound. Recording why, so it is not lost. What was correct. The root-cause analysis holds: libpiper v1.8.0 also builds the Why it is still not merged. Microsoft does not publish a musl build of ONNX Runtime. The What is carried over. #27 keeps the parts of this PR that are needed and verified:
What #27 does not carry over is the Thanks, this was the right analysis to hand over. |
…l assets (#26) (#27) ## What changed Removes musl (Alpine) support entirely: the `build-piper-musl` job in `ci.yml` and `release.yml` (with its entries in the `ci-ok` and `publish` `needs:` lists), the two musl release assets, the `alpine` container prose in `docs/release-workflow.md`, the README instructions to install ONNX Runtime from the Alpine package, and the musl job in `AGENTS.md`. The README now states the supported platform (Linux x86_64 with glibc) and `CHANGELOG.md` gets a `Removed` entry with the reasons and what an Alpine user should do instead. **Why:** libpiper links ONNX Runtime and Microsoft publishes no musl build of it, so there is nothing on Alpine to link libpiper against except a package from Alpine's own repository. The musl archives we shipped never worked anyway: `libonnxruntime-linux-musl-x86_64.tar.gz` up to v0.2.0 holds a glibc library (`GLIBC_2.2.5` to `GLIBC_2.27`), which the musl loader cannot resolve. Carried over from #22, which solved most of #21 with the rejected *keep-musl* approach: the `piper1-gpl` submodule bump v1.4.1 -> v1.8.0 and the `espeak-ng-data` -> `share/espeak-ng-data` install path fix (the `test-integration` failure on Dependabot PR #3). The Alpine-package part of #22 is not carried over. Licensing is untouched: MIT for the PHP code, GPL-3.0 for libpiper and the espeak-ng data. Closes #26 ## How it was tested - `bin/lint.sh` (composer validate/audit, php-cs-fixer, PHPStan, Rector, shellcheck) and `vendor/bin/phpunit --testsuite unit` (14 tests) in the worktree. - The FFI cdef in `src/PiperTTS.php` was checked against the new `piper1-gpl/libpiper/include/piper.h`: `piper_audio_chunk` and `piper_synthesize_options` keep their field order and types, `piper_create` is unchanged, and the new functions (`piper_create_with_options`, `piper_version`) are additive, so the public PHP API does not change. - End to end on glibc on a Linux x86_64 host (Ubuntu, cmake 4.2.3, PHP 8.5.4): `make build-libs` (libpiper v1.8.0 + ONNX Runtime 1.22.0, `libs/espeak-ng-data` from the new `share/` path), `make test-model`, unit suite 14/14 and `vendor/bin/phpunit --group integration` 10/10. - Both workflow files parse as YAML and every name in every `needs:` exists as a job; `ci-ok` lists every other job in `ci.yml`. No test reads `.github/workflows/`, so no test asserted the old job list. ## Checklist - [x] Tests added or updated, and all checks pass - [x] `CHANGELOG.md` updated under `[Unreleased]` - [x] Documentation updated - [x] Everything is written in English - [x] The PR title is a Conventional Commit (`feat: ...`, `fix: ...`)
Closes #21. Replaces Dependabot PR #3 (to be closed after merge).
piper.hchanges are additive, so the FFI cdef and the public PHP API are unchanged.share/espeak-ng-data(this was thetest-integrationfailure on chore(deps): bump piper1-gpl from077c783to639388b#3). Makefile, CI and release workflow use the new path.piperexecutable too, so the glibc-only prebuilt onnxruntime no longer links on Alpine. CI and release now usealpine:3.23with theonnxruntime-devpackage.libonnxruntime-linux-musl-x86_64.tar.gz. The old file held the glibc build of ONNX Runtime 1.22.0 (checked on the v0.2.0 release), so it never worked on musl. Alpine users runapk add onnxruntime-dev(README, CHANGELOG, docs updated). We do not redistribute Alpine's onnxruntime and its ~50 dependencies, which avoids third-party license duties.Verified by hand (Docker on a Linux host, x86_64): ubuntu 24.04 + PHP 8.3 with
make build-libs, and alpine 3.23 + PHP 8.4 + onnxruntime-dev with the musl libpiper.so: 10/10 integration tests each. The CI musl job only builds.