Search the entire project
This project's trackers
This project's forums
This project's news
R-Forge Site Admin
[#1343] Installing binary packages with Fortran code in MacOS
Jari Oksanen (
Installing binary packages with Fortran code in MacOS
Dear R-Forge maintainers,
I have been informed recently that installation of binary package from R-Forge fails in MacOS. I don't have this problem, but other users have. This is the error they get when they try to load the package after seemingly successful installation:
Loading required package: vegan
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/vegan/libs/x86_64/vegan.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/vegan/libs/x86_64/vegan.so, 6): Library not loaded: /usr/local/lib/libgfortran.2.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/vegan/libs/x86_64/vegan.so
Reason: image not found
The problem seems to missing Fortran runtime library.
This issue seems to be discussed in R-MacOSX-FAQ section 5.4 which tells how to change the the package.so file to point to a fortran runtime library in the MacOSX R installation instead of the runtime used to build the package (and they say they do this in CRAN). Could it be possible to get this operation also in R-Forge so that users without similar Fortran compilers could be able to use R-Forge binaries.
URL of the appropriate section in R-MacOSX-FAQ is
Best wishes, Jari Oksanen
Date: 2012-03-07 23:08
I'm not sure why this bug is closed...
In any case, I read elsewhere that a work-around is to restart R and then try loading the library. That worked for me.
Date: 2012-03-02 01:58
Has any progress been made on making a good Mac binary for this package?
When I try to load the library in R, I get an unhelpful error message:
Error in get(Info[i, 1], envir = env) :
internal error -3 in R_decompress1
When I tried the instructions in the MacOSX-FAQ (mentioned in this thread to fix the problem), I got the error message using the Unix command line:
$ for lib in `ls lme4/libs/*/*.so`; do
install_name_tool -change /usr/local/lib/libgfortran.2.dylib \
install_name_tool: can't map file: lme4/libs/i386/lme4.so.dSYM (Invalid argument)
install_name_tool: can't map file: lme4/libs/ppc/lme4.so.dSYM (Invalid argument)
install_name_tool: can't map file: lme4/libs/x86_64/lme4.so.dSYM (Invalid argument)
Or should I be doing something else?
I'm using 2.14.2, on Mac OSX 10.6.8 on Intel Core i5
Many thanks in advance
Date: 2011-12-19 14:53
thanks for this note.
this is currently in testing stage. Will go online later today and hopefully fixes this issue.
Date: 2011-12-18 15:52
I have had several user queries of vegan binaries failing in Mac. In one case I successfully followd instructions in
-- so I can confirm that this works-
Could it be possible to have this kind of fixing of binary packages also in R-Forge so that the MacOS binaried offerred in R-Forge would work in Macs without Fortran installation?
Cheers, Jari Oksanen