Skip to content
Prev 5858 / 398506 Next

problem on upgrading to RH6.2 (One solution)

On Fri, 26 May 2000, Jari Oksanen wrote:

            
similar shortcut some years ago when I had some trouble with g77 
on MS-DOS (djgpp port). g77 used to apply f2c libraries in her 
childhood, but has grown independent since then and so the libraries 
forked (libf2c and libf2g). I think that there *may* be a danger of 
strange behaviour in some other places if we just resort to drop 
in f2c-libraries in g77, and at worst, this behaviour remains undetected. 

I think you mean libg2c.a.  That's not what --with-f2c does though:
it forces the installation routines to translate Fortran to C and then use
the C compiler on them.  That is, it uses f2c not just its libraries.

However, I still don't think this is a good idea. f2c + C accepts lots of
code that is not valid Fortran, so in particular is a bad idea for anyone
developing code.  And f2c makes lots of assumptions about how the Fortran
compiler should operate that are not always true of the real compiler.
(Trailing underlines, passing character strings in C style, for two.)  
More generally, a real Fortran compiler should generate better code (and on
the main platforms used for scientific computing the Fortran compilers have
had enormous effort expended on them, whereas g77 seems a poor cousin to
gcc).
MASS does not use Fortran on R.  The S-PLUS versions do, but I donated the
relevant code to modreg in R.  (And VR_* would not be valid Fortran
symbols.)

The problem here is that it appears that the Fortran system on (some?)
RH6.2 installations is broken.  My reaction whenever that happens on Linux
(far too frequently to be comfortable) is to get the latest version, so I
would suggest using gcc 2.95.2 which has been around and stable for quite a
while.  (BTW, g77 in egcs-1.1.2 aka 2.91.66 had problems on both Solaris
and Windows with R, so I was relieved to its passing.)