From simon.urbanek at r-project.org  Tue Jan 15 04:41:39 2013
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Mon, 14 Jan 2013 22:41:39 -0500
Subject: [Rd] Mac libgfortran.2.dylib
In-Reply-To: <CAB9w6XzcJM495Rr3q_eFJrUrgArZLeqPMAG3bLczO8PWypPpmA@mail.gmail.com>
References: <CAB9w6XzcJM495Rr3q_eFJrUrgArZLeqPMAG3bLczO8PWypPpmA@mail.gmail.com>
Message-ID: <8332588D-DC47-48A2-AB24-51348BBE700F@r-project.org>

Daniel,

CRAN only post-processes libraries (dylib/jnilib) and dynamic objects (.so) in packages. However, you seem to have executables (.exe -- really? this not Windows :P) inside your package and those do not get processed. I can add .exe to the list of processed files - that should help in your case although it's a bit unusual...

Cheers,
Simon


On Jan 14, 2013, at 9:50 PM, Daniel Fuka wrote:

> Howdy,
> 
> 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
> libraries.
> 
> Example Code on OSX/Mac:
> install.packages("SWATmodel",repos="http://cran.r-project.org")
> library("SWATmodel")
> testSWAT2005()
> 
> dyld: Library not loaded: /usr/local/lib/libgfortran.2.dylib
>  Referenced from:
> /Library/Frameworks/R.framework/Versions/2.15/Resources/library/SWATmodel/libs/x86_64/rswat2005.exe
>  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
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



[Rd] Mac libgfortran.2.dylib
Simon Urbanek