rgccgnu-makercpprhel

How to configure R 4.3 to run on RHEL 8?


While trying to install the Rcpp package in R on our RHEL 8 server, I get this series of errors/warnings:

make: *** No rule to make target 'compilers'.  Stop.
Warning in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), :
  running command 'make -f 'Makevars' -f '/usr/lib64/R/etc/Makeconf' -f '/usr/share/R/make/shlib.mk' compilers' had status 2
Error in if (nzchar(cxx)) { : argument is of length zero

After some experimenting, I realized other packages (haven, xml2) are throwing the same error when I try to install in R.

Based on extensive internet searches, my best guess is that my installed R version (4.3.2) is not happy with the version of gcc/g++ (8.5.0 20210514) that comes installed on RHEL. Or possibly with the version of make? (GNU Make 4.2.1)

Can anyone confirm my suspicions? (Or point me in another direction?)

If I need to run a newer version of compilation tools on RHEL, can anyone point me to guidance for how to configure RHEL to do that? Ideally, I am looking for a system-wide configuration solution so other R users on the RHEL server can compile packages on their own (ie, not requiring every user to have a custom ~/.R/Makevars). I'd prefer to configure R or the system so users don't have to mess with environment variables or other Linux-command-line-level settings.


Solution

  • We solved this by upgrading R on our RHEL 8 server from 4.3 to R 4.3.2. Apparently something with R 4.3 was breaking compiling packages on our server.