Skip to content

Commit aed0c90

Browse files
committed
fix(ci): macOS 13.3 floor for x64, drop idle BLAS on arm64, verify binaries
The 0.0.7 minos-12.0 build weak-linked cblas_sgemm$NEWLAPACK$ILP64 (from the ggml-blas backend, default-on for Apple), so on macOS 12.0-13.2 the x64 server loads and then crashes at the first transcription instead of failing cleanly. - x64: deployment target 13.3, matching upstream llama.cpp/whisper.cpp release binaries; keeps Accelerate GEMM for Intel and gives sub-13.3 a clean dyld error. - arm64: keep 12.0 and disable ggml-blas (Metal runs the graph; BLAS is idle), removing the NEWLAPACK import so Apple Silicon on Monterey keeps working. - Verify steps assert minos and reject NEWLAPACK imports below 13.3 so future vendored bumps cannot silently regress this. See OpenWhispr/openwhispr#764.
1 parent b99c678 commit aed0c90

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

.github/workflows/build-binaries.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ jobs:
3131
key: macos-arm64
3232

3333
- name: Build whisper.cpp
34-
# Same Accelerate $NEWLAPACK$ILP64 issue as the x64 job: the arm64
35-
# binary links Accelerate too (Metal does not replace BLAS), so without
36-
# an explicit target it also fails on macOS < 13.3. See OpenWhispr/openwhispr#764.
34+
# GGML_BLAS=OFF: ggml-blas imports $NEWLAPACK$ILP64 Accelerate symbols that
35+
# don't exist before macOS 13.3, and Metal runs the graph on arm64 so BLAS
36+
# is idle. Keeps Monterey (12.x) working. See OpenWhispr/openwhispr#764.
3737
run: |
3838
cmake -B build \
3939
-DCMAKE_BUILD_TYPE=Release \
4040
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
4141
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
4242
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
43+
-DGGML_BLAS=OFF \
4344
-DWHISPER_METAL=ON \
4445
-DGGML_METAL=ON \
4546
-DBUILD_SHARED_LIBS=OFF
@@ -56,6 +57,13 @@ jobs:
5657
zip whisper-cpp-darwin-arm64.zip whisper-cpp-darwin-arm64
5758
zip whisper-server-darwin-arm64.zip whisper-server-darwin-arm64
5859
60+
- name: Verify deployment target and symbols
61+
run: |
62+
for bin in dist/whisper-cpp-darwin-arm64 dist/whisper-server-darwin-arm64; do
63+
otool -l "$bin" | grep -A2 LC_BUILD_VERSION | grep -q 'minos 12.0' || { echo "$bin: expected minos 12.0"; exit 1; }
64+
if nm -u "$bin" | grep -q 'NEWLAPACK'; then echo "$bin: imports \$NEWLAPACK\$ILP64 but targets macOS < 13.3"; exit 1; fi
65+
done
66+
5967
- name: Upload whisper-cli artifact
6068
uses: actions/upload-artifact@v4
6169
with:
@@ -80,18 +88,16 @@ jobs:
8088
key: macos-x64
8189

8290
- name: Build whisper.cpp for x64
83-
# Without CMAKE_OSX_DEPLOYMENT_TARGET, CMake picks the runner's SDK
84-
# default (macOS 14 on the macos-14 runner). The linker then writes
85-
# references to the $NEWLAPACK$ILP64 Accelerate symbols introduced
86-
# in macOS 13.3, breaking the binary on Monterey 12.x.
87-
# See OpenWhispr/openwhispr#764.
91+
# 13.3 floor matches upstream llama.cpp/whisper.cpp releases: ggml-blas
92+
# (Accelerate GEMM, worth keeping on CPU-only x64) imports $NEWLAPACK$ILP64
93+
# symbols that only exist on macOS >= 13.3. See OpenWhispr/openwhispr#764.
8894
run: |
8995
cmake -B build \
9096
-DCMAKE_BUILD_TYPE=Release \
9197
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
9298
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
9399
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
94-
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
100+
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3 \
95101
-DWHISPER_METAL=OFF \
96102
-DGGML_METAL=OFF \
97103
-DGGML_NATIVE=OFF \
@@ -109,6 +115,12 @@ jobs:
109115
zip whisper-cpp-darwin-x64.zip whisper-cpp-darwin-x64
110116
zip whisper-server-darwin-x64.zip whisper-server-darwin-x64
111117
118+
- name: Verify deployment target
119+
run: |
120+
for bin in dist/whisper-cpp-darwin-x64 dist/whisper-server-darwin-x64; do
121+
otool -l "$bin" | grep -A2 LC_BUILD_VERSION | grep -q 'minos 13.3' || { echo "$bin: expected minos 13.3"; exit 1; }
122+
done
123+
112124
- name: Upload whisper-cli artifact
113125
uses: actions/upload-artifact@v4
114126
with:
@@ -667,7 +679,7 @@ jobs:
667679
- **macOS ARM64**: Metal GPU acceleration (M1/M2/M3/M4)
668680
- **Windows x64**: NVIDIA CUDA build (bundled DLLs), Vulkan build (any Vulkan-capable GPU), and CPU build
669681
- **Linux x64**: NVIDIA CUDA build (requires system CUDA), Vulkan build (any Vulkan-capable GPU), and CPU build
670-
- **macOS x64**: CPU only (Intel Macs)
682+
- **macOS x64**: CPU only (Intel Macs, requires macOS 13.3+)
671683
672684
## whisper-cli binaries
673685
- `whisper-cpp-darwin-arm64.zip` - macOS Apple Silicon with Metal

0 commit comments

Comments
 (0)