Skip to content

Instantly share code, notes, and snippets.

@nbenn

nbenn/install-r.sh

Created Oct 8, 2018
Embed
What would you like to do?
install R on Mac OS 10.14 with openMP capable clang
wget https://stat.ethz.ch/CRAN/src/base/R-3/R-3.5.1.tar.gz
tar -xvf R-3.5.1.tar.gz
cd R-3.5.1
vi config.site
# edit such that
# CC=/usr/local/clang-7/bin/clang
# OBJC=$CC
# F77=/usr/local/gcc-8.2/bin/gfortran-8
# LDFLAGS="-L/usr/local/clang-7/lib -L/usr/local/lib"
# CXX=/usr/local/clang-7/bin/clang++
# FC=$F77
# R_LD_LIBRARY_PATH=/usr/local/clang-7/lib:/usr/local/lib
./configure --prefix=/usr/local/R --enable-R-shlib \
--enable-BLAS-shlib --enable-memory-profiling \
--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig \
DYLD_FALLBACK_LIBRARY_PATH=/usr/local/clang-7/lib:/usr/local/lib
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.