ERROR: compilation failed for package ‘rlang’

Hello,

I am trying to compile 'rlang' in order to get 'ggplot2' but get a compilation error during the process. Here is the error and the last command that is used before it. Any suggestions on how to fix it?

e -pipe -c version.c -o version.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o rlang.so capture.o export.o internal.o lib.o version.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rlang.so] Error 1
ERROR: compilation failed for package ‘rlang’

compilation can be tricky. Is there a reason to compile from source yourself than use a compiled binary ?
for compilation help it will be important to know things like your Operating System.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

I think rlang 0.4.5 has been compiled for 10.1+
and can be gotten here: https://cran.r-project.org/bin/macosx/el-capitan/contrib/3.6/

I am running on Mac os mojave 10.14.6.

If i try install.packages("ggplot") I get the following:

  There are binary versions available but the source versions are later:
        binary source needs_compilation
rlang    0.1.6  0.4.5              TRUE
ggplot2  2.2.1  3.3.0             FALSE

If i choose no then I get the following error

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.1.6 is being loaded, but >= 0.3.0 is required

So I need 0.3.0 in order to get 'ggplot2'. I also tried using a link to install 'rlang' 0.3.0 but get a message it is not available (for R version 3.3.1) which is the version I need to be using.

The precompiled binaries are available only for the latest R versions, if for some reason you need to stick with R 3.3.1 you are going to have to compile, I suspect that you have y an incompatible clang version, check the oficial CRAN documentation and check that you have the proper version installed in your system.
https://cran.r-project.org/bin/macosx/tools/

I do need to stick with R 3.3.1. Also, had already download clang 7.0 and I believe that is the one being used and I get that error. I'm not familiar with compiling so I feel lost and I'm not sure how to tackle this problem. Should I attempt downloading clang 6 and/or 8 and try compiling with them?