-
Notifications
You must be signed in to change notification settings - Fork 313
macOS build instructions
On macOS, it is easiest to install the development version of R as a full framework in /Library/Frameworks/R.framework/Versions
. This way, after a make install
, you can switch to the development version with Simon Urbanek's RSwitch.app
utility. This might require root privileges at the make install
step. You can also chown -R
the R.framework
folder to your user login. To install an R framework, pass --enable-R-framework
to the configure script:
./configure --enable-R-framework
If you'd like to install the development versions in a different framework than the released versions, use the following to append -dev
to the framework name (e.g. install to 3.6-dev
rather than 3.6
):
# Get version in major.minor format:
VERSION=`sed 's/\([0-9]*.[0-9]*\).[0-9]*.*/\1/' VERSION`
# Use version-dev as default folder target:
TARGET=${1:-$VERSION-dev}
./configure --enable-R-framework FW_VERSION=${TARGET}
You can change important build variables by passing them to the configure script. The defaults should normally be appropriate:
-
By default,
CPPFLAGS
andLDFLAGS
contain/usr/local/include
and/usr/local/lib
which is where libraries installed with brew are linked. -
By default,
CC
points to gcc which is an alias for the system clang.
brew install xz
brew install zlib
xcode-select --install