tech-pkg archive

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

Re: Can we make gfortran the default Fortran?



On 12/26/17 12:50, Greg Troxel wrote:
Benny Siegert <bsiegert%gmail.com@localhost> writes:

On Tue, Dec 19, 2017 at 2:56 PM, Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
No, the main argument is that it interacts badly with the rest of the
system because gfortran isn't a Fortran compiler, but a full version of
GCC with a random set of languages. As such, it forces its own version
of libgcc_s, libstdc++ and whatever into the search path. G95 at least
only craps the libgcc_s into the search path and that could even be
killed moderately easy.
Maybe. But we are already using a pkgsrc gcc on a number of platforms.
How does the answer change if we had something like "do not use g95 if
using pkgsrc gcc, instead use that Fortran compiler"?
That might well be good, but there's work to be done.  We have been
discussing how to use a consistent compiler to start with, and that
seems poised to perhaps actually finally happen after the branch.

As Joerg said, a key point is to try to use the same compiler version
for everything.  If we are building a compiler anyway, we seem to get
gfortran and using the matching gfortran seems like an easy win.

It may also be possible to just build 4.8 from pkgsrc on machines with
4.8, to get gfortran.  Or maybe base should provide it, but we almost
certainly aren't going to pull that up to 7.  (6 doesn't matter, since
pkgsrc will build a compiler anyway.  And 7 might build 4.9.)

As a prototype for the upcoming changes Greg mentioned, I've been avoiding this whole issue on CentOS using the following combo in mk.conf.  Basically require the same pkgsrc gcc for everything except gcc and its dependencies.  This should work for other platforms as long as bootstrap uses GCC.  There are unresolved issues on clang-based systems.

I'm moving to gcc5 now, as the impact is only a few dozen broken packages.  Using gcc6 still causes hundreds of added failures.

The exemptions below cover gcc4x, 5, and 6.  Hence both bzip2 and xz, which are deps for different gcc packages.  You should only need to change the gcc package name to switch between versions.

PKGSRC_FORTRAN=        gfortran

.if \
    empty(PKGPATH:Marchivers/bzip2) && \
    empty(PKGPATH:Marchivers/pax) && \
    empty(PKGPATH:Marchivers/xz) && \
    empty(PKGPATH:Mconverters/help2man) && \
    empty(PKGPATH:Mconverters/p5-Unicode-EastAsianWidth) && \
    empty(PKGPATH:Mdevel/autoconf) && \
    empty(PKGPATH:Mdevel/gettext-lib) && \
    empty(PKGPATH:Mdevel/gettext-tools) && \
    empty(PKGPATH:Mdevel/gmp) && \
    empty(PKGPATH:Mdevel/gtexinfo) && \
    empty(PKGPATH:Mdevel/libtool-base) && \
    empty(PKGPATH:Mdevel/m4) && \
    empty(PKGPATH:Mdevel/ncurses) && \
    empty(PKGPATH:Mdevel/nbpatch) && \
    empty(PKGPATH:Mdevel/p5-gettext) && \
    empty(PKGPATH:Mlang/gcc5) && \
    empty(PKGPATH:Mlang/gcc5-libs) && \
    empty(PKGPATH:Mlang/perl5) && \
    empty(PKGPATH:Mmath/cloog) && \
    empty(PKGPATH:Mmath/isl) && \
    empty(PKGPATH:Mmath/mpcomplex) && \
    empty(PKGPATH:Mmath/mpfr) && \
    empty(PKGPATH:Mmisc/p5-Locale-libintl) && \
    empty(PKGPATH:Mpkgtools/cwrappers) && \
    empty(PKGPATH:Mpkgtools/digest) && \
    empty(PKGPATH:Mpkgtools/pkg_install-info) && \
    empty(PKGPATH:Msysutils/checkperms) && \
    empty(PKGPATH:Mtextproc/p5-Text-Unidecode)

GCC_REQD+=4.8

.endif  # GCC_REQD

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index