Skip to content

Commit

Permalink
[ci] manually create symlinks to R entrypoints on macOS (fixes #4988)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 30, 2022
1 parent 0075814 commit e812787
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ if [[ $OS_NAME == "macos" ]]; then
-pkg $(pwd)/R.pkg \
-target /

# Older R versions (<= 4.1.1) on newer macOS (>= 11.0.0) cannot create the necessary symlinks.
# See https://github.com/r-lib/actions/issues/412.
sudo ln \
-sf \
/Library/Frameworks/R.framework/Resources/bin/R \
/usr/local/bin/R
sudo ln \
-sf \
/Library/Frameworks/R.framework/Resources/bin/Rscript \
/usr/local/bin/Rscript

# Fix "duplicate libomp versions" issue on Mac
# by replacing the R libomp.dylib with a symlink to the one installed with brew
if [[ $COMPILER == "clang" ]]; then
Expand Down

0 comments on commit e812787

Please sign in to comment.