-1

I have just updated R to the latest version on my iMac.

When trying to source an Rcpp file via sourceCpp() from RStudio, I get the 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 -lquadmath
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sourceCpp_3.so] Error 1
clang++  -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include   -    I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/i  nclude" -I"/Users/jarrett/Desktop/HAC simulation" -I/usr/local/include   -fPIC  -Wall -g -O2  -c accumulate.cpp -o accumulate.o
clang++ -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 sourceCpp_3.so accumulate.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
Error in sourceCpp("accumulate.cpp") : 
Error 1 occurred building shared library.

Any thoughts on how to proceed with resolving the issue?

Brian O'Donnell
  • 1,836
  • 19
  • 29
compbiostats
  • 909
  • 7
  • 22

1 Answers1

0

Check out the following article which seems to match the problems you have posted and presents a solution: Rcpp, RcppArmadillo and OS X Mavericks "-lgfortran" and "-lquadmath" error

Brian O'Donnell
  • 1,836
  • 19
  • 29