Skip to content

Make Linux runtime bundles resolve sibling libraries - #52

Merged
leehack merged 3 commits into
mainfrom
fix/linux-runtime-search-path
Sep 17, 2026
Merged

leehack merged 3 commits into
mainfrom
fix/linux-runtime-search-path

Conversation

@leehack

@leehack leehack commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Problem and fix

Published Linux LiteRT-LM runtime loading can fail with libwebgpu_dawn.so not found, including CPU requests that preload companions. The sampler carries Bazel build-tree RUNPATHs and Dawn has no SONAME, so loading absolute companion paths does not reliably resolve dependencies.

Stage the complete Linux prebuilt inventory, including dlopen-only accelerators, and normalize the packaged Dawn SONAME and all Linux RUNPATHs to sibling lookup via $ORIGIN. Perform this before model smoke hashes are recorded. Install patchelf in Linux build and qualification jobs. Source files and non-Linux packaging are unchanged.

Validation

  • 181 tooling tests passed on macOS (one real Linux test skipped there).
  • Real Linux loader regression passed in a disposable Linux container, without LD_LIBRARY_PATH/LD_PRELOAD; missing metadata reproduces failure, normalization restores loading, repeated normalization remains valid.
  • Actual published v0.17.0-4 sampler reproduced missing Dawn before normalization and loaded successfully after normalization in Linux x64 container. This is loader evidence, not GPU inference.
  • Added production staging/package-overlay regression for dlopen-only libraries following independent review feedback.
  • Published unmodified v0.17.0-4 Qwen3/Gemma4 CPU/GPU inference passed on NVIDIA L4 with LD_LIBRARY_PATH; this fix still requires rebuilt artifact qualification without that workaround.
  • All 17 final-head checks passed, including nine platform builds, candidate verification, and Linux/Windows/macOS Qwen inference. Independent blocking review accepted head cd70b1c6d75b380e910ff45e6bbc3b63695b97d7 against current main 8174e0e868d3c40999cab23a7078ca36eab6190d: no blocking findings, zero unresolved threads, zero known PR-caused P1 regressions. No release or downstream pin changes in this PR.

Related to #47 and leehack/llamadart#510. Do not close desktop GPU qualification until Windows and rebuilt-artifact validation complete.

The host ELF identity is preserved: broad SONAME rewriting reproduced a profiling shutdown crash, while the narrowed correction passed a same-input load/shutdown control. Read-only staged Bazel files are temporarily made owner-writable and their permissions restored in finally.

@leehack
leehack marked this pull request as ready for review September 17, 2026 15:10
@leehack
leehack merged commit 3eb4079 into main Sep 17, 2026
17 checks passed
@leehack
leehack deleted the fix/linux-runtime-search-path branch September 17, 2026 15:10
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.

1 participant