Fix macOS release plugins failing to load (v0.4.1) - #18
Merged
Conversation
The v0.4.0 macOS plugins were reported by TouchDesigner as corrupted. The release runner has no TouchDesigner, so CMake fell back to the runner's Homebrew Python 3.14 and linked the plugins against /opt/homebrew/opt/python@3.14/..., a path that exists on no user's Mac and is the wrong ABI for the 3.11 TouchDesigner embeds. The binaries also inherited the runner's macOS 26 as their minimum OS and arm64 as their only architecture, and carried only the linker's partial ad-hoc signature. The plugins now link no Python library at all: symbols resolve from the host process at load time (-undefined dynamic_lookup), as for any CPython extension. Only the 3.11 headers are needed, taken from TouchDesigner when it is installed and from any CPython 3.11 (EXACT) otherwise. Deployment target is 13.3 (std::format on floats needs libc++ from 13.3), architectures are arm64 and x86_64, and the bundle is ad-hoc signed as a whole post-build so codesign accepts it. CI and the release gate now verify all four properties. Gatekeeper still refuses a quarantined copy without notarization, so the README's install steps now include clearing the quarantine flag. Verified locally: both the TouchDesigner-headers build and the no-TouchDesigner fallback produce identical universal plugins that pass the 418-check TouchDesigner integration suite once the flag is cleared. Also makes run_td_tests.sh executable and bumps the version to 0.4.1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A workflow_dispatch run from a branch whose name contains a slash (such as fix/macos-release-plugin-loading) made the stage name a nested path, so the zip landed in a subdirectory the upload glob never matched and both platforms failed at the upload step. Tags are unaffected; branch runs now use dev-<short sha>. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.4.0 macOS archive fails in TouchDesigner with "plugin is corrupted". Three build-configuration defects and one distribution limitation, all reproduced with the shipped archive on macOS 26.6 / TouchDesigner 2025.33230:
/opt/homebrew/opt/python@3.14/Frameworks/Python.framework/Versions/3.14/Python. That path exists on no user's Mac, and 3.14 is the wrong ABI for the 3.11 TouchDesigner embeds. (The CI log shows the fallback warning.)macos-26-arm64runner's.codesign --verifyrejects the bundle.Earlier releases never shipped a Mac binary at all (the old workflow uploaded a
.dylibthe bundle build never produced), which is why this is the first time it shows.Changes
CMakeLists.txt: on macOS, stop linking libpython. Link with-undefined dynamic_lookupso Python symbols resolve from TouchDesigner's own interpreter at load time, as every CPython extension does. Only the 3.11 headers are needed: TouchDesigner's when installed (ANIMATIONCHOP_TD_APPoverrides the location), elsefind_package(Python3 3.11 EXACT ...)so a newer interpreter can never be picked. Deployment target 13.3 (the bindings usestd::formaton floats, which libc++ only provides from 13.3; TouchDesigner's own minimum is 13.0), universalarm64;x86_64, and an ad-hoccodesignof the whole bundle post-build. Version bumped to 0.4.1.tests/python/CMakeLists.txt: the test extension uses the same headers and undefined-symbol linking on macOS.ci.yml/release.yml: a "Verify macOS plugins" step fails the build if a plugin links any Python library, is not universal, has a minimum OS other than 13.3, or failscodesign --verify --strict. The release gate can no longer publish this class of binary.README.md: install step to clear the quarantine flag (xattr -dr com.apple.quarantine Plugins), updated requirements and build notes.CHANGELOG.md: 0.4.1 entry.run_td_tests.shis now executable.Verification
codesign --verify --deep --strictpasses, ctest 18/18, TouchDesigner integration suite 418 passed, 0 failed.-DANIMATIONCHOP_TD_APP=/nonexistent, uv's CPython 3.11 on PATH): identical result, 418/418 in TouchDesigner.Reviewer notes
actions/setup-pythonputting 3.11 on PATH, which it already does. The first CI run on this branch is the real test of that path; the new verify step will fail loudly if anything is off.🤖 Generated with Claude Code