Upgrade conda Gfortran for MacOS

Gfortran can be installed for linux and MacOS using conda: Gfortran :: Anaconda.org

But an issue is that the MacOS versions (Arm and X86) are out of date. They need to be updated to Gfortran v12.1.0. Does anyone know how to update this?

Here is the relevant conda-forge repository: GitHub - conda-forge/gfortran_osx-64-feedstock: A conda-smithy repository for gfortran_osx-64.
Here is a relevant issue I raised: GitHub - conda-forge/gfortran_osx-64-feedstock: A conda-smithy repository for gfortran_osx-64.

I have tried to create a pull request that actually updates it, but failed to do so successfully.

1 Like

Not a direct answer to the OP question but FYI, I have just found out that Homebrew has updated its GCC to 12.1.0


Updating compilers on conda-forge should be coordinated with the core team, since this is likely to affect a significant part of the >17k feedstocks part of conda-forge. Best reach out in the compilers channel: conda-forge/conda-forge-compilers - Gitter.

The compilers themselves are more than a single feedstock, they are usually split into actual implementations, activation scripts, compiler wrapper and version pinning (not only affecting the compilers, but the rest of the conda-forge as well). For Linux this are

For the OSX toolchain the repos are separate, if you ever need to find a feedstock providing a package, checkout conda-forge feedstocks | community driven packaging for conda. The compiler toolchain for OSX is built-up from clang/clang++ and gfortran without gcc/g++. Starting from the compiler wrapper feedstock above, we can work out the relevant places to check for gfortran for OSX:

Pinning and wrappers are the same for OSX (notably there are multiple compiler wrappers on Windows). Checkout the gfortran_impl_osx-64-feedstock repository on how gfortran is built on conda-forge. You will find a patch for version 11.3.0, which needs to be checked for version 12.x first and potentially updated.



As of right now, gfortran is updated to v11.3.0 for MacOS on x86 and ARM.