Intel Fortran Mac Download



Download Intel Fortran Compiler Professional 11.1 for Mac from our website for free. This Mac download was scanned by our antivirus and was rated as safe. This software for Mac OS X is a product of Intel. The application is categorized as Developer Tools. Augment your development process with compilers from Intel to create applications that run faster and more efficiently. These tools produce optimized code that takes advantage of the ever-increasing core count and vector register width in Intel® processors. Download (tgz) Trial Request: macOS; Apple Intel Mac 64-bit macOS version 10.7 - 10.15 or compatible: NAG Fortran Compiler, Release 7.0 (Build 7020) File size: 20.0 MB; 20,983,070 bytes: NPMI670NA: Download (dmg) Trial Request: Apple Intel Mac 64-bit macOS version 10.9 - 10.14 Note: Compatibility of Fortran Builder on macOS extends no.

  • Intel fortran 9.0 compiler free download - Intel Fortran Compiler Professional, Intel Visual Fortran Compiler Professional, Intel(R) Visual Fortran Compiler Standard, and many more programs.
  • Visual Studio Code runs on Windows, Linux and Mac. It is not clear to me if MS plans to extend Visual Studio Code to be like Visual Studio, so I was wondering if anyone is using Visual Studio Code on a Linux box using Linux Intel Fortran, as I do all my production.

This document provides a summary of new and changed product features and includes notes about features and problems not described in the product documentation.

Please see the licenses included in the distribution as well as the Disclaimer and Legal Information section of these release notes for details. Please see the following links for information on this release of the Intel® Fortran Compiler 19.1.

Change History

This section highlights important changes from the previous product version and changes in product updates.

Changes in Update 3

  • Not applicable for macOS

NOTE: Intel® Parallel Studio XE 2020 Composer Edition for Fortran and C++ Linux* contains an update to the Intel® C++ Compiler next generation code generator. This is invoked using the -qnextgen option to the ICC and ICPC compilers. This update to the Intel® C++ Compiler next generation code generator includes our latest updates and features for our C++ next generation compiler invoked with the -qnextgen option.

  • There are no new features, bug fixes, or security enhancements for the Intel® Fortran Compiler or the Intel® C++ Compiler without the -qnextgen option.
  • Intel® Parallel Studio XE 2020 Update 3 is available for the Intel® Parallel Studio XE 2020 Composer Edition for Fortran and C++ Linux*.
  • This is a Linux-only release: there is no Update 3 release for either Windows* or macOS* operating systems.
  • In addition, it is only a Composer Edition release: there is no Update 3 release for either Professional or Cluster Editions of Intel® Parallel Studio XE 2020.
  • There is no update to the Intel® C++ and Fortran Compilers Redistributable Libraries. The Update 2 versions of these libraries are compatible and should be used.
  • There is no update for the Intel® Parallel Studio XE Runtime 2020 YUM* and APT* repository packages. Continue to use the Update 2 packages of this runtime.

Changes in Update 2 (Intel® Fortran Compiler 19.1.2)

  • Corrections to reported problems.

Changes in Update 1 (Intel® Fortran Compiler 19.1.1)

  • Corrections to reported problems.
  • Support for integration with Xcode 11 is removed.

Changes since Intel® Fortran Compiler 19.0 (New in Intel® Fortran Compiler 19.1.0)

  • New compiler options:
  • Corrections to reported problems

System Requirements

  • A 64-bit Intel®-based Apple* Mac* system
  • 2GB RAM minimum, 4GB RAM recommended
  • 14GB free disk space for all features
  • One of the following combinations of macOS*, Xcode* and the Xcode SDK:
    • macOS* 10.15 and Xcode 11.x -- Note: Fortran Integrations into Xcode is removed. However, Xcode Command Line Tools are needed for command line to function. SEE HERE
    • macOS 10.14 and Xcode 10.x
  • If doing command line development, the Command Line Tools component of Xcode* is required
  • Build Rules Missing: See Known Issues or GO HERE

Note: Advanced optimization options or very large programs may require additional resources such as memory or disk space.

How to install the Intel® Fortran Compiler

Installation instructions are shipped with all Intel® Software Development Products as part of the documentation.

