[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#714730: gfortran: handling binNMU for .mod file format change



Hi Ryo,

Le dimanche 11 août 2013 à 11:11 +0900, Ryo IGARASHI a écrit :

> Fortran90 -dev package may contain .mod files, which behave like
> header files for C/C++ program. However, .mod files are binary files,
> and compiler dependent, and what is worse, they are incompatible
> between every major release of gfortran(e.g. we cannot use .mod file
> created by gfortran4.7 with gfortran4.8, and vice versa).
> Recompilation is required (thus binNMU is enough).
> 
> This creates a hidden dependency to Debian Fortran90 packages, and
> many bugs are reported every time when gfortran default version was
> upgraded.
> 
> # For the detailed background information, please see #714730.
> 
> Now that gfortran-4.8 (4.8.1-6) provides gfortran-mod-10 virtual
> package (Thanks to Matthias Klose) which enables us to correctly
> handle this hidden dependency, next we need to create a way to
> automatically create correct dependencies when packaging.
> 
> # If we add a dependency to gfortran-mod-10 for every Fortran90
>   package(which contains .mod file) explicitly, we need to change the
>   source package manually. This is a regression from the current
>   situation since we only need binNMU when mod file format change.
> 
> >From my limited understanding of debian packaging, I have to write a
> debhelper script (say: dh_fortran_mod) which add the correct virtual
> dependencies of Fortran mod file to ${misc:depends}.
> 
> Is this the correct way to proceed?

I think this goes in the right direction. Did you make any progress on
this?

More specifically, I think that dh_fortran_mod should do the following:

- it would read a file debian/[package.]fortran-mod, which would contain
a list of mod files created by gfortran and to be installed into binary
packages

- for each of these mod files, it would determine the mod version by
inspecting the contents, and then install the file
into /usr/include/fortran/gcc-<version>/<multiarch-triplet>/. This is
the proposed standard location, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49138

- it would also add the relevant virtual dependencies on
gfortran-mod-<version> in ${misc:Depends}

> Of course, this does not solve the whole problem. One of the remaining
> problems I can think of is:
> 
> 1. Fortran90 program can only be compiled with only one(i.e. default)
> version of gfortran.

This issue is solved by the above proposal, since it would be possible
to list mod files compiled with different gfortran versions in
debian/[package.]fortran-mod. I am not sure however that we should
encourage the use of this capability, because this would imply
dependencies on specific gfortran versions, and would therefore
complicate toolchain transitions.

> There is no standard location of .mod files (nor version dependent
> ones).  Having discussion with not only gfortran upstream but also
> various commercial Fortran compiler vendors (Intel, PGI, NAG,
> etc.)will be necessary.

This is also solved by the above proposal (at least for the gfortran
world, and assuming that the proposed location will be effectively
standardized on). To be effective, the standard location should also be
added to gfortran search path.


I am willing to push this proposal forward, provided we reach some
consensus on the right technical solution. All comments are therefore
very welcome.

Cheers,

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: