[arch-dev-public] fortran modules and gfortran version

Stéphane Gaudreault stephane at archlinux.org
Tue Apr 2 10:56:12 EDT 2013

I am sending here because this could require intervention for some 
packages and also to discuss a solution to prevent the problem in the 

Sometimes with newer versions of GCC there is a change in the version 
for Fortran modules which is incompatible with older versions. All 
packages providings Fortran modules (usually .mod files) must be rebuilt 
when the module version is bumped. A possible solution to identify those 
packages could be to provide a Fortran module ABI number in our gfortran 
PKGBUILD and force packages with .mod files to explicitly depend on it.

Any thoughts on this?




Example with gfortran 4.8.0 and the openmpi package build with a 
previous version :

# cat test_mpi_fmodule.f90
program test
USE mpi
end program test

# mpif90 test_mpi_fmodule.f90

USE mpi
Fatal Error: Cannot read module file 'mpi.mod' opened at (1), because it 
was created by a different version of GNU Fortran

More information about the arch-dev-public mailing list