Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 23:36:41 GMT
From:      NAKATA@FreeBSD.org, Maho<maho@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/107601: [RFC] Add WANT_FORTRAN knob: migration to gfortran (Fortran 90/95)
Message-ID:  <200701052336.l05NafaS052702@www.freebsd.org>
Resent-Message-ID: <200701052340.l05NeFw3048519@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         107601
>Category:       ports
>Synopsis:       [RFC] Add WANT_FORTRAN knob: migration to gfortran (Fortran 90/95)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 05 23:40:15 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     NAKATA, Maho
>Release:        6.1
>Organization:
FreeBSD.org
>Environment:
FreeBSD debussy.private.org 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat Sep  9 08:10:00 JST 2006     maho@debussy.private.org:/usr/src/sys/i386/compile/MAHO  i386

>Description:
gcc42 supports Fortran90/95 as gfortran. The Fortran compiler comes with
gcc3 or earlier are g77; Fortran77. Recently a number of software are written in Fortran90/95, thus migration is desirable.

* No binary compatibility between g77/gfortran. thus we must recompile.
-> if a port depends on fortran90/95 thus gfortran, and math/lapack or math/blas, lapack and blas must be compiled with gfortran.


>How-To-Repeat:

>Fix:
Add WANT_FORTRAN knob in bsd.port.mk (or something like that)
approreately.

* WANT_FORTRAN=yes
We install gfortran42 (or later version) if not present in the system.
and we use gfortran42 as FC and F77.
* WANT_FORTRAN=f77
Install g77 if not present in the system. This is highly unrecommended, just for isolated port and legacy reason.
* WANT_FORTRAN=ifc
Install lang/ifc. This compiler is efficient for high performance computing, but not a free software.

IMHO in this way, we can migrate to gfortran smoothly.
1. If FreeBSD 7 will not include gfortran42 but gcc42, and ports will install gfortran42 in lang/gcc42.
   * Fortran 77 (a case that g77 is required)
  -> FBSD7 : USE_GCC=3.4 is enough.
  -> FBSD6 : USE_GCC=3.4 is simply ignored.
  -> FBSD5 : USE_GCC=3.4 will install g77-34 and fine with it.
   * Fortran 90/95
  -> FBSD7 : WANT_FORTRAN knob is mandatory for Fortran 90 as USE_GCC=4.2+ won't install gfortran42 automatically.
  -> FBSD 5 and 6: USE_GCC=4.2+ will install gfortran42 and this is enough.
2. If FreeBSD 7 will include gfortran42, and ports will install
   gfortran42 with USE_GCC=4.2+
   * Fortran 77 (g77 is required)
  -> FBSD7 : USE_GCC=3.4 is enough.
  -> FBSD6 : USE_GCC=3.4 is simply ignored.
  -> FBSD5 : USE_GCC=3.4 will install g77-34 and fine with it.
   * Fortran 90/95
  -> FBSD7 : USE_GCC=4.2+, gfortran42 in the base system is used.
  -> FBSD 5 and 6: USE_GCC=4.2+ will install gfortran42 and this is okay.

3. If FreeBSD 7 will not include gfortran42, and ports will install
   gfortran in lang/gfortran.
   * Fortran 77 (g77 is required)
  -> FBSD7 : USE_GCC=3.4 is enough.
  -> FBSD6 : USE_GCC=3.4 is simply ignored.
  -> FBSD5 : USE_GCC=3.4 will install g77-34 and fine with it.
   * Fortran 90/95
  -> FBSD7 : Creation WANT_FORTRAN knob is mandatory (will install lang/gfortran)
  -> FBSD 5 and 6: Creation WANT_FORTRAN knob is mandatory. (will install lang/gfortran)

Cons: always install gfortran42, thus gcc42, g++42 as well. ;)

The first step might be adding dummy knob WANT_FORTRAN for ports that
requires Fortran77 or Fortran90/95, to identify which ports are
using Fortran.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701052336.l05NafaS052702>