-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
GH-128469: warn when libpython was loaded from outside the build directory #128645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
867cda8
GH-128469: warn when libpython was loaded from outside the build dire…
FFY00 29db6f0
Update Modules/getpath.py
FFY00 bf40c17
Fix check
FFY00 7bb0e9f
Add test
FFY00 fe5e882
Fix test availability
FFY00 004f193
Make test availability a bit stricter
FFY00 59d2263
Merge branch 'main' into gh-128469-warning
FFY00 a8c9fa7
Fix test without --enable-dynamic
FFY00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to preemptively error out here and force the user to set up LD_LIBRARY_PATH or a similar mechanism?
The other approach (rpath) was rejected for requiring multiple link jobs but would have enforced the correct library. Making it an error to use the wrong library feels a bit closer in spirit to that. And I'm not sure there's a valid use case for people building a worktree python but loading the wrong library, except when messing up -- and the consequences could be strange forms of crashing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a warning is enough for now. I think erroring out may possibly be a good next step, but I want to see how this impacts the development workflow for other folks before turning it into a hard error.