Hi,
Been trying for some time to install RStan in Mac, operating system is El Capitan. Here is my output:
-------------
> install.packages("rstan", dependencies = TRUE)
also installing the dependency ‘RcppEigen’
There is a binary version available but the source
version is later:
binary source needs_compilation
RcppEigen 0.3.2.7.0 0.3.2.8.0 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
[it then installs]
The downloaded binary packages are in
/var/folders/5j/j2glq8k55p904gq6r9858rmr0000gn/T//RtmpgzM5n3/downloaded_packages
installing the source package ‘RcppEigen’
[It then installs..]
* installing *source* package ‘RcppEigen’ ...
** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
** libs
clang++ -arch x86_64 -ftemplate-depth-256 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I../inst/include -fPIC -O3 -Wno-unused-variable -Wno-unused-function -Wno-unused-local-typedefs -c RcppEigen.cpp -o RcppEigen.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I../inst/include -fPIC -O3 -Wno-unused-variable -Wno-unused-function -Wno-unused-local-typedefs -c RcppExports.cpp -o RcppExports.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I../inst/include -fPIC -O3 -Wno-unused-variable -Wno-unused-function -Wno-unused-local-typedefs -c fastLm.cpp -o fastLm.o
clang++ -arch x86_64 -ftemplate-depth-256 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lquadmath
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/RcppEigen’
Warning in install.packages :
installation of package ‘RcppEigen’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/5j/j2glq8k55p904gq6r9858rmr0000gn/T/RtmpgzM5n3/downloaded_packages’
-----------
I tried various things after looking at online forums but not much directly related to my issue (and I am no computer wizz).
Closest thing to my issue seems to be this:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16469#c2 (also since my Latex didnt work and I had to install a quick fix for that too).
I have latest version of xQuartz, R, and R Studio. Installed Xcode (latest version). Tried uninstalling and reinstalling all of these but to no avail. Also tried installing EMacs. I have installed command line tools (
http://stackoverflow.com/questions/32893412/command-line-tools-not-working-os-x-el-capitan). Not sure if these things made the issue better or worse (probably worse).
Many thanks for your help! Been struggling with this for a day and a half now.
Ilan Strauss