I got past the cross compiling error by following Davis, an RStudio employee: Can't install most packages on Mac
1. `xcode-select --install`
2. Run `installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /` which has been related to a number of strange issues (including one with rcpp autocomplete and with xml2)
However, my error remains
> install.packages('RcppArmadillo')
trying URL 'https://mran.microsoft.com/snapshot/2018-08-01/src/contrib/RcppArmadillo_0.8.600.0.0.tar.gz'
Content type 'application/octet-stream' length 1356993 bytes (1.3 MB)
==================================================
downloaded 1.3 MB
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
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... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C++ preprocessor... clang++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether clang++ accepts -g... (cached) yes
checking whether g++ version is sufficient... almost
configure: WARNING: Compiler self-identifies as being compliant with GNUC extensions but is not g++.
checking for macOS... found
checking for macOS Apple compiler... not found
checking for clang compiler... found
checking for OpenMP compatible version of clang... found and suitable
checking LAPACK_LIBS... system LAPACK found
checking for OpenMP... found and suitable
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
/usr/local/clang4/bin/clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5.1-MRO/Resources/library/Rcpp/include" -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -I../inst/include -fopenmp -fPIC -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -c RcppArmadillo.cpp -o RcppArmadillo.o
/bin/sh: /usr/local/clang4/bin/clang++: No such file or directory
make: *** [RcppArmadillo.o] Error 127
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5.1-MRO/Resources/library/RcppArmadillo’
Warning in install.packages :
installation of package ‘RcppArmadillo’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/bm/wg7t4j8j3tz_88yfzyfdkkhm0000gn/T/RtmpkTl7tz/downloaded_packages’