-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Failure to build on macOS with Python 3.9.0 #4973
Comments
In two days, on October 15, Pillow 8.0 is due to be released, along with corresponding Python 3.9 wheels. Will that solve your problem? |
I have seen this merged PR: #4842 The system zlib headers exist, and Pillow should be finding them and using them. It's also possible for Homebrew to give some help, by setting an appropriate environment variable: is there a suitable variable that Pillow would check? |
My problem is building from source, so no, the wheels will not help. |
If you think this is a silly question, please bear with me - where do they exist? What path are you referring to? |
Not a silly question at all… the way that it works on recent macOS versions is very unusual. The toolchain can install multiple SDKs, with one SDK being "default", and there is nothing in In 99% of cases, the
The prefix for that can be obtained by running:
|
So I guess the solution for Pillow, if it wants to look up header files, would be to try and run In the meantime, is there an environment variable we could pass to the existing 7.2.0 version to unbreak our builds? |
How about specifying the path through |
Hum, often we're not calling |
https://pillow.readthedocs.io/en/latest/installation.html#building-from-source
|
I've created PR #4974 to resolve this properly. Let us know if you have any feedback on that. |
Adding
We're never use |
This should not be the case. I also expect Pillow to look for 'ft2build.h', and not try to include it if it is not present. Could you provide a more complete log? |
From the linked PR in homebrew (https://github.com/Homebrew/homebrew-core/pull/62795/checks?check_run_id=1247827911#step:5:347):
It seems there might be a version of FreeType in |
It would be nice to compare this log with a previous build to see if that did in fact use FreeType, but it seems brew doesn't print logs for successful runs (e.g. https://github.com/Homebrew/homebrew-core/pull/61603/checks?check_run_id=1161020342#step:5:36). |
Your current PR - Homebrew/homebrew-core#63381 - uses Pillow 7.0. Would you be able to upgrade that to 8.0.x? In addition to being the first release series that we've tested for Python 3.9, it would then include #4974 and #4842, which could help? |
I have the same issue listed here when trying to install Home Assistant. Is there a way to fix this issue yet? |
@julianrinaldi I presume you're talking about a problem with zlib? This issue has also discussed a problem with freetype. #4974 should have helped this by searching through the SDK paths as well. If this is still happening for you on macOS with the latest version of Pillow, could you create a new issue with more details? |
I was able to fix it by installing zlib through brew and following the directions to point it to the right location. Thanks. |
@fxcoudert I see you've closed Homebrew/homebrew-core#63381. Are you no longer interested in this? |
I don't have the time to devote to finding and applying a fix. I would welcome a pull request to Homebrew, and an improvement of the Pillow build system so that it works better on macOS. |
Each of the formulas from your PR have now been updated to Python 3.9
Does that mean that this issue is now resolved? |
What did you do?
I'm a Homebrew maintainer, trying to build Pillow as part of a Homebrew package: Homebrew/homebrew-core#62795 on macOS with Python 3.9.0. This is one example, but other packages using Pillow fail in the same way.
What did you expect to happen?
Compilation succeeds.
What actually happened?
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: