Re-land: keep build-machine paths out of the Linux RUNPATH (#53 never reached main) - #55
Merged
Conversation
CMakeLists already asked for $ORIGIN, but CMake prepends it to the automatic build-tree RPATH rather than replacing it: because the target links libCr_Core and the OpenCV libs by absolute path, their source-tree directories were appended and shipped inside the binary. Those entries were pure redundancy — POST_BUILD already copies every runtime lib next to the executable, so $ORIGIN alone resolves everything. Their only real effect was to let the loader fall back to the build machine's checkout, which is how the missing OpenCV in the .mcpb (#33) stayed invisible: the bundle tested fine on the machine that built it and failed with exit 127 everywhere else. BUILD_WITH_INSTALL_RPATH makes the build-tree link use INSTALL_RPATH directly and skips the automatic computation, leaving RUNPATH as just $ORIGIN. macOS is left alone — it likely has the same leak, but there is no hardware here to verify it and the CrAdapter layout there is delicate. Fixes #52 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-lands the change from #53, which is marked MERGED but whose change never reached
main.What happened
#53 was opened with
fix/linux-opencv-mcpb-bundling(the #51 branch) as its base rather thanmain— a stacked PR. I merged #51 intomainfirst, then merged #53, which sent it into a branch that had already been merged and was no longer flowing anywhere. GitHub correctly reports #53 as MERGED;mainnever received the commit.My error: I checked
mergeable,mergeStateStatusand CI on all three PRs before merging, but notbaseRefName. Merging #53 first, or retargeting it tomain, would have avoided this.This PR
git cherry-pick 78654eeontomain— the original commit by @takusaito-ctrl, unmodified, authorship preserved. No content changes from what was reviewed in #53.Verified
api/server/CMakeLists.txtnow carriesBUILD_WITH_INSTALL_RPATH TRUEon theelseif(UNIX)branch, and the macOS build is unaffected (the change is inside the non-Apple UNIX branch;if(APPLE)is untouched).Closes #52.
🤖 Generated with Claude Code