Skip to content
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

Fixed libXau error in wheels for macOS 10.10 #7764

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Jan 30, 2024

#6862 (comment) is a report from a user that Pillow 10.2.0 wheels cause the following error on macOS 10.10

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/just/code/git/drawbot/venv312/lib/python3.12/site-packages/PIL/Image.py", line 84, in <module>
    from . import _imaging as core
ImportError: dlopen(/Users/just/code/git/drawbot/venv312/lib/python3.12/site-packages/PIL/_imaging.cpython-312-darwin.so, 2): Library not loaded: @loader_path/libXau.6.0.0.dylib
  Referenced from: /Users/just/code/git/drawbot/venv312/lib/python3.12/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
  Reason: no suitable image found.  Did find:
	/Users/just/code/git/drawbot/venv312/lib/python3.12/site-packages/PIL/.dylibs/libXau.6.0.0.dylib: cannot load 'libXau.6.0.0.dylib' (load command 0x80000034 is unknown)
	/Users/just/code/git/drawbot/venv312/lib/python3.12/site-packages/PIL/.dylibs/libXau.6.0.0.dylib: cannot load 'libXau.6.0.0.dylib' (load command 0x80000034 is unknown)

Investigating, I found that when generating wheels, GitHub Actions is outputting

ld: warning: dylib (/usr/local/Cellar/libxau/1.0.11/lib/libXau.dylib) was built for newer macOS version (12.0) than being linked (10.10)

This PR uninstalls brew's libxau, and starts building libxcb's dependencies on macOS x86-64 instead.

The user has confirmed that the wheels with these changes work on macOS 10.10.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'll note this adds an extra 10 minutes to the macOS x86_64 wheel job (36->46min) and macOS OS X 10.10 has been EOL for 6.5 years:

cycle codename release latest latest release eol link
14 Sonoma 2023-09-26 14.3 2024-01-22 False https://support.apple.com/HT213895
13 Ventura 2022-10-24 13.6.4 2024-01-22 False https://support.apple.com/HT213268
12 Monterey 2021-10-25 12.7.3 2024-01-22 False https://support.apple.com/HT212585
11 Big Sur 2020-11-12 11.7.10 2023-09-11 2023-09-26 https://support.apple.com/HT211896
10.15 Catalina 2019-10-07 10.15.7 2020-09-24 2022-09-12 https://support.apple.com/HT210642
10.14 Mojave 2018-09-24 10.14.6 2019-07-22 2021-10-25
10.13 High Sierra 2017-09-25 10.13.6 2018-07-09 2020-12-01
10.12 Sierra 2016-09-20 10.12.6 2017-07-19 2019-10-01
10.11 El Capitan 2015-09-30 10.11.6 2016-07-18 2018-12-01
10.10 Yosemite 2014-10-16 10.10.5 2015-08-13 2017-08-01
10.9 Mavericks 2013-10-22 10.9.5 2014-09-17 2016-12-01

But the wheel builds are already very slow (1d 10h 21m total CPU time!) so another 10 minutes hardly makes a difference. And we may drop unofficial support for EOL OS versions in future releases with no notice.

@radarhere radarhere merged commit acd7ece into python-pillow:main Feb 3, 2024
34 of 35 checks passed
@radarhere radarhere deleted the libxau branch February 3, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants