Skip to content

Fix the macOS build, and smoke-test the import that starts the app - #193

Merged
abrignoni merged 2 commits into
mainfrom
fix/macos-harfbuzz-collision
Sep 25, 2026
Merged

abrignoni merged 2 commits into
mainfrom
fix/macos-harfbuzz-collision

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

The macOS build of v2026.5.0 could not start: a harfbuzz collision in the bundle
made importing cv2 fail, so the app exited before drawing a window. Those assets
have been withdrawn from the release.

Nothing caught it because nothing imported cv2. --version answers before the
desktop shell is imported and --texworker only reaches Pillow.

First commit adds --selfcheck, which imports numpy, Pillow, cv2 and the app
modules without opening a window, and calls it from both build workflows. It is
expected to fail the macOS legs. The fix follows once CI has reproduced the
defect.

🤖 Generated with Claude Code

abrignoni and others added 2 commits September 25, 2026 18:19
The macOS build of v2026.5.0 passed every check and could not start. A harfbuzz
collision in the bundle made importing cv2 fail with
"Symbol not found: _hb_coretext_font_create", so the app exited before drawing a
window, which reads to a user like the Gatekeeper warning did not take.

Nothing caught it because nothing imported cv2. entrypoint.py answers --version
before the desktop shell is imported, on purpose, and --texworker only reaches
Pillow and the texture decoders.

--selfcheck imports numpy, Pillow, cv2 and the two app modules and exits without
a window, and both build workflows now call it. This commit is expected to fail
the two macOS legs: that is the defect, reproduced in CI.

Co-Authored-By: Claude Opus 5 <[email protected]>
The collision is between two packaging ecosystems. The PyPI Pillow wheel vendors
its own libharfbuzz built without CoreText; conda-forge's pango, which comes in
with the LGPL OpenCV, needs one built with it. PyInstaller collapses two dylibs
of the same name into one, and the copy that survived exported no CoreText
symbol, so cv2 could not load and the app could not start.

Installing Pillow from conda-forge alongside OpenCV leaves a single shared
harfbuzz, which both use. Nothing changes off macOS, where Pillow keeps coming
from PyPI and no pango is bundled.

The previous commit's CI run is the control: both macOS legs failed at
--selfcheck on "Symbol not found: _hb_coretext_font_create", after ok numpy and
ok PIL.Image, while Linux and Windows passed.

Co-Authored-By: Claude Opus 5 <[email protected]>
@abrignoni
abrignoni marked this pull request as ready for review September 25, 2026 22:37
@abrignoni
abrignoni merged commit 7d6b07e into main Sep 25, 2026
12 checks passed
@abrignoni
abrignoni deleted the fix/macos-harfbuzz-collision branch September 25, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant