[Rcpp-devel] Help needed for clang++ testing on OS X and Linux
Dirk Eddelbuettel
edd at debian.org
Mon Oct 8 00:20:39 CEST 2012
On 8 October 2012 at 00:47, Theodore Lytras wrote:
| Στις Κυρ 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++.
You should see it in what is printed on the screen when you do R CMD INSTALL ...
| 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.
A+ for effort. Thanks. I also build with clang here which happens to produce
_much_ nicer error message. I'd recommend playing with ~/.R/Makevars to that
you can switch more easily.
| My system is Debian Sid with clang/llvm version 3.1.
Brave man :) I usually stay with Debian testing.
Thanks for the report back, Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list