Have you seen this note (from https://cran.r-project.org/bin/macosx/)?
Important: this release uses Clang 7.0.0 and GNU Fortran 6.1, neither of which is supplied by Apple. If you wish to compile R packages from sources, you will need to download and install those tools - see the tools directory. Peter Carbonetto Computational Scientist, Statistics & Genetics, Research Computing Center & Dept. of Human Genetics University of Chicago On Fri, May 3, 2019 at 9:36 AM Maxime Turgeon <maxime.turg...@mail.mcgill.ca> wrote: > Hi Spencer, > > I remember having a similar error a few years ago when trying to compile R > (and its recommended packages, e.g. mgcv) from source. I was using clang as > a compiler (this is what Hadley recommends in his book "R packages"), and I > solved the issue by going back to g++. This can be done in your > ".R/Makevars" file. Alternatively, you could switch to a version of clang > that supports OpenMP. > > Best, > Max > ________________________________ > From: R-package-devel <r-package-devel-boun...@r-project.org> on behalf > of Spencer Graves <spencer.gra...@effectivedefense.org> > Sent: May 3, 2019 10:18 AM > To: List r-package-devel > Subject: [R-pkg-devel] clang: error: unsupported option '-fopenmp' > > Hello, All: > > > I'm getting "clang: error: unsupported option '-fopenmp'" when > trying to build "https://github.com/helske/bssm" under macOS 10.14.14 > with R 3.6.0; see below. > > > What do you suggest? > > > Thanks, > Spencer Graves > > > p.s. I assume I have to install compiler(s). However, I've so far been > unable to find instructions that are sufficiently current to convince me > I might not do more harm than good following them. > > > > R CMD build bssm > * checking for file ‘bssm/DESCRIPTION’ ... OK > * preparing ‘bssm’: > * checking DESCRIPTION meta-information ... OK > * cleaning src > * installing the package to build vignettes > ----------------------------------- > * installing *source* package ‘bssm’ ... > ** using staged installation > ** libs > clang++ -std=gnu++11 > -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG > > -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" > > -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" > > -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" > > -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ramcmc/include" > > -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sitmo/include" > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk > -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c R_approx.cpp -o > R_approx.o > clang: error: unsupported option '-fopenmp' > make: *** [R_approx.o] Error 1 > ERROR: compilation failed for package ‘bssm’ > * removing > > ‘/private/var/folders/mh/mrm_14nx19g13lsnj9zmvwjr0000gn/T/RtmppA2gBg/Rinst24427c5cbfeb/bssm’ > ----------------------------------- > ERROR: package installation failed > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel