-
-
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
Conversation
…d directory Signed-off-by: Filipe Laíns <lains@riseup.net
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Signed-off-by: Filipe Laíns <lains@riseup.net
Signed-off-by: Filipe Laíns <lains@riseup.net
msg = f'The runtime library has been loaded from outside the build directory ({library})!' | ||
if os_name == 'posix': | ||
msg += ' Consider setting LD_LIBRARY_PATH=. to force it to be loaded from the build directory.' | ||
warn(msg) |
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.
Signed-off-by: Filipe Laíns <lains@riseup.net>
…the build directory (python#128645)" This reverts commit 29b3ce8.
|
…d directory (python#128645) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…the build directory (python#128645)" (python#129506)
libpython
being loaded #128469