This is the mail archive of the mailing list for the GNU Fortran project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fedora-packaging] fortran .mod files


> Could some kind soul please provide some guidance (or perhaps just
> opinions/perspective?) regarding the handling of *.mod files within a
> Linux distribution?  The "where should they live?" question came up on
> the Fedora packaging list at:

Well, I think the constraints detailed in that thread are correct,
including the fact that they are architecture-dependent. Moreover,
something that might not have been considered by you until now is that
they also are compiler-dependent: different compilers will generate
different .mod files for the same source, and different versions of
the same compiler might generate different .mod files. For this
reason, I think it's considered bad programming style for a project to
require mod files from another project in order to compile. But, since
there appears to be existing examples of this practice, we probably
have to find a practical solution to this issue anyway.

We had some discussion a while back about where to put module files
(thread starting at, but a conclusion
was easier to reach because we were only dealing with gfortran
intrinsic (or "internal") module files, so we ended up hidding them
inside the gcc directories
(/usr/lib*/gcc/${target}/${version}/finclude). For the naming, there
was a general agreement about "finclude" (with F for Fortran). A
minority was leaning towards "mod" or "modules", which is more correct
from the Fortran point of view (these files are module files, and are
not "included" in the Fortran terminology), but then there is a risk
of confusion with other meanings for modules (kernel modules, or

Now, my personnal opinion is that since these files are
compiler-generated and target-dependent, they are very similar to
libraries. For that reason, I think they probably should be placed in
/usr/lib*/finclude, or in /usr/finclude*, where * can be 32, 64 or


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]