I have a question about how one can modify or override the compilers that R uses for package installations? Or if perhaps this configuration is in some editable file somewhere.
Initially I built the version of R 2.15.1 on Solaris SPARC (virtual T4), but found out the build was done as 32 bit. After some research, I found that the pre-compiled GCC version I had only allowed for 32 bit. I wanted 64 bit. Therefore I ended up download the SunStudio compilers (12.1 version) and was able to export the compiler commands (per the R manual) and get a 64 bit version running. The problem I have now is that I am trying to install the GBM package from CRAN (and from source as well.) What I find is that something keeps trying to run "c++" during compilation. Since I only have the SUN compiler the file is named "CC" not "c++". How do I override this? I've tried the following with no success: 1. EXPORT CXX to point to my CC compiler (eg export CXX='/opt/SUNWspro/bin/CC') 2. Create an alias to c++ (eg alias c++='/opt/SUNWspro/bin/CC') 3. I even tried to create a symlink for g++: ln -s /opt/SUNWspro/bin/CC c++ However none of these seem to work and I get the following error: ># /usr/local/bin/R CMD INSTALL /export/home/downloads> * installing to library '/usr/local/lib/R/library' * installing *source* package 'gbm' ... ** package 'gbm' successfully unpacked and MD5 sums checked ** libs c++ -m64 -I/usr/local/lib/R/include -DNDEBUG -I/usr/local/include -KPIC -c adaboost.cpp -o adaboost.o bash: c++: command not found *** Error code 127 make: Fatal error: Command failed for target `adaboost.o' ERROR: compilation failed for package 'gbm' * removing '/usr/local/lib/R/library/gbm' Is there some environment variable or config file I can temporarily override this setting? My first thought was that I can try to build GCC from source, but I've spent two days trying to get that to work no success. In addition, trying to download the version from sun-freeware did not appear to work as well. Therefore that's why I am looking at this direction to see if there is a way I can get this package installed? I will note that if I manually compile the GBM source using "CC" it compiles fine. I just think something in R is overriding this. I tried installing from both the CRAN download as well as GBM source and get the same error. I don't see any configuration in the GBM tar ball so I assume that there is some standard packaging or configuration that R has when developing packages (have not fully read through those docs yet.) Any thoughts or pointers? Thanks in advance. Anthony [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.