[Rcpp-devel] Help needed for clang++ testing on OS X and Linux

Theodore Lytras thlytras at gmail.com
Sun Oct 7 23:47:21 CEST 2012

Στις Κυρ 07 Οκτ 2012, ο/η Dirk Eddelbuettel έγραψε:
> On 7 October 2012 at 12:50, Davor Cubranic wrote:
> | On 12-10-06 11:14 AM, Dirk Eddelbuettel wrote:
> | > But we need to hear from OS X users with different clang++ versions,
> | > and possibly clang++ users on other Linux setups --- particularly with
> | > clang++ 2.* and 3.1.
> | > 
> | > The test is easy: just do 'R CMD INSTALL Rcpp_0.9.14.2.tar.gz' and it
> | > will either build and exceptions.cpp finds its headers, or not.  I
> | > would appreciate tests and reports back here greatly ... and I don't
> | > really want to mess with five more uploads.
> | 
> | But isnt' it going to use whatever C++ R was configured to use?
> Yes. If no CC and CXX is set, you get what you had a R's compile time.
> But if you set CC and CXX to other values as eg per (here still commented
> out)
>   edd at max:~$ tail -4 .R/Makevars
>   #CXX=clang++
>   #CC=clang
>   #CXXFLAGS=-Wall -O3
>   #CdFLAGS=-Wall -O3
>   edd at max:~$
> then those are used.  As clang/clang++ are in fact interoperable with
> gcc/g++, this is a good option (eg for better error messages).

OK I exported these variables and tried building Rcpp. I don't know if it used 
clang++ behind the scenes, but it appeared to compile with g++.

To be sure, I downloaded and compiled R from source with clang++, and built 
Rcpp on top of that installation. It compiled successfully with clang++. 
So it works for me too.

My system is Debian Sid with clang/llvm version 3.1.


More information about the Rcpp-devel mailing list