I'm trying to install the package, rugarch, for a class.
I am using MacOS Mojave 10.14.6 (18G3020).
I am using RStudio: R version 3.5.1 (2018-07-02) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Most of the forums I searched on report the need for Xquartz, but I already have installed it. I also and searched through https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos-before-r-3.6.0/
Wondering what to try next. I'm thinking the problem has to do with my file path, which may have been mucked up from installing both clang4 and clang6?...... Error message below involves a compiler issue: 'make: *** [RcppArmadillo.o] Error 127'. Thanks for your help!
> install.packages('rugarch')
also installing the dependency ‘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
trying URL 'https://mran.microsoft.com/snapshot/2018-08-01/src/contrib/rugarch_1.4-0.tar.gz'
Content type 'application/octet-stream' length 2936961 bytes (2.8 MB)
==================================================
downloaded 2.8 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
checking for macOS... configure: WARNING: Compiler self-identifies as being compliant with GNUC extensions but is not g++.
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
ERROR: dependency ‘RcppArmadillo’ is not available for package ‘rugarch’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5.1-MRO/Resources/library/rugarch’
Warning in install.packages :
installation of package ‘rugarch’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/bm/wg7t4j8j3tz_88yfzyfdkkhm0000gn/T/RtmpvkSK0v/downloaded_packages’