Skip to content

fix(backends): whisper darwin run.sh loads whichever fallback lib exists (.so/.dylib)#10553

Merged
mudler merged 1 commit into
masterfrom
fix/whisper-darwin-lib-ext
Jun 27, 2026
Merged

fix(backends): whisper darwin run.sh loads whichever fallback lib exists (.so/.dylib)#10553
mudler merged 1 commit into
masterfrom
fix/whisper-darwin-lib-ext

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Summary

whisper's darwin build/image is correct (after #10541), but the backend still panics at load on macOS:

panic: dlopen(.../metal-whisper/libgowhisper-fallback.dylib): … no such file
  whisper/main.go:35

Cause: run.sh's Darwin branch hardcodes WHISPER_LIBRARY=$CURDIR/libgowhisper-fallback.dylib, but the cmake build emits a Mach-O named libgowhisper-fallback.so on darwin. The Go loader dlopens the non-existent .dylib → panic → backend exits → grpc service not ready. This breaks e.g. the realtime silero-vad-ggml VAD (which runs on whisper.cpp) on macOS.

Fix

Darwin branch picks whichever fallback lib exists (.dylib else .so), so it's robust regardless of how the build names it.

Verified against the real darwin whisper package (only libgowhisper-fallback.so present) — the binary now resolves it. bash -n clean; Linux path untouched.

🤖 Generated with Claude Code

The macOS branch hardcoded WHISPER_LIBRARY=$CURDIR/libgowhisper-fallback.dylib,
but the cmake build emits a Mach-O named libgowhisper-fallback.so on darwin, so
the Go loader panicked at runtime ("dlopen ...dylib: no such file") and the
backend exited ("grpc service not ready") — breaking e.g. the silero-vad-ggml
VAD on darwin. Pick whichever of .dylib/.so is present so it is robust to the
build's naming either way.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit d11b202 into master Jun 27, 2026
69 checks passed
@mudler
mudler deleted the fix/whisper-darwin-lib-ext branch June 27, 2026 12:07
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.

2 participants