Note that user should have an administrative authorities to install Intel® Fortran Compiler on macOS*.

Please refer to Installation FAQ for more details on installation questions.

How to use the Intel® Fortran Compiler

Intel® Parallel Studio XE 2020: Getting Started with the Intel® Fortran Compiler 19.1 for macOS* at <install-dir>/documentation_2020/en/compiler_f/ps2020/get_started_mf.htm contains information on how to use the Intel® Fortran Compiler from the command line and from Xcode*.

This article explains which version of Xcode* is supported by Intel Fortran Compiler release.

Documentation

Product documentation is linked from

Offline Core Documentation Removed from the Installed Image

Offline core documentation is removed from the Intel® Parallel Studio XE installed image. The core documentation for the components of Intel® Parallel Studio XE are available at the Intel® Software Documentation Library for viewing online. Offline documentation for older versions is also available from the Intel® Software Development Products Registration Center: Product List > Intel® Parallel Studio XE Documentation and fromDownload Documentation.

User and Reference Guides, What's New and Release Notes, Installation Guides

Refer to the Intel® Parallel Studio XE Support – Documentation for additional User and Reference Guides, What’s New and Release Notes, and Installation Guides.

Intel-provided Debug Solutions

Intel®-provided debug solutions are based GNU* GDB. Please see Intel® Parallel Studio 2020 Composer Edition Fortran - Debug Solutions Release Notes for further information.

Fortran Compiler Download

Samples

Intel Fortran Mac Download Tutorial

Product samples are now available online at Intel® Software Product Samples and Tutorials

Redistributable Libraries

Refer to the Redistributable Libraries for Intel® Parallel Studio XE for more information.

Technical Support

If you did not register your compiler during installation, please do so at the Intel® Software Development Products Registration Center. Registration entitles you to free technical support, product updates and upgrades for the duration of the support term.

Free Fortran Mac

For information about how to find Technical Support, Product Updates, User Forums, FAQs, tips and tricks, and other support information, please visit: http://www.intel.com/software/products/support/

Note: If your distributor provides technical support for this product, please contact them for support rather than Intel.

Compatibility

In general, object code and modules compiled with earlier versions of Intel Fortran Compiler for Linux* (8.0 and later) may be used in a build with version 19.1. Exceptions include:

  • Sources that use the CLASS keyword to declare polymorphic variables and which were built with a compiler version earlier than 12.0 must be recompiled.
  • Objects built with the multi-file interprocedural optimization (-ipo) option must be recompiled with the current version.
  • Objects that use the REAL(16), REAL*16, COMPLEX(16) or COMPLEX*32 datatypes and which were compiled with versions earlier than 12.0 must be recompiled.
  • Objects built for the Intel® 64 architecture with a compiler version earlier than 10.0 and that have module variables must be recompiled. If non-Fortran sources reference these variables, the external names may need to be changed to remove an incorrect leading underscore.
  • Modules that specified an ATTRIBUTES ALIGN directive outside of a derived type and were compiled with versions earlier than 11.0 must be recompiled. The compiler will notify you if this issue is encountered.
  • Modules that specified an ATTRIBUTES ALIGN directive inside a derived type declaration cannot be used by compilers older than 13.0.1.
  • The implementation of the Fortran 2008 submodules feature required extensive changes to the internal format of binary .mod files. Therefore module files created by the version 16.0 or newer Fortran compiler cannot be used with version 15.0 or older Fortran compilers.
  • Objects built with Intel Fortran Compiler version 18.0 and earlier version of regcall calling convention must be recompiled with 19.0 or newer. Intel library libirng uses regcall. Version of this library shipped with 19.0 compiler version or newer is not compatible with older versions. regcall is implicitly used by following attribute:
    !DIR$ ATTRIBUTES [att,] VECTOR [:clause] [, att]... :: routine-name

Stack Alignment Change for REAL(16) and COMPLEX(16) Datatypes

In versions prior to 12.0, when a REAL(16) or COMPLEX(16) (REAL*16 or COMPLEX*32) item was passed by value, the stack address was aligned at 4 bytes. For improved performance, the version 12 and later compilers align such items at 16 bytes and expects received arguments to be aligned on 16-byte boundaries. This change is also compatible with gcc.

