Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install various R packages probably after upgrading to Mac OS Catalina

Have been googling for days now.. Updated Xcode including command line tools as well, I've tried various SDKs, but unsuccessfully. Anyone out there who has found a solution yet? Any chance that the error is due to the fact that apple does't support 32bit programs anymore which results in various R packages not working..?

Thanks in advance!

My log from rstudio:

> install.packages("copula")
also installing the dependency ‘gsl’

trying URL 'https://cran.rstudio.com/src/contrib/gsl_2.1-6.tar.gz'
Content type 'application/x-gzip' length 189794 bytes (185 KB)
==================================================
downloaded 185 KB

trying URL 'https://cran.rstudio.com/src/contrib/copula_0.999-19.1.tar.gz'
Content type 'application/x-gzip' length 5529710 bytes (5.3 MB)
==================================================
downloaded 5.3 MB

* installing *source* package ‘gsl’ ...
** package ‘gsl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gsl-config... /Users/Philip/opt/anaconda3/bin/gsl-config
checking if GSL version >= 2.1... checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/v4/0ddh56_173b0vtx6gkypz1d00000gn/T/RtmpmcvvFa/R.INSTALL10b792e7e213f/gsl':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘gsl’
* removing ‘/Users/Philip/opt/anaconda3/lib/R/library/gsl’
Warning in install.packages :
  installation of package ‘gsl’ had non-zero exit status
ERROR: dependency ‘gsl’ is not available for package ‘copula’
* removing ‘/Users/Philip/opt/anaconda3/lib/R/library/copula’
Warning in install.packages :
  installation of package ‘copula’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/v4/0ddh56_173b0vtx6gkypz1d00000gn/T/RtmpC6BV8X/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Session:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Catalina 10.15.2

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Users/Philip/opt/anaconda3/lib/R/lib/libRblas.dylib

locale:
[1] nl_NL.UTF-8/nl_NL.UTF-8/nl_NL.UTF-8/C/nl_NL.UTF-8/nl_NL.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1    yaml_2.2.0   

Also I have the following setting in my Home/R./Makevars file:

# clang: start
CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include

SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
SHLIB_CXX14LDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
# clang: end

Following Oo.oO 's anwer I obtain a similar error:

(base) MacBook-Pro-van-Philip:gsl-2.6 Philip$ ./configure --prefix=$HOME/opt/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a sed that does not truncate output... /usr/bin/sed
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-apple-darwin19.2.0
checking host system type... x86_64-apple-darwin19.2.0
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/Users/Philip/opt/src/gsl-2.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by gsl configure 2.6, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/Users/Philip/opt/usr/local

## --------- ##
## Platform. ##
## --------- ##

