Transitioning from g77 to gfortran
We would like to present the G77 to gfortran transition as a Lenny release goal. The Debian developers responsible for the transition are Riku Voipio <riku.voipio@iki.fi> (fortran application and library packages) and Mathias Klose <doko@debian.org> (toolchain packages). For discussion, please use <debian-toolchain@lists.debian.org> mailing list.
Why
Upstream released the last version of the g77 front end with GCC-3.4. gfortran 4.2 is now considered a viable replacement for g77. However, code must not link at the same time against -lg2c and -lgfortran. To allow partial upgrades we need to rename all library packages built with g77 and linked against g2c when they are rebuilt with gfortran.
Once the transition is completed, we are able to remove GCC-3.4 from the distribution (gpc needing an update for GCC-4.1 as well).
How
If your package build-depends on g77, you need to adjust your build-depends from g77 to gfortran. If you build-depend on a library package containing a shared library linked against libg2c, wait until all of these libraries are rebuilt with gfortran. Tighten the build-depends on those lib*-dev packages to the first version built with gfortran.
If your package provides a library that exports fortran functionality, it needs to be renamed. The recommended suffix for the new package name is "gf". If your package is affected by also by the long double transition, you can choose whichever suffix for your library.
Finally, if you now ship same files in different packages (such as a library in /usr/lib), you need to Conflict and Replace with the old package.
For example, lapack3 is now:
Package: lapack3 Binary: lapack3, lapack3-test, lapack3-dev, lapack3-pic, lapack3-doc Build-Depends: debhelper (>= 4), g77, refblas3-dev
should become:
Package: lapack3 Binary: lapack3gf, lapack3-test, lapack3-dev, lapack3-pic, lapack3-doc Build-Depends: debhelper (>= 4), gfortran, refblas3-dev (>= <first version built with gfortran) ... Package: lapack3gf ... Replaces: lapack3 Conflicts: lapack3
Possible Issues
Some of the command line options supported by g77 have been dropped. You can usually just drop them.
On ia32 and amd64, you might need to use the -ffloat-store option for gfortran to achieve identical behaviour with floating points. This was at least the case for refblas3. This option will have strong negative impact on performance.
getarg and some other g77 specific functions have been removed from gfortran. See [http://lists.debian.org/debian-toolchain/2007/07/msg00013.html this posting] to workaround this in gfortran.
Ask on debian-toolchain list for any other issues.
Status
Legend |
|
|
Transitioned |
|
Has issues |
|
Unfixed / Needs upload |
|
Ready for binNMU |
|
Depending packages need to migrate first |
|
Transitioned |
|
In experimental / NEW |
Package |
State |
Trivial packages |
use g77 but do not use or provide fortran libs |
med-fichier |
|
pvm |
#449297 |
zivot |
|
libtool |
#441751 |
minpack |
|
multimix |
#449458 |
saods9 |
#449456 |
cfitsio3 |
|
fftw3 |
(compiled with gfortran -f2c) |
main knot |
status |
needs library rename |
reflbas3 |
|
yes |
lapack3 |
|
yes |
atlas3 |
|
yes |
lam |
#456418 |
no? |
mpich |
|
yes |
petsc |
libsuitesparse-dev, libsuperlu3-dev atleast |
? |
suitesparse |
compiled with gfortran *and* g77 |
? |
cernlib |
|
yes |
geant321 |
cernlib, paw |
yes |
mclibs |
cernlib |
yes |
mn-fit |
cernlib, paw |
no |
paw |
cernlib |
yes |
fftw |
mpich |
yes |
gsl |
refblas |
no |
netcdf |
|
no |
dsdp |
|
no |
octave 2.1 |
multiple |
no |
octave 2.9 |
multiple |
no |
libextutils-f77-perl |
doesn't gfortran make this obsolete? |
Leaf packages |
|can be fixed as soon as all their dependencies have been transitioned |
arpack |
refblas + lapack |
gsl |
refblas (binNMUable?) |
r-base |
refblas + atlas (binNMUable?) |
lush |
gsl |
r-noncran-lindsey |
r-base-dev |
mpqc |
refblas + lapack |
psicode |
refblas + lapack |
pysparse |
refblas + lapack |
python-numarray |
refblas + lapack |
python-numeric |
refblas + lapack |
blitz++ |
atlas3 |
wsjt |
build-depends on libg2c0-dev *and* gfortran?? |
tela |
libhdf4 + refblas + lapack orphaned |
pdl |
gsl |
blacs-pvm |
pvm |
blacs-mpi |
lam mpich |
scalapack |
blacs-pvm blacs-mpi lapack refblas |
gromacs |
fftw3 mpich lam |
kst |
cfitsio gsl |
k7fftwgel |
mphich |
k6fftwgel |
mphich |
p4fftwgel |
mphich |