Skip to content

Commit

Permalink
OS X libomp CI fix. (#5771)
Browse files Browse the repository at this point in the history
* mac os libomp testing

* building from source

* fixed libomp installation

* added note to develop docs about workaround
  • Loading branch information
michaelgsharp authored Apr 28, 2021
1 parent ebc431f commit d8fe817
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/ci/job-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
continueOnError: true
# Extra MacOS step required to install OS-specific dependencies
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
- script: brew update && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force
- script: brew update && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb --build-from-source --formula && brew link libomp --force
displayName: Install MacOS build dependencies
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.name, 'Hosted Ubuntu 1604')) }}:
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH"
Expand Down
2 changes: 1 addition & 1 deletion build/vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ phases:
rm -rf /usr/local/bin/2to3
displayName: MacOS Homebrew bug Workaround
continueOnError: true
- script: brew update && brew unlink python@3.8 && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force
- script: brew update && brew unlink python@3.8 && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb --build-from-source --formula && brew link libomp --force
displayName: Install build dependencies
- script: ./restore.sh
displayName: restore all projects
Expand Down
2 changes: 2 additions & 0 deletions docs/building/unix-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ $ brew update && brew install cmake https://raw.githubusercontent.com/dotnet/mac
```

Please note that newer versions of Homebrew [don't allow installing directly from a URL](https://github.com/Homebrew/brew/issues/8791). If you run into this issue, you may need to download libomp.rb first and install it with the local file instead.

Also, libomp version 7.0.0 doesn't have a cask for Big Sur. You can work around this by downloading the libomp.rb file and then calling `brew install libomp.rb --build-from-source --formula`.

0 comments on commit d8fe817

Please sign in to comment.