From Fedora Project Wiki

Fortran modules directory proposal

The fortran modules files, ending in .mod are files describing a fortran 90 (and above) module API and ABI. These are not like C header files describing an API, they are compiler dependent and arch dependent, and not easily readable by a human being. They are nevertheless searched for in the includee directories by gfortran (in directories specified with -I).

The aim of this proposal is to propose a directory for those files, some consideration about compatibility between compiler version and some helping rpm macros.


The fortran modules files generated by gfortran should be installed the %_libdir/gfortan/modules directory, thereafter denoted as %_fmoddir.

Each gfortran release (from 4.1 to 4.2) may lead to an incompatible change in the .mod files. Therefore for each such gfortran update, this issue should be investigated, and a rebuild of the package that provide the .mod asked for on the devel announce file and done by the maintainers if needed.

rpm macros change

A new macro, %_fmoddir is proposed for inclusion in the main rpm macro file. And a corresponding -I%_fmoddir switch is proposed to be added to the default FFLAGS.

PatriceDumas will propose this to the rpm packagers if this is accepted and ratified. This could be nice to have mod files rightly placed for F-9. There is not a lot of packages providing .mod file, so this shouldn't be problematic.