hostname = MacBook-Pro-van-Philip.local
uname -m = x86_64
uname -r = 19.2.0
uname -s = Darwin
uname -v = Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 370 tasks, 1330 threads, 8 processors
Load average: 2.01, Mach factor: 6.01
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/opt/anaconda3/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Users/Philip/anaconda3/bin
PATH: /Users/Philip/anaconda/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin
PATH: /Users/Philip/anaconda/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Library/TeX/texbin
PATH: /usr/local/MacGPG2/bin
PATH: /opt/X11/bin
PATH: /usr/local/opt/anaconda3/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Users/Philip/anaconda3/bin
PATH: /Users/Philip/anaconda/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin
PATH: /Users/Philip/opt/anaconda3/bin/r
PATH: /usr/local/clang8/bin
PATH: /Users/Philip/opt/anaconda3/bin
PATH: /usr/local/opt/anaconda3/condabin
PATH: ../../usr/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2381: checking for a BSD-compatible install
configure:2449: result: /usr/bin/install -c
configure:2460: checking whether build environment is sane
configure:2515: result: yes
configure:2666: checking for a thread-safe mkdir -p
configure:2705: result: ./install-sh -c -d
configure:2712: checking for gawk
configure:2742: result: no
configure:2712: checking for mawk
configure:2742: result: no
configure:2712: checking for nawk
configure:2742: result: no
configure:2712: checking for awk
configure:2728: found /usr/bin/awk
configure:2739: result: awk
configure:2750: checking whether make sets $(MAKE)
configure:2772: result: yes
configure:2801: checking whether make supports nested variables
configure:2818: result: yes
configure:2905: checking whether to enable maintainer-specific portions of Makefiles
configure:2914: result: no
configure:2952: checking for a sed that does not truncate output
configure:3016: result: /usr/bin/sed
configure:3028: checking whether make sets $(MAKE)
configure:3050: result: yes
configure:3064: checking build system type
configure:3078: result: x86_64-apple-darwin19.2.0
configure:3098: checking host system type
configure:3111: result: x86_64-apple-darwin19.2.0
configure:3186: checking for gcc
configure:3213: result: x86_64-apple-darwin13.4.0-clang
configure:3442: checking for C compiler version
configure:3451: x86_64-apple-darwin13.4.0-clang --version >&5
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: /Users/Philip/opt/anaconda3/bin
configure:3462: $? = 0
configure:3451: x86_64-apple-darwin13.4.0-clang -v >&5
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: /Users/Philip/opt/anaconda3/bin
configure:3462: $? = 0
configure:3451: x86_64-apple-darwin13.4.0-clang -V >&5
clang-4.0: error: argument to '-V' is missing (expected 1 value)
clang-4.0: error: no input files
configure:3462: $? = 1
configure:3451: x86_64-apple-darwin13.4.0-clang -qversion >&5
clang-4.0: error: unknown argument: '-qversion'
clang-4.0: error: no input files
configure:3462: $? = 1
configure:3482: checking whether the C compiler works
configure:3504: x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs conftest.c  >&5
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
configure:3508: $? = 1
configure:3546: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gsl"
| #define PACKAGE_TARNAME "gsl"
| #define PACKAGE_VERSION "2.6"
| #define PACKAGE_STRING "gsl 2.6"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "gsl"
| #define VERSION "2.6"
| #define RELEASED /**/
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3551: error: in `/Users/Philip/opt/src/gsl-2.6':
configure:3553: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin19.2.0
ac_cv_env_CC_set=set
ac_cv_env_CC_value=x86_64-apple-darwin13.4.0-clang
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-apple-darwin19.2.0
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=x86_64-apple-darwin13.4.0-clang
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /Users/Philip/opt/src/gsl-2.6/missing aclocal-1.13'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-ar'
AS='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-as'
AUTOCONF='${SHELL} /Users/Philip/opt/src/gsl-2.6/missing autoconf'
AUTOHEADER='${SHELL} /Users/Philip/opt/src/gsl-2.6/missing autoheader'
AUTOMAKE='${SHELL} /Users/Philip/opt/src/gsl-2.6/missing automake-1.13'
AWK='awk'
CC='x86_64-apple-darwin13.4.0-clang'
CCDEPMODE=''
CFLAGS='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe'
CPP=''
CPPFLAGS='-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9'
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
GSLCBLAS_LDFLAGS=''
GSL_CFLAGS=''
GSL_LDFLAGS=''
GSL_LIBADD=''
GSL_LIBM=''
GSL_LIBS=''
GSL_LT_CBLAS_VERSION='0:0:0'
GSL_LT_VERSION='25:0:0'
GSL_MAJOR_VERSION='2'
GSL_MINOR_VERSION='6'
HAVE_AIX_IEEE_INTERFACE=''
HAVE_DARWIN86_IEEE_INTERFACE=''
HAVE_DARWIN_IEEE_INTERFACE=''
HAVE_FREEBSD_IEEE_INTERFACE=''
HAVE_GNUM68K_IEEE_INTERFACE=''
HAVE_GNUPPC_IEEE_INTERFACE=''
HAVE_GNUSPARC_IEEE_INTERFACE=''
HAVE_GNUX86_IEEE_INTERFACE=''
HAVE_HPUX11_IEEE_INTERFACE=''
HAVE_HPUX_IEEE_INTERFACE=''
HAVE_IRIX_IEEE_INTERFACE=''
HAVE_NETBSD_IEEE_INTERFACE=''
HAVE_OPENBSD_IEEE_INTERFACE=''
HAVE_OS2EMX_IEEE_INTERFACE=''
HAVE_SOLARIS_IEEE_INTERFACE=''
HAVE_SUNOS4_IEEE_INTERFACE=''
HAVE_TRU64_IEEE_INTERFACE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-ld'
LDFLAGS='-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs'
LIBM=''
LIBOBJS=''
LIBS=''
LIBTOOL='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-libtool'
LIPO='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /Users/Philip/opt/src/gsl-2.6/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-nm'
NMEDIT='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-nmedit'
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-otool'
PACKAGE='gsl'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='gsl'
PACKAGE_STRING='gsl 2.6'
PACKAGE_TARNAME='gsl'
PACKAGE_URL=''
PACKAGE_VERSION='2.6'
PATH_SEPARATOR=':'
RANLIB='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-ranlib'
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='/Users/Philip/opt/anaconda3/bin/x86_64-apple-darwin13.4.0-strip'
VERSION='2.6'
ac_ct_AR=''
ac_ct_CC='x86_64-apple-darwin13.4.0-clang'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin19.2.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin19.2.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-apple-darwin19.2.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin19.2.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/Philip/opt/src/gsl-2.6/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Users/Philip/opt/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "gsl"
#define PACKAGE_TARNAME "gsl"
#define PACKAGE_VERSION "2.6"
#define PACKAGE_STRING "gsl 2.6"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "gsl"
#define VERSION "2.6"
#define RELEASED /**/

configure: exit 77
like image 328
phageman Avatar asked Jan 07 '20 14:01

phageman


People also ask

Why I Cannot install package in R?

Changing the configuration in R Studio to solve install packages issue. Go To Tools -> Global option -> Packages. Then uncheck the option “Use secure download method for HTTP”. For other RStudio issues refer to official Troubleshooting Guide here.

Why won't macOS Catalina install on my Mac?

If you're still having problems downloading macOS Catalina, try to find the partially-downloaded macOS 10.15 files and a file named 'Install macOS 10.15' on your hard drive. Delete them, then reboot your Mac and try to download macOS Catalina again.

How do I install R packages on Mac?

(If R is not installed, then follow these directions to install R for Mac OS.) Select the Packages & Data menu and Packages Installer submenu item. In the dialog box, click Get List to compile a current list of available packages. Select the packages to install (use the <command> key to select multiple packages).


1 Answers

I was able to build copula in R-4.0.2 in macOS Catalina. I installed first gsl with brew install gsl, and then back to R to build copula.

My ~/.R/Makevars is a little bit long but I am hoping it helps:

# --------
# Makevars
# --------

# General note
# - need to repeat options across C++ flavors (e.g., 11, 14)

# Homebrew bin / opt / lib locations
HB=/usr/local/bin
HO=/usr/local/opt
HL=/usr/local/lib
HI=/usr/local/include

# MacOS Xcode header location (August 2019)
# (do "xcrun -show-sdk-path" in terminal to get path; change if yours is different)
# (or xcrun --sdk macosx --show-sdk-path)
# XH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk   # Mojave
XH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk     # Catalina

# ccache
CCACHE=$(HB)/ccache

# Make using all cores (set # to # of cores on your machine)
MAKE=make -j4

# GNU version (August 2019)
GNU_VER=10

# LLVM (Clang) compiler options
CC=$(CCACHE) $(HO)/llvm/bin/clang
CXX=$(CC)++
CXX98=$(CC)++
CXX11=$(CC)++
CXX14=$(CC)++
CXX17=$(CC)++

# FORTRAN
FC=$(CCACHE) $(HB)/gfortran-$(GNU_VER)
F77=$(FC)
FLIBS=-L$(HL)/gcc/$(GNU_VER) -lgfortran -lquadmath -lm

# STD libraries
CXX1XSTD=-std=c++0x
CXX11STD=-std=c++11
CXX14STD=-std=c++14
CXX17STD=-std=c++17

# FLAGS
STD_FLAGS=-g -O3 -Wall -pedantic -mtune=native -pipe
CFLAGS=$(STD_FLAGS)
CXXFLAGS=$(STD_FLAGS)
CXX98FLAGS=$(STD_FLAGS)
CXX11FLAGS=$(STD_FLAGS)
CXX14FLAGS=$(STD_FLAGS)
CXX17FLAGS=$(STD_FLAGS)

# Preprocessor FLAGS
# NB: -isysroot refigures the include path to the Xcode SDK we set above
CPPFLAGS=-isysroot $(XH) -I$(HI) \
    -I$(HO)/llvm/include -I$(HO)/openssl/include \
    -I$(HO)/gettext/include    -I$(HO)/tcl-tk/include

# Linker flags (suggested by homebrew)
LDFLAGS+=-L$(HO)/llvm/lib -Wl,-rpath,$(HO)/llvm/lib

# Flags for OpenMP support that should allow packages that want to use
# OpenMP to do so (data.table), and other packages that bork with
# -fopenmp flag (stringi) to be left alone
SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_CXX98FLAGS=-fopenmp
SHLIB_OPENMP_CXX11FLAGS=-fopenmp
SHLIB_OPENMP_CXX14FLAGS=-fopenmp
SHLIB_OPENMP_CXX17FLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp

You will be able to find more detailed instructions at the link below. It works in Mojave and Catalina for R-4.0.2 for packages such as rattle, boost, MASS, Hmisc, RccppArmadillo, and others.

Source: https://www.btskinner.io/code/install-r-with-openblas-and-openmp-on-macos-mojave/

like image 115
f0nzie Avatar answered Nov 04 '22 19:11

f0nzie