Created attachment 572132 [details]
When trying to compile like
[ebuild N ] sci-libs/hdf5-1.10.5 USE="examples fortran hl mpi szip zlib -cxx -debug -static-libs -threads"
the compile fails with
Making all in testpar
make: Entering directory '/var/tmp/portage/sci-libs/hdf5-1.10.5/work/hdf5-1.10.5/fortran/testpar'
mpif90 -I. -I../../src -I../../fortran/src -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type -s -O2 -I../../fortran/src -I../../fortran/test -I../../fortran/src -I../../fortran/test -O2 -pipe -march=bdver2 -fstack-protector-strong -fstack-check -fbounds-check -c -o ptest.o ptest.f90
Fatal Error: Cannot read module file ‘mpi.mod’ opened at (1), because it was created by a different version of GNU Fortran
I'm getting an ERR_ACCESS_DENIED when trying to upload the compressed build log.
I have no idea of this bug. Do we need some more restrictions over the fortran versions?
Fortran under-specify the format of .mod files. They are incompatible from vendor to vendor and often from one compiler version to the next. In the case of gfortran, to make matters worse, it is completely unrelated to change in runtime (libgfortran.so).
Anyway, changes in .mod file are duly mentioned in the release notes for gfortran under compatibility notes at https://gcc.gnu.org/wiki/GFortran/News
The good news is no changes from gcc 5 to gcc 9 at least according to the above page.
If it wasn't clear, I recommend the mpi provider (openmpi, mpich or other) to be recompiled with the new gfortran.