Commit f25665d
ci: fix macOS wheel delocate failure and linux-sdk test_solve absence
Summary:
Two independent CI failures on `main`, both fixed in this PR.
### 1. macOS wheels: `delocate DelocationError`
**Root cause:** cmake 3.31.x / scikit-build-core 0.12.x silently drops `LC_RPATH` entries from MODULE and SHARED targets on macOS arm64. The built `_rebalancer.cpython-*.so` and `_lib/librebalancer.dylib` have empty `LC_RPATH`, so delocate-wheel 0.13.0 raises `DelocationError` when it can't resolve `rpath/libfolly.*.dylib` and `rpath/librebalancer.dylib`.
**Fix:** New `tools/wheels/repair_macos.sh` (`CIBW_REPAIR_WHEEL_COMMAND_MACOS`) that patches the missing rpaths before handing off to `delocate-wheel`:
1. Adds `loader_path/_lib` to `_rebalancer.cpython-*.so` so delocate can walk the dep chain to `librebalancer.dylib`
2. Adds each getdeps/brew prefix `lib/` dir (from `.cmake_prefix_path`) to `_lib/librebalancer.dylib` so delocate can find and bundle transitive deps (`libfolly`, `libglog`, `libfmt`, …) into `.dylibs/`
### 2. linux-sdk: `test_solve: No such file or directory`
**Root cause:** `build_linux_sdk.sh` passed `PACKAGING_TEST=ON` via `--extra-cmake-defines`, but getdeps silently excludes `--extra-cmake-defines` from its build-cache key. When a cached build exists (from a prior CI run), getdeps reuses the cached ninja graph which predates `PACKAGING_TEST` and omits `test_solve`. The SDK artifact is uploaded without the binary; the deb smoke test then fails with exit 127.
**Fix 1 (primary):** Move `PACKAGING_TEST=ON` into the manifest `[cmake.defines]` block — manifest defines ARE part of the cache key, so getdeps always builds `test_solve`.
**Fix 2 (belt-and-suspenders):** `build_linux_sdk.sh` now detects absence of `test_solve` after the getdeps build and compiles it directly from the installed headers/library using clang, so the artifact is always complete even against a stale cache primed before this manifest change.
X-link: facebook/rebalancer#39
Reviewed By: kvelakur
Differential Revision: D110218346
Pulled By: r-barnes
fbshipit-source-id: fcb57f9ef51870a1c9ce38d3457ff8ef8e8d0b021 parent 0d9c37a commit f25665d
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
0 commit comments