Fixed libXau error in wheels for macOS 10.10 by radarhere · Pull Request #7764 · python-pillow/Pillow
#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.