This change primarily affects compiler-generated calls to library routines that do computations on REAL(16) values, including intrinsics. If you have code compiled with earlier versions and link it with the version 12 libraries, or have an application linked to the shared version of the Intel run-time libraries, it may give incorrect results.

In order to avoid errors, you must recompile all Fortran sources that use the REAL(16) and COMPLEX(16) datatypes if they were compiled by compiler versions earlier than 12.0.

New and Changed Compiler Features

New features from Fortran 2018

  • Enhancements to the IMPLICIT statement allow specifying that all external procedures must declared EXTERNAL
  • Enhancements to the GENERIC statement permit it to be used to declare generic interfaces
  • The locality of variables may now be specified on a DO CONCURRENT statement
  • Enhancements to edit descriptor forms E, D, EN, ES, and G allow a field width of zero, analogous to the F edit descriptor
  • The exponent width e in a data edit descriptor may now be zero, analogous to a field width of zero
  • The RN edit descriptor now rounds to nearest as specified by Fortran 2018 and ISO/IEC/IEEE 60559:2011
  • The EX edit descriptor allows for hexadecimal format output of floating point values. Hexadecimal format floating point values are allowed on input.
  • SIZE= may be specified for non-advancing I/O
  • The values for SIZE= and POS= in an INQUIRE statement for pending asynchronous operations have been standardized
  • The value assigned to the RECL= specifier in an INQUIRE statement now has standardized values
  • A new form of the intrinsic function CMPLX does not require the KIND= keyword if the first argument is type COMPLEX
  • The arguments to the SIGN function may be of different kinds
  • INTEGER and LOGICAL arguments to intrinsic procedures are no longer required to be of default kind
  • The named constants STAT_FAILED_IMAGE and STAT_UNLOCKED_FAILED_IMAGE have been defined in the intrinsic
    ISO_FORTRAN_ENV module
  • The non-block DO statement and the arithmetic IF statement are now deleted in Fortran 2018. Intel® Fortran fully supports features deleted in the FORTRAN standard
  • COMMON, EQUIVALENCE and BLOCKDATA statements are now obsolescent
  • The labeled form of DO loops is now obsolescent
  • Locality of variables in DO CONCURRENT constructs can now be declared on the DO CONCURRENT statement
  • Specific names of intrinsic procedures are now obsolescent
  • FAIL IMAGE statement allows debugging recovery code for failed images without having to wait for an actual image failure
  • The named constants STAT_FAILED_IMAGE and STAT_UNLOCKED_FAILED_IMAGE have been defined in the intrinsic
    ISO_FORTRAN_ENV module
  • An optional argument STAT= has been added to ATOMIC_REF and ATOMIC_DEFINE intrinsic procedures
  • Optional STAT= and ERRMSG= specifiers have been added to the MOVE_ALLOC intrinsic procedure, to image selectors, and to the CRITICAL statement and construct
  • Atomic subroutines ATOMIC_ADD, ATOMIC_AND, ATOMIC_CAS, ATOMIC_FETCH_ADD, ATOMIC_FETCH_AND, ATOMIC_FETCH_OR, ATOMIC_FETCH_XOR, ATOMIC_OR, and ATOMIC_XOR have been implemented
  • Collective subroutines CO_BROADCAST, CO_MAX, CO_MIN, CO_REDUCE, and CO_SUM have been implemented
  • The SELECT RANK construct has been implemented allowing manipulation of assumed rank dummy arguments
  • The compiler will now diagnose the use of nonstandard intrinsic procedures and modules as required by Fortran 2018
  • Transformational intrinsic functions from the intrinsic modules ISO_C_BINDING, IEEE_ARITHMETIC, and IEEE_EXCEPTIONS are now allowed in specification expressions
  • You can now specify the optional argument RADIX for the IEEE_GET_ROUNDING_MODE and IEEE_SET_ROUNDING_MODE intrinsic module procedures
  • The optional ROUND argument has been added to the IEEE_RINT function in the intrinsic module IEEE_ARITHMETIC
  • The intrinsic module IEEE_ARITHMETIC now includes the functions IEEE_FMA, IEEE_SIGN_BIT, IEEE_NEXT_UP and IEEE_NEXT_DOWN
  • The intrinsic module procedures IEEE_MAX, IEEE_MIN, IEEE_MAX_MAG, and IEEE_MIN_MAG have been implemented
  • The intrinsic module procedures IEEE_INT and IEEE_REAL have been implemented
  • The intrinsic module IEEE_EXCEPTIONS now contains a new derived type, IEEE_MODES_TYPE, which can be used to save and restore the IEEE_MODES using the IEEE_GET_MODES and the IEEE_SET_MODES intrinsic module procedures
  • A new rounding mode, IEEE_AWAY has been added
  • SUBNORMAL is now synonymous with DENORMAL
  • IEEE_QUIET_EQ, IEEE_QUIET_NE, IEEE_QUIET_LT, IEEE_QUIET_LE, IEEE_QUIET_GT, IEEE_QUIET_GE, IEEE_SIGNALING_EQ, IEEE_SIGNALING_NE, IEEE_SIGNALING_GT, IEEE_SIGNALING_GE, IEEE_SIGNALING_LT, and IEEE_SIGNALING_LE intrinsic module procedures have been implemented

