Fix macOS x86_64 wheel build by preferring Conda OpenMP runtime#2
Closed
RAMitchell wants to merge 1 commit intopr-12086-basefrom
Closed
Fix macOS x86_64 wheel build by preferring Conda OpenMP runtime#2RAMitchell wants to merge 1 commit intopr-12086-basefrom
RAMitchell wants to merge 1 commit intopr-12086-basefrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the macOS x86_64 wheel CI failure seen in PR dmlc#12086.
The failing job was:
Build macOS wheel (macosx_x86_64)delocatefailed while repairing the wheel becauselibxgboost.dylibpicked up Homebrew LLVM'slibunwind.1.0.dylib, and that dependency requires macOS 14.0 even though the wheel target is macOS 10.15.Root Cause
On the macOS Intel runner, the wheel build was resolving OpenMP through Homebrew. That in turn introduced a dependency on Homebrew LLVM's
libunwind, which caused wheel repair to fail with:Fix
This PR makes the macOS wheel build prefer Conda's
llvm-openmpruntime instead of relying on Homebrew's OpenMP path:llvm-openmpin the Conda environment during macOS wheel buildsCMAKE_PREFIX_PATH=$CONDA_PREFIXfor the wheel buildFindOpenMPMacOS.cmaketo prefer$CONDA_PREFIX/lib/libomp.dylibwhen availableThis avoids pulling Homebrew LLVM's
libunwindinto the wheel repair step and preserves the existing macOS 10.15 deployment target.Why not bump the deployment target?
A simpler workaround would be to raise the Intel macOS wheel target from 10.15 to 14.0, but that would be a significant compatibility drop for macOS x86_64 users. This change keeps the current support target intact and fixes the dependency resolution instead.