Dear all, avec a Mac update today I obtained the following error while
compiling a package of mine using Rcpp :
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/Rcpp/internal/Exporter.h:31:30:
error: reference member 't' binds to a temporary object whose lifetime would
be shorter than the lifetime of the constructed object
Exporter( SEXP x ) : t(x){}
I’m pretty sure this has something to do with Mac, I updated the Command line
tool, I manage to compile simple examples with sourceRcpp (trying to follow
instructions here
http://thecoatlessprofessor.com/programming/r-compiler-tools-for-rcpp-on-macos/
<http://thecoatlessprofessor.com/programming/r-compiler-tools-for-rcpp-on-macos/>)
I’m still trying to reproduce my error on a simple example.
I have R 3.6 and clang7 installed.
Another strange point (might be connected) is that when I try to install
RcppArmadillo from source (as suggested in link above with
install.packages("RcppArmadillo", type = "source »)) it gives something about
cross compiling:
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/private/var/folders/zt/7cz1y9md79l_h08bbqymt4w9z8xlw7/T/Rtmpgi7WQZ/R.INSTALL4f4110aa3f/RcppArmadillo':
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: configuration failed for package ‘RcppArmadillo’
Thanks in advance for your help
Regards
Robin
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel