Make sure third-party libraries are found in debug build - #8016
Make sure third-party libraries are found in debug build#8016mrbean-bremen wants to merge 4 commits into
Conversation
| # as the library prefix differs depending on library type and platform, | ||
| # we ignore it by looking for the actual library name | ||
| start_index = lib_name_base.find(library) | ||
| return lib_name_base[start_index:] |
There was a problem hiding this comment.
This is a bit hacky, but I didn't find a better way to get the library name from the file name. I could not use splitext, as that would not handle something like libfoo.so.6.
As this is an internal function only, I hope it is ok.
|
Are you able to put together a Dockerfile that demonstrates the need for this? |
Sorry, missed that comment. I have to check... we are building using conan (we also build the other dependencies), that would probably be overkill here. I first thaught to add a CI wheel build in debug mode, but that is hardly needed by anyone, so it would only make the build process even longer. Will think about it... |
|
The problem happens only if building against the debug libraries, which is not a common scenario (especially under Linux), except you build the libraries yourself (which we do). To reproduce this in a container, we would have to do this first (e.g. build the thirdparty libraries), as to my knowledge there is no ready container that already has them. As I wrote, we use conan to build the thirdparty libraries (and pillow) and store the build libraries in an artifactory, which would not be an option in the CI. So, at the moment I don't have an idea how to test this with reasonable effort. I still think that the scenario is not completely outlandish, and it would make sense to support it (given that the underlying And, by the way, thanks for all the work you put into this project, and for the fast and helpful feedback! |
747a9b9 to
749ec2a
Compare
1303266 to
187c892
Compare
- _find_library_file now also checks debug libraries if in debug mode and returns the library name - the returned library name is used for linking instead of the hardcoded name
187c892 to
73d01c1
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@radarhere - Thanks, makes sense - I applied your suggestions. |
65076c8 to
4a1ae22
Compare
- review suggestion by @radarhere
4a1ae22 to
2267ba2
Compare
|
This got broken by the merges from main - I'm re-creating the PR in a new branch. |
We build Pillow in debug mode and had the problem that the debug libraries (ending with "_d") were not found.
Using this patch fixed this.
I did not add release notes, as this is internal build stuff only - let me know if they are needed (in case this PR will get accepted).