[Rd] Mac libgfortran.2.dylib

Daniel Fuka drf28 at cornell.edu
Tue Jan 15 03:50:44 CET 2013


I was under the impression that CRAN took care of automagically making
sure the CRAN compiled fortran was linked to the fortran libs
distributed in R binaries. Today was the first day I was on a mac
without Xcode and found my fortran based package has issues, which
appears only on the mac. Do we need to have a special compile library
path set in the Makefile to direct CRAN to the R distributed fortram
libraries? My case may be semi-unique as I am having CRAN compile
executables that are system calls from my R scripts rather than

Example Code on OSX/Mac:

dyld: Library not loaded: /usr/local/lib/libgfortran.2.dylib
  Referenced from:
  Reason: image not found

I have seen many of the posts on this, but those appear to be centered
around R-Forge or other distributed compiles, and the Mac FAQ appears
to say this is taken care of with CRAN distributed packages:
"...CRAN we make an effort to modify the binaries such that they work
even without the tools they have been compiled with. There are several
possible approaches, but since R itself already uses the same Fortran,
we ship a copy of the Fortran libraries inside R and modify packages
such that they use it instead of the one from developer tools."

Thanks for your time on my behalf,
Daniel Fuka

More information about the R-devel mailing list