Skip to content
Prev 11194 / 15075 Next

How to get a Fortran compiler compatible to Xcode?

Hi Marius,

I've had success compiling (the latest versions of) R from source
using Apple's command line tools (shipped with Xcode), alongside
gfortran 4.8.2 installed from here (as hosted by Simon Urbanek):

    http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2

Alternatively, (and what I tend to do by default on OS X), you can get
the latest release of `gfortran` using one of the custom Apple
'package managers', e.g. with homebrew (http://brew.sh/), you can use

    brew install gcc

which will get you an up-to-date copy of `gcc` (not really needed
since you'll have Apple clang), but also `gfortran` (which is needed
as it's no longer shipped with the Apple command line tools).

After this, as long as `gfortran` is on your PATH (e.g. by symlinking
the binary into /usr/local/bin), you should be good to go for building
R from source -- it will then be able to automatically discover where
the Fortran libraries live, and so on.

Kevin
On Sun, May 10, 2015 at 11:00 AM, peter dalgaard <pdalgd at gmail.com> wrote: