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
Enable libtiff Win32 I/O correctly #5243
Conversation
I presume this fails because libtiff itself is not built as part of CI? |
Built for Windows: Pillow/.github/workflows/test-windows.yml Lines 105 to 107 in 31f3f8f
Except installed by pacman for Windows / MSYS MinGW: Pillow/.github/workflows/test-windows.yml Line 259 in 31f3f8f
|
LibTIFF was not rebuilt due to the build cache - the xref actions/cache#2 |
For reference, looks like this is related to conda-forge/poppler-feedstock#73 (comment), conda-forge/libtiff-feedstock#62. |
Correct, trying to figure out what is a consistent way of building libtiff and Pillow on Windows across the board... OTOH, @cgohlke imagecodecs seems to assume Unix I/O always ( |
Windows guarantees |
AFAICT we don't have imagecodecs indeed actually uses only |
Oh right, but
The |
Got it, thanks. Back to the CI cache issue - still don't have any clues how to kickstart it and what to change in the yml files, so maintainers please feel free to modify the PR. |
Because https://github.com/actions/cache doesn't yet have a way to clear caches, one common workaround is to include a For example: |
It looks like the libtiff maintainers I have an old work-in-progress branch where I changed the build to use CMake, but didn't proceed due to #4237. Would it be better to switch to always use win32 io or to include the patch from conda in the CMake build? |
Thanks for catching and sharing that. I'm converting this PR to draft for now, as I guess it'll take some time to converge to the "best" approach. Here's what I gathered so far:
IMHO all Windows libtiff builds should use the default Win32 I/O, which would mean some maintenance work for conda-forge to switch or keep patching. It'd be nice to establish if there are more packages affected other than Pillow and poppler... Ideally, libtiff should have exposed the USE_WIN32_FILEIO define publicly in ^ Rather than hard-coding this in |
NMake removal is now merged in libtiff master, so it sounds like Pillow will likely make a switch to CMake anyway, no? Feel free to hijack this PR for it, or close/reject until such a time comes... |
I've added an unrelated nasm update, and the change in test-windows.yml updates the cache key, causing the Windows tests to pass. |
Thanks, I'll remove the draft status should you want to take this for the next release. I guess the cmake switch won't be necessary until the next libtiff version is released, which is usually a while from now... |
Rebased in #5359. |
#5359 merged instead. Thanks! |
Fixes #4237 (for Pillow static builds and wheels)
NB: Requires all downstream projects to synchronize and rebuild.
This is a follow-up to #4890
Changes proposed in this pull request: