Closed matthewfeickert closed 3 weeks ago
In PR #24 libomp
is built and installed under /usr/local/lib/
[100%] Built target omp
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libomp.dylib
-- Installing: /usr/local/include/omp.h
-- Installing: /usr/local/include/ompx.h
-- Installing: /usr/local/include/omp-tools.h
-- Installing: /usr/local/include/ompt.h
and delocate
finds it for the copy in the error message
...
INFO:delocate.delocating:Copying library /usr/local/lib/libomp.dylib to wasserstein/.dylibs/libomp.dylib
...
so I don't follow why
"Library dependencies do not satisfy target MacOS"
delocate.libsana.DelocationError: Library dependencies do not satisfy target MacOS version 10.9:
/private/var/folders/vy/h7r6h43j203gstfh6fj9_tyh0000gn/T/tmprdp8i5mn/wheel/wasserstein/.dylibs/libomp.dylib has a minimum target of 13.6
is happening when the llvm omp should be fine. :?
We might need @henryiii to give a debugging direction hint later this week.
Are you setting MACOSX_DEPLOYMENT_TARGET when building?
Are you setting MACOSX_DEPLOYMENT_TARGET when building?
No. I'm going to assume that this is just another example of why
isn't sufficient and https://github.com/thaler-lab/Wasserstein/issues/10 should also include migrating the wheel building to something like boost-histogram
's.
I didn't know what MACOSX_DEPLOYMENT_TARGET
was, but this is covered in macOS and deployment target versions cibuildwheel
docs.
From reading there, my understanding is that the default MACOSX_DEPLOYMENT_TARGET
value set by cibuildwheel
is 10.9
and you need to manually adjust it through setting the MACOSX_DEPLOYMENT_TARGET
based on how far backwards compatible you want to be.
Given that the current build has a comparatively high target of 13.6
"Library dependencies do not satisfy target MacOS"
delocate.libsana.DelocationError: Library dependencies do not satisfy target MacOS version 10.9:
/private/var/folders/vy/h7r6h43j203gstfh6fj9_tyh0000gn/T/tmprdp8i5mn/wheel/wasserstein/.dylibs/libomp.dylib has a minimum target of 13.6
I'm going to assume that means that the version of llvm omp in PR https://github.com/thaler-lab/Wasserstein/pull/24 built from
- name: Checkout LLVM on macOS
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: release/18.x
path: llvm-project
- name: Build OpenMP on macOS
run: |
cd llvm-project
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(brew --prefix) \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLIBOMP_INSTALL_ALIASES=OFF \
-S openmp \
-B build
cmake \
--build build \
--parallel
cmake --install build
cd "$GITHUB_WORKSPACE"
is using C++ features that are modern enough to push things up, and so to drop down to a lower target the https://github.com/llvm/llvm-project release branch should be changed to something older than release/18.x
.
drop down to a lower target the https://github.com/llvm/llvm-project release branch should be changed to something older than
release/18.x
.
Through empirical testing release/17.x
works for macos-13
with pypa/cibuildwheel@v2.14
.
Though with pypa/cibuildwheel@v2.19
everything fails, including release/11.x
and
previously worked in the past.
So I don't think I understand enough about what cibuildwheel
is doing between these releases do know why things are breaking.
You are building this outside of cibuildwheel. So you need to set it manually.
- name: Build OpenMP on macOS
env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
working-directory: llvm-project
run: |
cmake -Sopenmp -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(brew --prefix) \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLIBOMP_INSTALL_ALIASES=OFF \
cmake --build build --parallel 4
cmake --install build
Resolved in PR #24, given https://github.com/thaler-lab/Wasserstein/issues/28#issuecomment-2178278452, so closing.
Related to Issues:
13
19
During
https://github.com/thaler-lab/Wasserstein/blob/0a0fdeb810fc6f6b55fe773ea75fef7febb02047/.github/workflows/build-wheels.yml#L75-L87
https://github.com/thaler-lab/Wasserstein/blob/0a0fdeb810fc6f6b55fe773ea75fef7febb02047/scripts/build-wheels-and-upload.sh#L9
the build fails in the "Repairing wheel" stage with a
delocate.libsana.DelocationError
so it seems the wrong version of
libomp
is being found even if running on a branch that follows PR https://github.com/thaler-lab/Wasserstein/pull/24.