Search code examples
macosversion-controlfortrangfortran

gfortran cannot match MacOS Ventura version


The new MacOS Ventura seems to have broken gfortran MacOS version control. To reproduce my error you only have to do

 gfortran --version

And the output is

gfortran: warning: could not understand version ‘13.00.00’
GNU Fortran (GCC) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This in itself is just a warning so it might not be a big deal but it breaks "./configure" scripts that require some MacOS versions, e.g. if you try to compile LoopTools you get the following error (in the log file)

arm64-apple-darwin20.0.0-gfortran: warning: could not understand version '13.00.00'
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: error: ld returned 1 exit status

Since the version cannot be properly read it cannot be compared.

Is there some sort of work around this bug?


Solution

  • I had installed gfortran through conda but aparantly the version is from last year.

    I solved it by removing it from conda (had to remove conda entirely due to linking issues) and installed it with brew : brew install gcc.