New features from OpenMP 5.0*

  • IF clause on SIMD directive
  • NONTEMPORAL clause on SIMD directive
  • Inclusive/exclusive scan operations in SIMD and TARGET SIMD constructs.

Changed compiler behavior

  • Previous compiler versions erroneously permitted a PRIVATE or SEQUENCE statement to appear prior to the declaration of any type parameters in a derived type declaration. Intel® Fortran Compiler 19.1 no longer permits this behavior.
  • The INQUIRE statement now uses realpath’/’GetFullPathNameA’ and uses the resulting canonicallized file-paths if the calls succeeds. An example of the change is:
    Open file as “bar/foo”.
    Before:
    Inquire whether “./bar/foo”, “bar//foo” or “bar/../bar/foo” is open – it is not.
    After:
    Inquire whether “./bar/foo”, “bar//foo” or “bar/../bar/foo” is open – it is.
  • In 19.0 compiler version, all procedures with the exception of C_F_POINTER from the intrinsic module ISO_C_BINDING were made PURE per the Fortran 2018 standard. Interpretation 18/007 declared that making C_F_PROCPOINTER PURE was a mistake. 19.1 complies with this interpretation and makes C_F_PROCPOINTER IMPURE.

New and Changed Compiler Options

Please refer to the compiler documentation for details. Following new compiler options added:

For a list of deprecated compiler options, see the Compiler Options section of the documentation.

-assume [no]old_inquire_recl

Determines the value of the RECL= specifier on an INQUIRE statement for an unconnected unit or a unit connected for stream access.

-assume [no]old_ldout_zero

Determines the format of a floating-point zero produced by list-directed output. old_ldout_zero uses exponential format, no_old_ldout_zero uses fractional format.

-check [no]udio_iostat

Determines whether standard conformance checking occurs when user defined derived type input/output procedures are executed.-m[no-]branches-within-32B-boundaries

Determines whether warnings occur for any dummy procedures or procedure calls that have on explicit interface or have not been declared EXTERNAL.

-m[no-]branches-within-32B-boundaries

This option is supported in versions 19.0 update 8 of the compiler and above. The details about this option can be found in the Intel® Fortran Compiler 19.1 Developer Guide and Reference. To find more information, see https://www.intel.com/content/dam/support/us/en/documents/processors/mitigations-jump-conditional-code-erratum.pdf

Support Deprecated

The compiler option -stand f15 will be removed in next update. Use -stand f18 instead.

GNU* DBG support will be removed in the next update.

Support Removed

Loop Profiler

The Loop Profiler feature is removed in Intel® Fortran Compiler 19.1. The following compiler options related to Loop Profiler are removed: -profile-loops=keyword, -profile-loops-report=value -profile-functions, -guide-profile.

32-bit applications are no longer supported

Starting with the 19.0 release of the Intel® Fortran Compiler, macOS 32-bit applications are no longer supported.
If you want to compile 32-bit applications, you should use an earlier version of the compiler and Xcode* 9.4 or earlier.

