Hi, I'm reposting this request, hopefully to the right address.
gfortran 8 will break MOD file format (gfortan 7 didn't, as was incorrectly stated below), and I would like to add dh-fortran to track this module change, and move .mod files out of the standard include path, as this will break any other compilers (flang). Would there be any objections to a patch to search the path /usr/include/gfortran-$(mver), /usr/include/$(multiarch)/gfortran-$(mver) ahead of the usual paths, by default? Best regards Alastair McKinstry -------- Forwarded Message -------- Subject: dh-fortran-mod, gfortran transition and .mod paths Resent-Date: Tue, 11 Jul 2017 09:31:27 +0000 (UTC) Resent-From: debian-scie...@lists.debian.org Date: Tue, 11 Jul 2017 10:30:50 +0100 From: Alastair McKinstry <mckins...@debian.org> Organization: Debian To: gcc-maintain...@lists.debian.org, Debian Science List <debian-scie...@lists.debian.org>, Sébastien Villemot <sebast...@debian.org> Hi, I'm packaging the dh_fortran_mod file from Sébastien Villemot in preparation for the gfortran 7.1 transition, and also looking at the flang (new LLVM-based) fortran compiler. dh_fortan_mod places dependencies on gfortran-mod-${ver} to make transitions easier to track, and places .mod files in the appropriate directory. It appears from the gfortran list that the next release (gfortran 8.1? in Buster? ) will change the module format again. Also, the 'flang' compiler produces module files that are incompatible with gfortran. Hence we would not be able to ship both in /usr/include (current practice). So, would there be any objections to moving gfortrans .mod files to /usr/include/gfortran${mver} , and adding this as a default prefix for searching for mod files ? Similarly, /usr/include/flang${mver} for flang-based module searches. Intel mpifort (as of 2017) install scripts look for gfortran mod files in a gfortran${ver} directory, although this appears to be a compiler version (6.4.0) rather than module version (See https://github.com/easybuilders/easybuild-framework/issues/2000). A quick look shows redhat/fedora use /usr/lib64/gfortran/modules (fc26) , while opensuse uses /usr/include. Best regards Alastair McKinstry -------- Forwarded Message -------- Subject: ITP: dh-fortran-mod -- debhelper add-on to handle Fortran '.mod' files Date: Tue, 11 Jul 2017 08:32:31 +0100 From: Alastair McKinstry <mckins...@debian.org> To: Debian Bug Tracking System <sub...@bugs.debian.org> Package: wnpp Severity: wishlist Owner: Alastair McKinstry <mckins...@debian.org> * Package name : dh-fortran-mod Version : 1.0 Upstream Author : Sebastien Villemont <sebast...@debian.org> * URL : http://anonscm.debian.org/gitweb/?p=debian-science/packages/dh-fortran-mod.git * License : GPL3 Programming Lang: Perl Description : debhelper add-on to handle Fortran '.mod' files Modules were introduced in the 1990 revision of the Fortran standard. When the Fortran compiler processes a source file containing a module, it produces both an object file and a '.mod' file. The latter plays a role similar to header files in C, since it is needed when compiling other source files which make use of the module. . The '.mod' files are however platform dependent, and their format changes with the gfortran version . This package provides the dh_fortran_mod command, which simplifies th inclusion of '.mod' files in binary packages. First, it places the '.mod files in the correct platform- and gfortran-dependent location. Second, it adds the right dependency information on gfortran version(s). . Inclusion of dh_fortran_mod in dh sequence is also provided under the name 'fortran_mod'. . This package was originally developed by Sebastien Vilemont.