Skip to content
Prev 3228 / 10988 Next

[Rcpp-devel] g++-llvm still doesn't like RcppArmadillo?

On Dec 26, 2011, at 1:11 AM, Dirk Eddelbuettel wrote:

            
The attachment is the script I used to build R on my Mac. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: R-build-mac
Type: application/octet-stream
Size: 750 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111226/879e9e22/attachment-0001.obj>
-------------- next part --------------

I build it on Mac OS X 10.7.2, Xcode 4.2.1.
On Mac the default "cc" is llvm-gcc and and so does "gcc", which is no longer the real gcc but a symbolic link to llvm-gcc. The situation for c++ is similar.
Clang/Clang++ is now the default on Xcode (at least what I heard, I am not a fan of the IDE thing). Anyway, the build script is very straight forward as you can see. I am not sure if it will work on Linux.
Interesting. I build R with clang/clang++ as said. And Rcpp, RInside all build without a problem with "install.packages", which means they are build with clang/clang++. I remember there are some problems with old clang++. If my memory is accountable, I believe building R and Rcpp with clang/clang++ was only made possible after I upgrade to Xcode 4.2, which shipped llvm-3.0 toolchain. Clang has been of good shape since 2.8. But for clang++, my memory is that it was not ready for productive use until recent 3.0 version in many cases. However, clang++ 3.0 does build a lot of things successfully, most notably I can use it with many of Boost libraries now, which clang++ 2.9 failed miserably.
clang++ can build RcppEigen but not RcppArmadillo, same error as Davor's.
CRAN R on Mac OS X insist on compatibility with Leopard and x86/x86-64/ppc. And I agree that they have a good reason for that. However, though not available on CRAN, many packages can be build natively from source.