Skip to content
Prev 11190 / 15075 Next

How to get a Fortran compiler compatible to Xcode?

I think you already have one, you just need to set flags properly - the typical problem is that, with default settings, you get C compiled for 64 bits and Fortran for 32 bit. 

I have this:

$ more config.site
r_arch=${r_arch:=x86_64}
CC="gcc -arch $r_arch"
CXX="g++ -arch $r_arch"
F77="gfortran -arch $r_arch"
FC="gfortran -arch $r_arch"
OBJC="gcc -arch $r_arch"
with_blas="-framework vecLib"
with_lapack=yes
CURL_CONFIG=/usr/bin/curl-config

Notice also, that with the newer sources, you need to install some stuff from http://r.research.att.com/libs/ : pcre, xz, texinfo, plus maybe some more that I have forgotten.