For example, with gfortran installed, python setup.py make or other standard setup commands can be used to build the Fortran library on all systems, including Windows without directly using a Makefile.
GCC/Gfortran 8 for Ubuntu 18.04 / 16.04 / 14.04 is available from the Ubuntu-test PPA, and installing Gfortran (in this case 8.2) is as easy as following the steps below.
Add Ubuntu-test PPA, and then update package repositories:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- sudo apt-get update
Next install the most recent Gfortran (by the time of posting this topic) (similarly for gcc-8, g++-8):
- sudo apt install gfortran-8
Check the version you installed by
- $gfortran-8 --version
GNU Fortran (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0
Copyright (C) 2018 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.
Newer versions of Gfortran may require recompiling other libraries linked with Fortran compiler, such as HDF5. Check here how to switch between various Gfortran compiler versions with update-alternatives.