Repository navigation
Improve missing linked library warnings - #6015
Merged
Merged
Conversation
Downgrade missing-library messages in getImports() implementations from errors to warnings. Missing libraries do not break build process (and may even be harmless, depending on the situation), so error is a bit too strong word, especially as it ends up confusing users.
Currently, we silently swallow "lib.so => not found" messages from ldd, wheras we should probably be displaying a warning about those libraries. The behavior is likely linux-specific (or even glibc-specific), but it's better than nothing.
Implement general missing-library warning suppression mechanism, and apply it to codepaths for all OSes.
Spotted on openwrt.
These are harmless, and are result of the shiboken2/6 shared library residing in a separate package and not being in the search path. Therefore, PySide2/6 extensions themselves cannot resolve the shiboken shared library, which actually ends up loaded when the corresponding extension from shiboken package is loaded (and this is also how PyInstaller manages to pick it up).
Instead of importing each and every is_* member from compat, import and use compat instead.
rokm
force-pushed
the
missing-linked-library-warnings
branch
from
July 15, 2021 14:26
d267f76 to
5c1496f
Compare
rokm
marked this pull request as ready for review
July 15, 2021 16:41
bwoodsend
approved these changes
Jul 22, 2021
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR is a collection of changes that aim to improve missing-library messages generated during binary dependency scanning.
First, downgrade messages from ERROR to WARNING, because it is a pain having to explain to users that the build process did finish nevertheless and that they should try running the generated binary. (It is actually quite reasonable to assume that something has gone terribly wrong when you see that message, unless you've worked with PyInstaller before).
Display warnings for missing libraries on linux systems (i.e.,
libsomething.so => not foundlines inlddoutput). Currently, we are quietly swallowing those, which leads to issues like #5863 that would have been otherwise easy to figure out. This probably captures only output generated by glibc-basedlddon linux systems (depending on how others display missing library information), but it's a good starting point. Fixes #5863 (absence of warnings about missing libraries).The above change now results in messages about missing
libshiboken{2,6}.*when building with PySide2/PySide6 on linux (whereas on Windows and macOS, they've already been present), so this is a good opportunity to suppress that once and for all. We first add a general mechanism for suppression patterns (similar to already-existing shared library include and exclude list), and port the Windows-specific suppression of messages about missingapi-ms-win-crt*DLLs.In addition, we also suppress warning for missing
ldd, which occurs on openwrt due to libc pointing to it (libc.so => ldd).