Subject: Re: USE_FORTRAN problem
To: Adam Ciarcinski <>
From: None <>
List: tech-pkg
Date: 01/10/2000 15:17:48
On Mon, 10 Jan 2000, Adam Ciarcinski wrote:

> Hi,
> I guess there is something wrong in mk/ with USE_FORTRAN flag.
> There is
> [...]
> .if defined(USE_FORTRAN)
> .if !exists(/usr/bin/f77)
> PKG_FC?=                f2c-f77
> .endif
> # it is anticipated that once /usr/bin/f77 is more stable that the following
> # default will be changed to f77.  However, in the case where there is no
> # /usr/bin/f77, the default will remain as f2c-f77.
> PKG_FC?=                f2c-f77
> .if  (${PKG_FC} == "f2c-f77")
> BUILD_DEPENDS+=       f2c-f77:${PKGSRCDIR}/lang/f2c
> .endif
> [...]
> So when I set USE_FORTRAN=yes and /usr/bin/f77 exists, f2c-f77 package
> from lang/f2c builds anyway, right?  While it should not.  Or am I wrong?
> :)

so the issue is that /usr/bin/f77 has some problems on some platforms.
These problems vary from totally broken so you can't compile anything
(pmax) to mildly broken where code compiles but perhaps has some small
bugs (sparc, m68k).  So, thats why even if /usr/bin/f77 is there we still
default to f2c-f77.  Once these problems are addressed and /usr/bin/f77 is
working correctly, the second PKG_FC?= line will be changed to f77 which
will make /usr/bin/f77 be the default when it exists.

For now, if you wish to make f77 be the compiler used, then add

PKG_FC=	f77

to /etc/mk.conf and that will force the selection of /usr/bin/f77.  I have
not seen problems on i386 with /usr/bin/f77, only on other arch's.

I hope this answers your question.  Let me know if not.