After updating to Mavericks, I am unable to use the inline package (calling the 
cxxfunction using C++ code examples), or compile package such as Rcpp.  
Originally, I thought this was a problem specific to Rcpp only, it I think it 
is more general.
I have followed steps such as changing  the Makeconf file in Resources/etc by 
using (as discussed in the October threads here and on SO)
CC = clang and CXX = clang++
but this has not been enough to solve the problem. 
If I try and install Rcpp from source, I get this:

* installing to library 
‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I../inst/include/ -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c 
Date.cpp -o Date.o
In file included from Date.cpp:29:
In file included from ../inst/include/Rcpp/Datetime.h:25:
In file included from ../inst/include/RcppCommon.h:28:
../inst/include/Rcpp/platform/compiler.h:93:10: fatal error: 'cmath' file not
      found
#include <cmath>
         ^
1 error generated.
make: *** [Date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp’
* restoring previous 
‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp’
Similarly, if I try to install RInline (which I realise depends on Rcpp; and 
Rcpp is in my R library in binary form), I get errors:
* installing *source* package ‘RInside’ ...** package ‘RInside’ successfully 
unpacked and MD5 sums checked** 
libs/Library/Frameworks/R.framework/Resources/bin/Rscript 
tools/RInsideAutoloads.r > 
RInsideAutoloads.h/Library/Frameworks/R.framework/Resources/bin/Rscript 
tools/RInsideEnvVars.r   > RInsideEnvVars.hclang++ 
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. 
-I../inst/include/ -I/usr/local/include 
-I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" 
  -fPIC  -mtune=core2 -g -O2  -c MemBuf.cpp -o MemBuf.oMemBuf.cpp:23:10: fatal 
error: 'iostream' file not found#include <iostream>         ^1 error 
generated.make: *** [MemBuf.o] Error 1ERROR: compilation failed for package 
‘RInside’



















* removing 
‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside’
I am using R 3.0.2 and have Xcode 5.0.1 installed.
If my understanding is on the right track, how do I get the clang compiler to 
see the libraries like cmath, iostream?
Any help on how to resolve this problem would be much appreciated.
Thanks in advance
Clay

 

                                          
        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to