Skip to content

Fix the macOS app not finding librtcheck.dylib, and smoke test the release zips - #197

Merged
drowaudio merged 2 commits into
v2from
fix/macos-rtcheck-rpath
Oct 14, 2026
Merged

drowaudio merged 2 commits into
v2from
fix/macos-rtcheck-rpath

Conversation

@drowaudio

@drowaudio drowaudio commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The published macOS binaries for v2.0.0-beta1 and v2.0.0-beta2 fail to start on any machine but the CI runner that built them:

dyld: Library not loaded: @rpath/librtcheck.dylib
  Reason: tried: '/Users/runner/work/pluginval/pluginval/Builds/_deps/rtcheck-build/src/librtcheck.dylib' (no such file) ...

The app bundles Contents/Libraries/librtcheck.dylib, but the binary's only rpath was the build tree's, so it never looked in the bundle. Present since rtcheck was added (#156). CI didn't catch it because every step that runs pluginval does so on the build machine, where the build-tree path exists.

What

  • CMakeLists.txt: on Apple, when rtcheck is enabled, add @executable_path/../Libraries to pluginval's BUILD_RPATH. It is searched first, before the build-tree rpath CMake adds.
  • build.yaml: new "Smoke test the zip" step on all three platforms. It extracts the zip that is about to be uploaded into $RUNNER_TEMP/smoke and runs pluginval --version from there, so a package that only works on the build machine fails CI before it is released. On macOS it first moves the build's _deps/rtcheck-build directory aside, because the binary also has that path as an rpath and it exists on the runner; with it hidden, only the dylib bundled in the app can be found, as on a user's machine.
  • CHANGELIST.md: noted the fix.

Testing (macOS, locally)

  • Added @executable_path/../Libraries by hand to a copy of the published v2.0.0-beta2 binary (and re-signed it ad hoc): it then starts and prints its version.

  • Built a Release app from this branch: its rpaths are @executable_path/../Libraries then the build tree. With the build-tree rpath deleted from a copy (simulating another machine), it starts and run-tests gives the same result as the unmodified build. The one failure, AllocatorInterceptorTests / Ensure array allocations are caught, is pre-existing and also fails on the unmodified binary.

  • Ran the smoke step's logic locally: the Release build from this branch passes; an older build without the fix fails with the same Library not loaded: @rpath/librtcheck.dylib error (exit 134). So the step would have caught this bug.

After merging

Tag v2.0.0-beta3 and point the actions at it (#196 currently bumps them to beta2).

@drowaudio
drowaudio merged commit 37d6a37 into v2 Oct 14, 2026
13 checks passed
@drowaudio
drowaudio deleted the fix/macos-rtcheck-rpath branch October 14, 2026 16:30
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