Skip to content

Commit 3f6e493

Browse files
committed
ci(darwin): install ccache's runtime dylib deps (blake3, hiredis, xxhash, zstd)
Symptom (run 25634195866, job 75244019809): the Configure ccache step on the Darwin llama-cpp build aborted with: dyld[5647]: Library not loaded: /opt/homebrew/opt/blake3/lib/libblake3.0.dylib Referenced from: /opt/homebrew/Cellar/ccache/4.13.5/bin/ccache Abort trap: 6 The previous Darwin fix (acc5588) addressed missing /opt/homebrew/bin symlinks after a brew cache restore by force-linking. This is a different layer: ccache's Cellar dir IS restored from cache and IS linked, but ccache 4.13 dynamically links against blake3 / hiredis / xxhash / zstd at runtime, and those dependencies are NOT in the restored Cellar paths. brew install ccache sees the ccache Cellar present and skips the install — including skipping installation of those transitive deps. Two-part fix: - Add /opt/homebrew/Cellar/{blake3,hiredis,xxhash,zstd} to the brew cache restore/save paths so future cache-hit runs restore them. - Explicitly install + link them in the Dependencies step so even a fresh runner (cache miss on a new key) gets them, and brew has them on hand for ccache to dlopen. Caught by run 25634195866. Pre-existing condition on Darwin runners; surfaced because Darwin builds run more often after the llama-cpp- darwin consolidation in mudler#9731. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 35f6db8 commit 3f6e493

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/backend_build_darwin.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,29 @@ jobs:
9393
/opt/homebrew/Cellar/libomp
9494
/opt/homebrew/Cellar/llvm
9595
/opt/homebrew/Cellar/ccache
96+
/opt/homebrew/Cellar/blake3
97+
/opt/homebrew/Cellar/hiredis
98+
/opt/homebrew/Cellar/xxhash
99+
/opt/homebrew/Cellar/zstd
96100
key: brew-${{ runner.os }}-${{ runner.arch }}-v1-${{ hashFiles('.github/workflows/backend_build_darwin.yml') }}
97101

98102
- name: Dependencies
99103
run: |
100104
# ccache is always installed (used by the llama-cpp variant build) so
101105
# the brew cache content stays stable across every backend in the
102106
# matrix — they all share one cache key.
103-
brew install protobuf grpc make protoc-gen-go protoc-gen-go-grpc libomp llvm ccache
107+
# blake3, hiredis, xxhash, zstd are ccache's runtime dylib deps.
108+
# Without explicitly installing them, a brew cache-hit run restores
109+
# ccache's Cellar dir but skips installing those transitive deps,
110+
# and ccache fails at runtime with `dyld: Library not loaded:
111+
# libblake3.0.dylib`.
112+
brew install protobuf grpc make protoc-gen-go protoc-gen-go-grpc libomp llvm ccache blake3 hiredis xxhash zstd
104113
# The brew cache restores the Cellar dirs but NOT the bin symlinks
105114
# at /opt/homebrew/bin/*. brew install above sees the Cellar present
106115
# and decides "already installed" without re-linking, so on a cache-
107116
# hit run the formulas aren't on PATH. Force-link them; --overwrite
108117
# tolerates pre-existing symlinks from earlier installs.
109-
brew link --overwrite protobuf grpc make protoc-gen-go protoc-gen-go-grpc libomp llvm ccache 2>/dev/null || true
118+
brew link --overwrite protobuf grpc make protoc-gen-go protoc-gen-go-grpc libomp llvm ccache blake3 hiredis xxhash zstd 2>/dev/null || true
110119
111120
- name: Save Homebrew cache
112121
if: github.event_name != 'pull_request' && steps.brew-cache.outputs.cache-hit != 'true'
@@ -121,6 +130,10 @@ jobs:
121130
/opt/homebrew/Cellar/libomp
122131
/opt/homebrew/Cellar/llvm
123132
/opt/homebrew/Cellar/ccache
133+
/opt/homebrew/Cellar/blake3
134+
/opt/homebrew/Cellar/hiredis
135+
/opt/homebrew/Cellar/xxhash
136+
/opt/homebrew/Cellar/zstd
124137
key: brew-${{ runner.os }}-${{ runner.arch }}-v1-${{ hashFiles('.github/workflows/backend_build_darwin.yml') }}
125138

126139
# ---- ccache for llama.cpp CMake builds ----

0 commit comments

Comments
 (0)