I am trying to install the package glmnet. I get this error:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
I installed homebrew. Then fortran through gcc to get this far. I have found many help links that say similar things like this:
you will need to change your compile statements in
~/.R/Makevars
to gcc using:VER=-5.3.0 CC=gcc$(VER) CXX=g++$(VER) CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion FLIBS=-L/usr/local/Cellar/gcc/5.3.0/lib/gcc/5
I can't find ~/.R/Makevars
on my Mac!! I have macOS Catalina 10.15.1.
I have found two Makevars files. They are linked to Rcpp and have nothing at all similar to the code listed above.
Sorry for this seemingly basic questions, but two hours in and I can't find anything related to ~/.R/Makevars
.
Here is what the one file I did find states:
## With R 3.1.0 or later, you can uncomment the following line to tell R to
## enable compilation with C++11 (where available)
##
## Also, OpenMP support in Armadillo prefers C++11 support. However, for wider
## availability of the package we do not yet enforce this here. It is however
## recommended for client packages to set it.
##
## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
## support within Armadillo prefers / requires it
CXX_STD = CXX11
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
But that was linked to RcppArmadillo.
I've read these (any many more) many times over: