Building R Packages using Alternate GCC

Viewed 14632

The systems I work with have GCC 4.5 (experimental) in /usr/local/bin/gcc which has proven to be problematic for some R packages. I would like to instead use system GCC in /usr/bin/gcc.

I have tried setting CC and CXX in the Bash configuration files (.bashrc, .bash_profile etc.) as well as on the command line, but although Bash recognizes the change, R does not.

How can I get R to use the version of GCC in /usr/bin instead of the one in /usr/local/bin/?

4 Answers

Look at configure.args part of ?install.packages and compare this to ./configure --help on e.g. the r source tree.

You can also, from bash, CC=clang R CMD INSTALL /path/to/package/source.

HTH

Related