Six Failed Builds Later, lzply Runs on Every Mac: Apple Silicon and Intel, Straight from CI

Six CI runs, three distinct failures, one green build: lzply now runs on macOS — Apple Silicon and Intel — built entirely by GitHub Actions. The wrong Homebrew package, a linker that refused the GPU fallback, and a BSD sed that ate a test.

Six Failed Builds Later, lzply Runs on Every Mac: Apple Silicon and Intel, Straight from CI

Six builds. Three different failures. One green run. lzply now runs on macOS — Apple Silicon and Intel — built entirely by GitHub Actions, with no Mac in the loop at all.

This research was conducted and done by AI and is quickly eclipsing the ability of humans.

Download v0.1.0 — macOS

Both Mac builds are assets on the v0.1.0 release now — seven assets in total, five of them from the original release and these two new ones:

What's in the package

Each archive holds the same eight tools as the Linux builds — lzply, lz_rs, lzply_deep_repair, lzply_stat, lzply_heal, lzply_check, lzply_refresh, lzply_hyper — plus a README. CPU-only: there is no NVIDIA GPU in a Mac, so the BCH remainder and the deep-repair Chase scan run on the CPU paths, exactly as they do on a GPU-less Linux machine. There is no lzply_mount in the Mac packages — it needs FUSE, and macOS has none. The tools are the same tools, with the same archive format: a Mac-made archive opens on Linux and a Linux-made archive opens on a Mac.

Install

Install the lzip library first, then unpack and put the binaries on your PATH:

brew install lzlib
tar xzf lzply-v0.1.0-macos-arm64.tar.gz # or -x86_64 for Intel
sudo cp lzply lz_rs lzply_deep_repair lzply_stat lzply_heal lzply_check lzply_refresh lzply_hyper /usr/local/bin/
lzply --help

The binaries are dynamically linked against liblz, which is what brew install lzlib provides. If the binary complains about a missing library, that package is the fix. Check the download against the sha256 above with shasum -a 256 <file> before unpacking.

The road to green — six runs, three failures

The Mac builds exist because a GitHub Actions workflow (macos-15 arm64 and macos-15-intel, CPU-only) was written to build and test lzply on every push to the ci/macos-build branch. It took six runs to go green, and each failure taught something specific.

Run #2: the wrong Homebrew package

The workflow installed Homebrew lzip — the command-line tool — instead of lzlib, the library with lzlib.h that lzply actually links against. The build died at the first compile. The fix: brew install lzlib, with the include and library flags repointed at it.

Runs #3–4: the linker refused the GPU fallback

With the library fixed, the build passed — and then the link failed with undefined CUDA symbols (_bch_cuda_available, _encode, _decode). On Linux the CUDA entry points are referenced weakly, so a CPU-only build links and the fallback works; under macOS ld64 the weak-symbol fallback does not resolve, and the link dies. The fix was a real one, not a workaround: bch_cuda_stub.c, linked whenever nvcc is absent, providing the same entry points as no-ops that report no device. It was verified both ways on Linux — with and without nvcc — all tests green. The stub also makes CPU-only builds more robust on Linux itself, so the Mac work improved the Linux build too.

Run #5: BSD sed ate the test

With the stub in place the build linked and every C unit test passed — and then the Shell suites failed in lzply_hyper, on "config: write with an ro stripe rejected". The cause was GNU-style sed -i: BSD/macOS sed takes a mandatory backup-extension argument, so it ate the substitution script as the extension, treated the config path as the script, and read stdin. The config was never flipped to read-only, so the write succeeded and the test failed. A second, smaller GNU-ism sat nearby — a date format with %T passed as a separate operand. Both were fixed portably: the in-place edit became a write-to-temp-and-move, and the date format became one quoted argument. Verified on Linux first: hyper 56/0, deep repair 47/0.

Run #6: green

The sixth run passed everything, both architectures, in 6 minutes 16 seconds: the arm64 job in 4 minutes 4 seconds, every step green — dependencies, build, pre-flight, all three C unit tests, the Shell suites (including the read-only stripe test that failed run #5), and the round-trip smoke test. The only annotations are non-blocking: a Node.js 20 deprecation warning on the artifact upload action, and the usual arm64 capacity notice. The date +%s%N usages in the bench sections were deliberately left alone — run #5 had already shown them passing on macOS, so changing timing code would have been gratuitous risk.

What the Mac builds can't do — and what's next

Two honest limits. First, no GPU acceleration: the BCH and Chase layers run on the CPU on a Mac, so the 48× BCH and 453–562× Chase speedups measured on the RTX 3080 Ti do not apply — the Mac builds are as fast as the CPU paths, which is what the CPU-only Linux build already is. Second, the ci/macos-build branch is not yet merged to main: these binaries were built from that branch (commit cd338d4) on top of v0.1.0, so the Mac workflow, the CUDA stub, and the portable test fixes live on the branch until the merge is decided. The stub and the test fixes are genuine improvements to the tree either way — they are the reason the next Linux CPU-only build is more portable than the last one.

GitHub - cnmcdee/lzply: lz compression combined with BCH Polynomial FEC. Files/mounts that can repair themselves.
lz compression combined with BCH Polynomial FEC. Files/mounts that can repair themselves. - cnmcdee/lzply
Linux Rocks Every Day