Fortran Integration into Xcode removed

Xcode integration capabilities within our Fortran Compiler bundle have been removed. Command line interface remains fully functional for macOS.

Keep in mind that installation of Xcode is still recommended, as command line tools from Xcode are required by the command line compiler. However, you can install just the Xcode Command Line Tools with this command from a terminal window:

Known Limitations

Slow License Checkout macOS 10.15

The license checkout performance on macOS Catalina 10.15 is roughly 1.1 seconds per source file. This is a 10x slowdown on this OS compared to previous versions of macOS. We are evaluating our license technology for a solution but at this time we have not root caused the issue. If this slowdown is an issue, please revert back to the previous macOS 10.14 where this slowdown does not occur.

Error 'no rule to process file' within Xcode* 10 and 11

macOS*’s XCode 10 and 11 come with a new build system and it is configured as the default. Currently, the Intel Fortran Compiler does not support it. You will see the error 'no rule to process file' when building an Intel Fortran Compiler project within XCode. Please switch to “Legacy Build System” in Project Settings to build your Fortran project in Xcode.

For more details please find this article.

Keep in mind, support for Xcode Integration is deprecated and will be removed in a future update - SEE THIS NOTE

Fortran 2008 and Fortran 2018 Feature Summary

The Intel® Fortran Compiler supports full Fortran 2008 standard and most features from the Fortran 2018 standard. New Fortran 2018 features supported by the current version are listed in the 'New features from Fortran 2018' section.

Please refer to the Fortran 2008 Standard (PDF) and the Fortran 2018 Standard (PDF) if necessary.

Disclaimer and Legal Information

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R) PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.

Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked 'reserved' or 'undefined.' Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.

The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm

Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. Go to:

The Intel® Fortran Compiler is provided under Intel’s End User License Agreement (EULA).

Please consult the licenses included in the distribution for details.

Intel, the Intel logo, the Intel Inside logo, Xeon are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries.

* Other names and brands may be claimed as the property of others.

© Intel Corporation. All Rights Reserved.

For more complete information about compiler optimizations, see our Optimization Notice.

IMPORTANT: This page has only historical value. It does NOT apply to current R versions. See this page for current information.

NOTE: some links may be broken - older binaries have been lost in an incident.

Mandatory tools

In order to compile R for Mac OS X 10.4 or higher, you will need the following tools: (for Mac OS X 10.5 and higher look further down)
  • Xcode Development Tools 2.4.0 (or higher) from Apple
    They can be obtained from Apple's Xcode pages. Also, all recent Mac OS X versions come bundled with Xcode Tools, they are located on the installation DVD. However, if your OS X came with Xcode older than version 2.4.0, you will have to download a more recent version from the above site.

    Note: The binary Leopard build of R on CRAN requires Xcode 3.1 or higher

  • GNU Fortran compiler
    Unfortunately Xcode doesn't contain a Fortran compiler, therefore you will have to install one. For convenience we provide a binary of the GNU Fortran compiler, because most other binaries are either incomplete or broken (do not use compilers from HPC, they won't work correctly!). You can download it from CRAN or here:
    gfortran-4.2.3.dmg (ca. 27MB, GNU Fortran 4.2.3 release)
    MD5 hash: 9551fc46f55537dd1db581154daf27ef

    This binary contains gfortran 4.2.3 (release) for both Intel and PowerPC Macs. It supports all four targets (i386, ppc, x86_64 and ppc64) and features Apple's Darwin compiler drivers, i.e. you can build fat binaries with one command (e.g. gfortran -arch i386 -arch ppc -o tf tf.f).

    Make sure you add /usr/local/bin to your PATH in order to use this compiler. This can be done, e.g. by
    export PATH=$PATH:/usr/local/bin

    Note: If you are interested in cutting-edge compilers and/or integration of GNU Fortran and Apple's compilers see gcc 4.2 section below. That section is also the right place to go if you use the binary Leopard build of R.

    Previous versions:
    gfortran-4.2.1.dmg (ca. 28MB, 4.2.1 release, also avaiable in R 2.6.0)
    gfortran-4.2.0.dmg (ca. 28MB, 4.2.0 release, also avaiable in R 2.5.1)
    gfortran-4.2.0-20070325.dmg (ca. 16MB, 4.2.0 2007/03/25 pre-release without cc back-end)

