- Copy to Clipboard brew install gcc brew install python3 pip3 install fortran-language-server which include the ‘gfortran’ compiler. Optional: also install python3 for Fortran IntelliSense (python has a Fortran implementation of the Language Server Protocol).
- Gmp: 6.2.1: GNU multiple precision arithmetic library: isl: 0.23: Integer Set Library for the polyhedral model: libmpc: 1.2.1: C library for the arithmetic of high precision complex numbers.
Gfortran 11-experimental-2 for ARM Big Sur (macOS 11) fxcoudert released this on Dec 19, 2020 1 commit to master since this release This binary build of gfortran and GCC is an experimental version based on GCC 11, by Iain Sandoe, for Apple Silicon machines. This is an updated version of my previous experimental release. I solved it by running the following commands. Brew unlink gcc brew rm gfortran brew cleanup brew link gcc It seems that gfortran was linked to the old gcc gcc install not properly updating links Issue #11990 Homebrew, This was fixed by brew link gcc, but he was not anticipating this as a mandatory step.
If you're working with Enzo for cosmological simulations on a darwin machine trying to use the Make.mach.darwin
make file, you'll probably run into a ld: library not found for -lgfortran
error. If you're running homebrew, it'll give you a:
which doesn't really solve the issue if you've already got GCC installed. The problem occurs because there's no easy way to test for directories in a makefile without doing something really hacky, so the enzo devs have just decided to leave it as is, and enzo can't find your gfortran installation. You'll want to scroll down to line 128 in the Make.mach.darwin
file (Enzo 2.5), and change the line
Mac Brew Gfortran
to
Brew Gfortran
Your GCC version will vary depending which version you're on, just change it as appropriate.
Brew Link Gfortran
If you're not using homebrew (or you're opposed to linking it using GCC's gfortran version), go grab a binary from GCC, make sure you've got the prereqs filled, and install it into /usr/local
. Then just change the same line to: