尽管成功R-3.1.2
使用英特尔编译器套件 ver.2015.0.077 进行了编译,包括MKL
在我运行 Yosemite 的 2014 年末 MacBook Pro(此处概述)上,但我无法Rcpp
通过R
为 Mavericks预打包的二进制文件。现在,我想加快速度,特别是使用OpenMP
似乎与默认不兼容的clang
. 我知道该OpenMP/clang
项目,但似乎在优胜美地上的安装仍然很狡猾。
除了Warning in strptime
在make -j8
. make install
_ R
_ 尽管如此,该Rcpp
软件包还是失败了:
> install.packages("Rcpp")
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'Asia/Kolkata'
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'GMT'
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'America/New_York'
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
Warning in as.POSIXlt.POSIXct(x, tz) :
unknown timezone 'America/New_York'
** libs
icpc -I/Users/username/R-3.1.2/include -DNDEBUG -I../inst/include/ -I/sw/include -I/usr/local/include -fPIC -g -O3 -c Date.cpp -o Date.o
In file included from ../inst/include/Rcpp/Vector.h(69),
from ../inst/include/Rcpp.h(38),
from Date.cpp(31):
../inst/include/Rcpp/vector/swap.h(35): error: "swap" is not a class or function template name in the current scope
RCPP_GENERATE_SWAP(generic_proxy,VECSXP)
^
In file included from ../inst/include/Rcpp/Vector.h(69),
from ../inst/include/Rcpp.h(38),
from Date.cpp(31):
../inst/include/Rcpp/vector/swap.h(36): error: "swap" is not a class or function template name in the current scope
RCPP_GENERATE_SWAP(generic_proxy,EXPRSXP)
^
In file included from ../inst/include/Rcpp/Vector.h(69),
from ../inst/include/Rcpp.h(38),
from Date.cpp(31):
../inst/include/Rcpp/vector/swap.h(37): error: "swap" is not a class or function template name in the current scope
RCPP_GENERATE_SWAP(string_proxy,STRSXP)
^
Date.cpp(562): warning #437: reference to local variable of enclosing function is not allowed
2 * sizeof *sp + 4 * TZ_MAX_TIMES];
^
compilation aborted for Date.cpp (code 2)
make: *** [Date.o] Error 2
ERROR: compilation failed for package ‘Rcpp’
有没有办法来解决这个问题?或者,如何切换编译器以便能够Rcpp
在我的 MacBook 上调用“OpenMP”?