[R-SIG-Mac] Installing source package/altering fortran location

Mick Jordan mick.jordan at oracle.com
Wed Mar 16 20:44:45 CET 2016


I'm trying to install a source package (therefore needing compilation) 
under the R-3.2.4 Mac binary release. I happen to be using fortran 4.9.2 
on this machine and 
/Library/Frameworks/R.framework/Resources/etc/Makeconf is bound to 4.8. 
I followed the instructions in R Installation and Administration to 
change this with no success so far. FWIW it's the actuar package I am 
trying to install.

First the .R/Makevars-R_PLATFORM file had no effect as seen from the 
package install log. Neither did setting R_MAKEVARS_USER. So I edited 
/Library/Frameworks/R.framework/Resources/etc/Makeconf. It now looks 
right but clang still cannot find lgfortran:

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 
actuar.so beta.o burr.o chisq.o dpq.o dpqphtype.o exp.o gamma.o 
genbeta.o genpareto.o hierarc.o init.o invburr.o invexp.o invgamma.o 
invgauss.o invparalogis.o invpareto.o invtrgamma.o invweibull.o lgamma.o 
llogis.o lnorm.o names.o normal.o panjer.o paralogis.o pareto.o 
pareto1.o phtype.o random.o randomphtype.o trbeta.o trgamma.o unif.o 
util.o weibull.o -L/Library/Frameworks/R.framework/Resources/lib 
-lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas 
-L/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2 
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9 -lgfortran -lquadmath -lm 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
make: *** [actuar.so] Error 1
ERROR: compilation failed for package ‘actuar’

bash-3.2$ sudo find /usr -name 'libgfortran*'
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/i386/libgfortranbegin.a
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/libgfortranbegin.a
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/i386/libgfortran.3.dylib
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/i386/libgfortran.a
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/i386/libgfortran.dylib
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/i386/libgfortran.spec
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/libgfortran.3.dylib
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/libgfortran.a
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/libgfortran.dylib
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/libgfortran.spec
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin13/4.8.2/i386/libgfortranbegin.a
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin13/4.8.2/i386/libgfortranbegin.la
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin13/4.8.2/libgfortranbegin.a
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin13/4.8.2/libgfortranbegin.la
/usr/local/gfortran/lib/i386/libgfortran.3.dylib
/usr/local/gfortran/lib/i386/libgfortran.a
/usr/local/gfortran/lib/i386/libgfortran.dylib
/usr/local/gfortran/lib/i386/libgfortran.la
/usr/local/gfortran/lib/i386/libgfortran.spec
/usr/local/gfortran/lib/libgfortran.3.dylib
/usr/local/gfortran/lib/libgfortran.a
/usr/local/gfortran/lib/libgfortran.dylib
/usr/local/gfortran/lib/libgfortran.la
/usr/local/gfortran/lib/libgfortran.spec



More information about the R-SIG-Mac mailing list