Rcpp used to work on R, but no longer, and I do not know why.
library(Rcpp)
evalCpp("1+1")
A long list of errors is returned, beginning with
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 1 occurred building shared library.
continuing with
/usr/local/clang7/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/usr/local/clang7/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/usr/local/clang7/include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/usr/local/include/math.h:749:12: note: 'finite' declared here
extern int finite(double)
^
and ending with
20 errors generated.
make: *** [file35f5fb135d1.o] Error 1
I have installed command line tools and Xcode multiple times. I have also tried the "Coatless Professor" solution at https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos-before-r-4.0.0/
, (as well as other multiple solutions), but to no avail.
I am reluctant to upgrade to R 4.0 because a key piece of software will stop working in the newer R environment.
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.7
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RcppArmadillo_0.10.1.0.0 Rcpp_1.0.5
loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3
I would be most grateful for any advice!