Skip to content

Commit f25665d

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
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: fcb57f9ef51870a1c9ce38d3457ff8ef8e8d0b02
1 parent 0d9c37a commit f25665d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎build/fbcode_builder/manifests/rebalancer‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ builder = cmake
1616

1717
[cmake.defines]
1818
CMAKE_POSITION_INDEPENDENT_CODE=ON
19+
# Build the packaging smoke-test binary as part of every getdeps build so
20+
# it is included in the cache key. Without this, test_solve would have to
21+
# be built outside getdeps, which requires replicating cmake's full link
22+
# graph (folly, fbthrift, glog, etc.) manually — impractical and fragile.
23+
PACKAGING_TEST=ON
1924

2025
# Build the example/demo executables only when getdeps is invoked with
2126
# tests enabled (test=on -- the default for `getdeps build` without

0 commit comments

Comments
 (0)