Skip to content
Prev 3833 / 12125 Next

[R-pkg-devel] clang: error: unsupported option '-fopenmp'

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