Skip to content

Fix whisper.cpp on Linux failing to start with missing libwhisper.so.1 - #13689

Merged
niksedk merged 3 commits into
mainfrom
claude/subtitleedit-issue-13680-995eac
Aug 16, 2026
Merged

Fix whisper.cpp on Linux failing to start with missing libwhisper.so.1#13689
niksedk merged 3 commits into
mainfrom
claude/subtitleedit-issue-13680-995eac

Conversation

@niksedk

@niksedk niksedk commented Aug 16, 2026

Copy link
Copy Markdown
Member

Fixes #13680.

whisper.cpp speech to text has been dead on Linux since whispercpp-184 (2026-03-25):

whisper-cli: error while loading shared libraries: libwhisper.so.1:
cannot open shared object file: No such file or directory

Root cause

The packaging bug was in support-files, not here. Checked against the published archives:

whisper-cli DT_NEEDED what whisper-vulkan-linux64.zip contained
libwhisper.so.1 absent — the staging glob was libggml*.so, which never matched it
libggml.so.0 present as libggml.so (its SONAME says libggml.so.0)
libggml-base.so.0 present as libggml-base.so

cp dereferenced cmake's libggml.so -> libggml.so.0 -> libggml.so.0.9.4 symlink chain, so each library landed under its unversioned alias while the loader looks it up by SONAME. On top of that the binaries carried RUNPATH=/home/runner/work/support-files/support-files/build/bin.

v1.8.3 and earlier shipped a statically linked whisper-cli, which is why nothing broke until the build moved to BUILD_SHARED_LIBS=ON. whispercpp-184, -185, -186 and -191 are all affected. Windows and macOS were never affected — macOS ships a self-contained universal binary, and Windows resolves DLLs from the executable's directory.

Fixed in SubtitleEdit/support-files#8 and released as whispercpp-191-r2 (same whisper.cpp v1.9.1, repackaged). Verified against the published archives — every filename matches its SONAME, every RUNPATH is $ORIGIN, and all 20 edges of the bundled dependency closure resolve.

Changes here

  • WhisperDownloadService — the two Linux URLs point at whispercpp-191-r2. Windows and macOS stay on whispercpp-191.
  • DownloadHashManager — hashes for the rebuilt archives. Superseded hashes stay listed so an existing install is still identified by version, annotated with which ones ship the broken library set.
  • SpeechToTextViewModel — put the engine folder on LD_LIBRARY_PATH / DYLD_LIBRARY_PATH when launching. WorkingDirectory was already the engine folder, but the loader does not search the working directory. The Windows branch already appends the engine folder to Path; this is the missing Linux/macOS counterpart, and belt-and-braces on top of the $ORIGIN RPATH.
  • MissingSharedLibrary — new IsBundledWithEngine. The dialog told this user to "Install it with your package manager", which is a dead end for libwhisper — no distro packages it. For engine-owned libraries the message now says the install is incomplete and to re-download the engine.

Testing

Full suite green (2828 passed). New cases cover the exact stderr line from the issue and both sides of the bundled/system library split.

Recovery for existing broken installs

A user sitting on a broken engine folder has the whispercpp-191 hash in their .installed.sha256 sidecar. That hash is still listed, just no longer first, so GetStatus returns UpdateAvailable — which means the engine dot goes amber and CheckWhisperCppForUpdateAsync prompts them to update on opening the speech-to-text window. No manual cleanup needed.

An install with no sidecar (from an older SE build) used to fall back to nothing on Linux, because the executable-hash fallback was Windows + Mac only — so those users got Unknown, no amber dot and no prompt. That is now closed: ResolveWhisperCppExecutableKey resolves both Linux backends, with whisper-cli hashes for v1.8.4 through v1.9.1-r2 extracted from the published archives.

The original restriction was justified by the Vulkan and CUDA archives shipping an identical whisper-cli. That was true of v1.8.4 (same hash, both archives — it is listed under both keys on purpose) but stopped being true in v1.8.5, and it would not have blocked the lookup anyway: the key comes from the engine choice being asked about, and each backend has its own install folder.

Still sidecar-only: the engine dot in the main window, which reads GetSidecarStatus and is deliberately cheap — it does not hash a 1 MB executable on every combo render. The update prompt is the path that reaches users without a sidecar.

🤖 Generated with Claude Code

niksedk and others added 3 commits August 16, 2026 07:01
The Linux whisper.cpp archives shipped whisper-cli without the
libwhisper.so.1 and libggml.so.0 it links against, so speech to text died
immediately on every Linux install since whispercpp-184:

    whisper-cli: error while loading shared libraries: libwhisper.so.1:
    cannot open shared object file: No such file or directory

The archives are rebuilt in support-files as whispercpp-191-r2 (same
whisper.cpp v1.9.1, repackaged with the libraries under their SONAMEs and
$ORIGIN RPATHs), so point the two Linux download URLs at the new tag.
Windows and macOS were unaffected and stay on whispercpp-191 - macOS ships
a self-contained universal binary, and Windows resolves DLLs from the
executable's directory.

Also harden the launch path: on Linux/macOS put the engine folder on
LD_LIBRARY_PATH / DYLD_LIBRARY_PATH. Setting WorkingDirectory was not
enough, because the loader does not search the working directory - the
Windows branch already appends the engine folder to Path, and this is the
missing counterpart.

Finally, stop telling users to install a bundled library with their package
manager. No distro packages libwhisper or libggml, so the advice was a dead
end; for engine-owned libraries the message now says the install is
incomplete and to re-download the engine.

Fixes #13680

Co-Authored-By: Claude Opus 5 <[email protected]>
SHA-256 of the rebuilt whisper-vulkan-linux64.zip and whisper-cuda-linux64.zip
that WhisperDownloadService now points at. The superseded hashes stay listed so
an existing install is still identified by version rather than reported as
unknown, annotated with which ones ship the broken library set.

Co-Authored-By: Claude Opus 5 <[email protected]>
Without a .installed.sha256 sidecar - installs from older SE builds - the
Linux whisper.cpp engines fell back to nothing and reported Unknown, so the
engine dot never went amber and the update prompt never fired. That matters
now: every Linux build from v1.8.4 to v1.9.1 is broken (#13680), and the
prompt is how an affected user learns to re-download.

The fallback was Windows + Mac only because the v1.8.4 Vulkan and CUDA
archives shipped a byte-identical whisper-cli. That stopped being true in
v1.8.5, and it would not have blocked the lookup anyway - the key comes
from the engine choice being asked about, and each backend has its own
install folder, so a hash shared by both releases is simply listed twice.

whisper-cli hashes for both Linux backends across v1.8.4 to v1.9.1-r2,
extracted from the published archives.

Co-Authored-By: Claude Opus 5 <[email protected]>
@niksedk
niksedk merged commit 41e7486 into main Aug 16, 2026
1 check passed
@niksedk
niksedk deleted the claude/subtitleedit-issue-13680-995eac branch August 16, 2026 06:29
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.

[Bug] Linux: whisper.cpp fails with "error while loading shared libraries: libwhisper.so.1: cannot open shared object file"

1 participant