Intel Fortran Downloads Full Free

Mandatory Tools - Leopard CRAN build

R build can be built with the above requirements, but if you want to use source compilation with the CRAN build of R for Mac OS X 10.5 or higher (aka Leopard build), you will need more recent tools:
  • Xcode Development Tools 3.1 (or higher) from Apple with gcc-4.2
    They can be obtained from Apple's Xcode pages. Make sure gcc-4.2 is selected during the installation (default in recent Xcode versions).
  • GNU Fortran compiler
    Do not install Fortran compilers that comde with Tiger builds of R. Remove them using sudo gfortran-uninstall if you installed them before (unless you want to use both builds in parallel). Then install gfortran-4.2 addition to Apple compilers (see below - you have to pick the one that maches your Xcode version!). Although the Tiger compilers supplied with the Tiger build of R can be used, they will result in slightly different binaries.

Optional tools and libraries

The following tools and libraries are optional. R can be compiled without them, but they provide additional capabilities to R.
  • LaTeX
    In order to produce documentation, LaTeX is necessary. It can be obtained from several places, for example as a part of MacTeX.
  • GNU readline
    Although Mac OS X comes with readline-replacement library, it lack some functionality like backward search etc. Therefore many user prefer GNU readline. Binary for all four architectures is provided from CRAN as a part of the devpack: Tools on CRAN or see libs on this site for more recent versions.
  • PNG and JPEG libraries
    If bitmap manipulation libraries are present, R will add graphics device support for those bitmap formats. There are also other package that take advantage of PNG and JPEG, so it is in general a good idea to install them.Again, they are now part of the devpack on CRAN: Tools on CRAN or more recent versions are available from libs.
  • cairo
    R 2.7.0 comes with cairo support. The following tar-ball contains cairo and its dependencies (FreeType, pkgconfig and png) in static form such that you can compile R the same way it is compiled for CRAN:Tools on CRAN

Apple Xcode gcc-42 add-ons

