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.
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
If in doubt, or if you don't know what Cygwin and MinGW are, the package for you is the MinGW ("native Windows") package!
MinGW for Win64: The Mingw-w64 project has regularly updated snapshots of compilers generating 64-bit Windows executables. They provides several compilers, which run on Windows (32-bit and 64-bit Windows), Cygwin, Linux, and Darwin/MacOS - and which generate binaries for 32bit or 64bit Windows. The file name pattern is <target>-<host>-<option-version>-<date>; thus, mingw-w64-bin_x86_64-mingw_20100527.zip is a compiler targeting 64bit Windows (mingw-w64) but also running ("host") on 64bit Windows (xx86-64-mingw); you might search for the file in Toolchains targetting Win64 (Personal Builds or Automatized Builds).
TDM GCC: MinGW/MinGW-W64 Builds
MinGW build ("native Windows" build)
Official MinGW builds (only releases), last seen was 4.6.2 (2011-12-22)
The MinGW for Win64 project has also binaries for 32bit Windows; e.g. mingw-w32-bin_i686-mingw_<date>.zip runs on and generates binaries for 32bit Windows (cf. above); you might search for the file in Toolchains targetting Win32 (Personal Builds or Automatized Builds).
Unofficial build of current development (4.7) source. Download the latest installer (dated 2012-02-02). It's very easy to use (basically, just click on the OK buttons), but some detailed info is also available. These binaries work on Windows XP and later versions.
TDM GCC: MinGW/MinGW-W64 Builds
MinGW 32/64bit builds by www.Equation.com (builds were announced at comp.lang.fortran; note - equation.com is not affiliated with any MinGW or GCC developer. Use at your own risk)
Cygwin
Cygwin binary (2011-09-18). This should work with any i686 compatible processor. Instructions are on this page.
- NOTE: The GMP, MPFR, and MPC (complex arithmetic) packages must be installed for gfortran to work.
Official Cygwin builds (packages); last seen (November 2011) was 4.5.3.
MacOS
The gfortran maintainers offer nice Apple-style installers for:
Mac OS Lion (10.7) on Intel 64-bit processors (gfortran 4.6.2): download (released on 2011-10-20)
Snow Leopard (10.6) on Intel 64-bit processors (gfortran 4.6.2): download (released on 2011-10-21)
Snow Leopard (10.6) on Intel 32-bit processors (gfortran 4.6.1): download (released on 2011-06-27)
Leopard (10.5) On Intel processors (gfortran 4.6.2): download (released 2011-10-21)
Leopard (10.5) On PowerPC processors (gfortran 4.6.2): download (released 2011-10-21)
Detailed instructions can be found here.
From time to time builds of the current development 'trunk' might be provided. Note that these come with several caveats:
- They are ephemeral; probably losing relevance after a few days.
- They are built with --enable-checking=yes (which makes them much slower than the releases).
- They are likely to exhibit unexpected behavior (in addition to the shiny new features you are testing).
Currently available:
Snow Leopard (10.6) on Intel 64-bit processors (GCC 4.7.0 2011-11-23, Rev. 181620): download
Mac OS Lion (10.7) on Intel 64-bit processors (GCC 4.7.0 2012-01-30, Rev. 183741): download
Other projects packaging GCC (and gfortran) binaries for Mac include:
Fink offers GCC packages (all released versions)
HPC offers GCC 4.6 builds for Lion and Snow Leopard (Intel)
r.research.att.com offers builds of GCC 4.2
via Homebrew
GNU/Linux
Most Linux distributions offer gfortran packages, some have also builds for the experimental versions
Nightly builds are available at:
32-bit processors (i686)
Download from gfortran.com
64-bit AMD-compatible processors (x86_64, AMD64,Intel64, em64t)
Download from gfortran.com (README, nightly builds, 4.3 to 4.7 snapshots)
gcc-infrastructure package, which contains required libraries (GMP, MPFR, MPC, etc.) - simply unpack in the "gcc-trunk" (or "gcc-4.6" or ...) directory
To unpack .xz files: Use xzcat with tar. It is contained in pre-build xz package, if you don't have it.
Needs to be updated: Installation instructions
Building from Source
First obtain the source code either via subversion, GIT 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), --disable-build-poststage1-with-cxx (GCC 4.7, avoids building GCC with a C++ compiler, esp. useful if no C++ should be compiled). After make and make install you have built your own GCC.