Binaries available for gfortran
This page gathers links to all unofficial gfortran binary packages people regularly build, based on the current development gfortran source code. Currently available are: Windows, MacOS and GNU/Linux. Otherwise you can build GNU Fortran from source.
Note: There do not exist any official FSF/GNU/GCC binary builds (only source packages). Most of the builds below come from gfortran maintainers but not all.
Windows
Three kinds of packages are provided for Windows users: cygwin (for cygwin users) and mingw/"native Windows" (for people who do not use cygwin). If in doubt, or if you don't know what cygwin and mingw are, the package for you is the "native Windows" package!
Win64 build: The Mingw-w64 project has regularly updated snapshots of compilers generating 64-bit Windows executables. They provide three compilers, one running on Windows (it works on both 32-bit and 64-bit Windows), one on 32-bit Cygwin and one on 32-bit Linux.
mingw build, or "native Windows": download the latest installer (dated 2009-04-21). It's very easy to use (basically, just click on the OK buttons), but some detailed info is also available. These binaries are known to work on Windows XP, and known to fail on Windows 98. They probably work for versions above 98.
Official MinGW builds (only releases), last seen was 4.4.0 (2009-06-22)
Cygwin build: Download the latest here (2009-11-19). This should work with any i686 compatible processor. Instructions are on this page.
- NOTE: The GMP and MPFR packages must be installed for gfortran to work.
MinGW 32/64bit builds by www.Equation.com (builds were announced at comp.lang.fortran and are said to work well)
Note: The official MinGW and Cygwin project sites also offer GCC/gfortran builds - though they are older (4.3 in November 2008); see MinGW and Cygwin (GCC4 packages).
MacOS
gfortran is available as a nice Apple-style installer for MacOS X Tiger (10.4) and Leopard (10.5) users. It is easy to install. Detailed instructions are here. Both PowerPC and Intel compilers are provided:
There's also an Xcode plugin for gfortran which uses the binaries compiled by Gaurav Khanna.
GNU/Linux
Most Linux distributions offer gfortran packages (including 4.3.x or 4.4.x) For those of you who wish to try the latest gfortran (under development), we offer regular builds for the 32bit x86 (ia32, i386, x86-32) and the 64bit x86-64 (AMD64, Intel em64t, Intel64) Linux systems.
32-bit processors (i686):
Download from here (4.5, stripped static build)
64-bit AMD-compatible processors (x86_64): Download page. Direct links:
Building from Source
First obtain the source code either via subversion or as TAR-Ball. You can then follow the instructions, but in a nutshell you do: create a new directory, e.g. ../gcc-build, go there and run ../gcc/configure --prefix=$HOME/gcc-trunk --enable-languages=c,fortran. You may want to add more languages, --enable-checking=release (esp. useful for compile-time tests as it disables some consistency checks in the compile), --disable-bootstrap (builds faster, but disables some consistency checks). After make and make install you have built your own GCC.