Download Intel Fortran Compiler 2016

  • GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion):
    Download: gfortran-lion-5666-3.pkg (for Xcode 4.1)
    This package adds GNU Fortran to Xcode 4.1 for Lion (Apple's gcc 4.2 build 5666.3). Requires Mac OS X 10.7 (Lion) and Xcode 4.1.

    gcc-4.2 (Apple build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion):
    Download: gcc-42-5666.3-darwin11.pkg (for Xcode 4.2 and higher)
    This package contains gcc-4.2 (Apple build 5666.3) including GNU Fortran for Mac OS X 10.7 (Lion). It is needed for Xcode 4.2 or higher since Apple has dropped gcc-4.2 from Xcode. It works with Xcode 4.0 and 4.1 as well, but there you can use the above smaller Fortran package instead.

  • GNU Fortran 4.2.4 for Mac OS X 10.6 (Snow Leopard):
    Download: gfortran-42-5664.pkg (for Xcode 3.2.3 through 3.2.5)
    This package adds GNU Fortran to Xcode 3.2.3/4/5 for Snow Leopard (Apple's gcc 4.2 build 5664). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.3, 3.2.4 or 3.2.5 (it will also work with more recent Xcode such as 4.0 or 4.1 on Snow Leopard since Apple stopped updating gcc)
    Download: gfortran-42-5659.pkg (for Xcode 3.2.2)
    This package adds GNU Fortran to Xcode 3.2.2 for Snow Leopard (Apple's gcc 4.2 build 5659). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.2.
    Download: gfortran-42-5646.pkg (for Xcode 3.2 and 3.2.1)
    This package adds GNU Fortran to Xcode 3.2 for Snow Leopard (Apple's gcc 4.2 build 5646). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2 (or 3.2.1).

    Dynamic libgfortran: libgfortran-4.2.4-5646.tar.gz (NOT needed for R)
    The compiler above contains static libgfortran. To avoid library pollution the dynamic gfortran library is not included since it is not necessary for most projects and causes problems for people that don't have it installed at run-time. If you know what you're doing, you can install it, but be aware that your FORTRAN binaries will depend on it and OS X does NOT include it.
    Install: sudo tar fxz libgfortran-4.2.4-5646.tar.gz -C /

  • GNU Fortran 4.2.4 for Mac OS X 10.5 (Leopard):
    Download: gfortran-42-5577.pkg (for Xcode 3.1.4 only!)
    This package adds GNU Fortran 4.2.4 to Apple's Xcode 3.1.4 gcc 4.2 (build 5577) compilers on Mac OS X 10.5 (Leopard). It does NOT work on Snow Leopard. This binary has been built the Apple way with the gcc_42 (build 5577) sources (by adding the Fortran directories from gcc 4.2.4 release), so it features full Apple driver (i.e. all special flags work) and works directly with the gcc 4.2 system compiler. You have to install Xcode 3.1.4 first (from ADC).

    Older versions:
    GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5564) = Xcode 3.1 and 3.1.1:
    gfortran-4.2-5564-darwin9.tar.gz
    GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5566) = Xcode 3.1.2:
    gfortran-4.2-5566-darwin9.tar.gz
    GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5577) = Xcode 3.1.4:
    gfortran-4.2-5577-darwin9.tar.gz (same as the above installer)
    Installation: sudo tar fvxz gcc-4.2-5577-darwin9-all.tar.gz -C /

  • gcc 4.2 (Apple Inc. build 5566) for Mac OS X 10.4 (Tiger): (updated 2008/12/24)
    Download: gcc-4.2-5566-darwin8-all.tar.gz (Apple gcc 4.2 build 5566 [as in Xcode 3.1.2] + GNU Fortran 4.2.4)
    The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    sudo tar fvxz gcc-4.2-5566-darwin8-all.tar.gz -C /
    The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler (or use sudo gcc_select 4.2).
    (Note: SDK and documentation is assumed to live in /Developer - move accordingly for non-standard installations).

Intel Visual Fortran Download

Previous (older) versions

  • gcc 4.2 (Apple Inc. build 5553) for Mac OS X 10.4 (Tiger):
    Download: gcc-42-5553-darwin8-all.tar.gz (Apple gcc 4.2 build 5553 + GNU Fortran 4.2.3)
    The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    sudo tar fvxz gcc-42-5553-darwin8-all.tar.gz -C /
    The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler.
  • gcc 4.2 (Apple Inc. build 5531) for Mac OS X 10.4 (Tiger) (older than above):
    Download: gcc-42-5531-darwin8.tar.gz (Apple gcc 4.2 build 5531)
    Download: gcc-42-5531-darwin8-SDK.tar.gz (MacOSX10.4u SDK files)
    Download: gfortran-42-5531-darwin8.tar.gz (GNU Fortran)
    This is a set of Apple's gcc 4.2.1 (build 5531) compilers for Mac OS X 10.4 (Tiger). Xcode 2.5 has gcc 4.0 only, and gcc 4.2 update is currently available only for Leopard, so this binary fills the gap.
    The second file contains the Fortran compiler which is not part of the Apple sources, but was compiled along with the Apple sources.

Building a universal compiler

Note: This section is now becoming obsolete given Apple's gcc 42 branch, but it is kept here until we have more definite information on Apple's Fortran support. If you're interested in compiling Apple's gcc-4.2 branch with Fortran support, add Fortran sources and use this patch: gfortran-5564.diff (for gcc-4.2 Apple build 5564/5566/5577 and GNU Fortran 4.2.4) or gfortran-5531.diff (for gcc-4.2 Apple builds 5531 or 5553 and GNU Fortran 4.2.3). Complete sources are also in /src.

Apple provides universal compilers in their Xcode tools. This means that the compiler itself can be run on both on Intel and PowerPC Macs natively. In addition, Apple's compilers can produce binaries for any of the architectures i386, ppc, x86_64 and ppc64. This mean that the same compiler suite is usable on any Mac and can target any Mac as well.

Apple also provides a special driver for all compilers such that they support additional flags such as -arch which allow us to build fat binaries in one run. Internally the driver invokes multple separate compilers, one for each distincts -arch flag and combines the result using lipo. This is highly convenient and allows for compilation of the form:
gcc -c foo.c -arch ppc -arch i386 -arch ppc64 -arch x86_64
which produces one fat object file (foo.o) containing binaries for all four architectures.

Unfortunately Apple's branch of gcc is based on a fairly old version of gcc and they don't support Fortran. (Update: 2007/11 there is some hope, Apple's gcc-42 branch can be used to compile Fortran - see binaries above - and Apple is allegedly working on an official Fortran release) Therefore it is sometimes necessary to compile gcc from the original FSF sources. However, such compilers (e.g. as provided by HPC) are very limited, because they work only on one kind of Mac (Intel or PPC) and don't support cross-compiling. Therefore is it necessary to merge Apple's approach and FSF gcc sources to create a more usable compiler for Mac OS X.

In this part I want to describe steps necessary to create such universal compiler from any gcc sources. The whole process is fully automated by a shell script which can be obtained here (it must be run sudo unless you have write-premissions in /usr/local). I have used this procedure to create the Fortran compiler available above. Run the script with '-h' flag to see all the options.

How does it work?

Conceptually Apple's drivers use naming scheme to distinguish compilers for Intel and PowerPC targets. In the Xcode installation they are called powerpc-apple-darwin8-gcc-4.0.1 and i686-apple-darwin8-gcc-4.0.1. The virtual targets ppc64 and Fortranx86_64 are compiled by adding -m64 flags to the corresponding compiler. The driver (gcc-4.0) invokes the actual compiler(s) that are needed and uses lipo to create the resulting fat object/binary.

In order to build an universal compiler suite, we need to proceed using these steps:

  • get cross-compilation tools
    The building process requires tools for cross-compilation to be of the form <arch>-apple-darwin8-<tool>. However, Apple's tools expect the -arch flag instead of naming conventions. Therefore it is necessary to create small stubs that map FSF naming conventions into corresponding invocations of the Apple tools. Such stubs are automatically generated by Apple's gcc bulding process, but they are also available in this file: gcc-bin-stubs.tar.gz
  • get gcc sources
    This is obviuos, you clearly need gcc sources. One way to get them is via svn, for example:
    svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch gcc-4.2
  • compile and install the native compilers
    The compilation part is straight-forward, just configure and build gcc for the i686-apple-darwin8 host and powerpc-apple-darwin8 host. The harder part is the installation, because Apple uses fat files, whereas FSF's multilibs relies on different names. First install one architecture, rename the binaries according to Apple's compiler name conventions and move everything in /usr/local/lib aside. Then install the other architecture and do the same. Finally combine all system libraries using lipo into /usr/local/lib. This applies also to 64-bit architectures which should also be included in the libraries placed in /usr/local/lib. Then get all the other files and symlinks back. Finally remove everything from the subdirectories in lib and replace it with symlinks. This should give you a working environment for all four targets. Finally adjust the IDs of the libraries to match their location.
  • compile and merge cross-compilers
    With the above compiler we cannot create universal binaries, because the cross-compilers are missing. We need to compile them now. Note that we don't need libraries anymore, because they are already in place, so even if some of the libraries fail when cross-compiled, we don't care. The cross-compilers don't even need to be installed, just lipo the binaries of the cross-compilers into /usr/local/libexec/gcc/*-apple-darwin*/* and the drivers into /usr/local/bin with the corresponding name. You may want to strip them as well in order to reduce size.
  • get and install the Darwin driver
    The driver is part of Apple's gcc and can be obtained correspondingly. I have packaged the minimal sources and the corresponding Makefile into one small tar-ball which is available here: gcc-darwin-driver.tar.gz. It is based on gcc-5363 sources released by Apple, but the Makefile allows the use of any Apple's gcc sources - just set AGCC accordingly. Move the resulting driver files into /usr/local/bin and you're all set!
Was this too compilcated? Well, use the script above or just fetch the binaries which are provided in the form of a convenient Apple installer above.(sources for open source software not linked directly)

Disclaimer

All software is provided 'as is' and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall AT&T, the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.