diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f024f46f3..4579501b2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -219,6 +219,7 @@ jobs: brew install gmp mpfr libmpc eigen@3 && cd /tmp && { [ -f eigenpy-3.11.0.tar.gz ] || curl -fsSL -o eigenpy-3.11.0.tar.gz https://github.com/stack-of-tasks/eigenpy/releases/download/v3.11.0/eigenpy-3.11.0.tar.gz ; } + # Build Boost and eigenpy fresh against the active per-Python interpreter # so each wheel bundles a matching libboost_python3X. CIBW_BEFORE_BUILD_LINUX: > @@ -237,9 +238,12 @@ jobs: cd /tmp && rm -rf eigenpy-3.11.0 && tar zxf eigenpy-3.11.0.tar.gz && cd eigenpy-3.11.0 && mkdir -p bld && cd bld && - cmake .. -DCMAKE_PREFIX_PATH=/tmp/deps-py -DCMAKE_INSTALL_PREFIX=/tmp/deps-py -DPython3_EXECUTABLE=$(which python) -DPython3_NumPy_INCLUDE_DIR=$(python -c "import numpy; print(numpy.get_include())") -DBUILD_TESTING=OFF && + cmake .. -DCMAKE_PREFIX_PATH=/tmp/deps-py -DCMAKE_INSTALL_PREFIX=/tmp/deps-py -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DPython3_EXECUTABLE=$(which python) -DPython3_NumPy_INCLUDE_DIR=$(python -c "import numpy; print(numpy.get_include())") -DBUILD_TESTING=OFF -DCMAKE_INSTALL_DO_STRIP=ON && make -j2 install && - find /tmp/deps-py/lib -name '*.so*' -exec strip --strip-debug {} + 2>/dev/null || true + find /tmp/deps-py -name '*.so*' -type f | while read f; do + err=$(strip --strip-unneeded "$f" 2>&1) || echo "strip failed on $f: $err" + done + # On macOS, build all Boost components (including Boost.Python) into /tmp/deps-py # so delocate sees only one set of dylibs. boost-base is used only for C++ tests. CIBW_BEFORE_BUILD_MACOS: >