Commit 7e0f7bd
Build libzstd from source for macOS release wheels
Summary:
Fixes a `delocate.libsana.DelocationError` in the macOS leg of the release
workflow. After the prior fix (pinning cibuildwheel to v3.4.1 and installing
libzstd via `brew install zstd`), the macOS run got past the build step but
failed at `delocate-wheel` with:
Library dependencies do not satisfy target MacOS version 11.0:
tintype/.dylibs/libzstd.1.5.7.dylib has a minimum target of 15.0
Root cause: `macos-latest` runners now run macOS 15 (Sequoia), and Homebrew
bottles on those runners are built targeting the runner OS. But cibuildwheel
tags arm64 wheels with a minimum macOS of 11.0 by default, and delocate
refuses to bundle a dylib whose LC_VERSION_MIN is higher than the wheel's.
Fix: replace `brew install zstd` in `CIBW_BEFORE_ALL_MACOS` with a CMake
source build of libzstd 1.5.6 producing a universal2 (arm64 + x86_64) dylib
explicitly targeting macOS 11.0, installed to `/usr/local`.
`setup.py`'s `find_zstd()` searches `/usr`, `/usr/local`, `/opt/homebrew`
in that order, so installing to `/usr/local` takes precedence over any
leftover Homebrew install. The `brew uninstall` before the build is
defensive cleanup.
Also sets `CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0`. Without
this, cibuildwheel would default the x86_64 leg to 10.13 — which is lower
than the vendored libzstd's 11.0 target and would trigger the same
DelocationError in the opposite direction.
Trade-off: wheels now require macOS 11.0 (Big Sur, Nov 2020) or newer on
both architectures. Previously arm64 required 11.0 (unchanged) and x86_64
defaulted to 10.13. This is fine in practice — macOS 11 is >5 years old.
Reviewed By: aperez
Differential Revision: D103472663
fbshipit-source-id: 8d3d456cddbbacf4b4a45213e5b353a97c80df971 parent 5e30213 commit 7e0f7bd
1 file changed
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
69 | 92 | | |
70 | 93 | | |
71 | 94 | | |
| |||
0 commit comments