Skip to content

problem on upgrading to RH6.2 (One solution)

5 messages · Jari Oksanen, Brian Ripley, Dirk Eddelbuettel +1 more

#
posse at talariainc.com said:
I am not sure this is safe. At least I was warned when I used a 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. 

Not all Fortran fails. For instance, MASS (or all of VR_*) loads (and runs) beautifully, although it uses many Fortran routines.

cheers, Jari Oksanen
#
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.)
#
On Fri, May 26, 2000 at 07:25:50AM +0100, Prof Brian D Ripley wrote:
Linux != Red Hat 

Don't trash all of Linux only because some dists don't get development
systems right. Trash those dists, and recommend one that works.
#
I would like first to thank Prof. Ripley for his hint.

R 1.01 built from the source and all contrib packages
work fine when using gcc-2.95.x  Too bad RedHat
stopped shipping it along ecgs since 5.2.

Two questions come from all the comments:

- is f2c unsafe? I was not able to find any comment
in the R distribution about what I just learned from
Prof Ripley and Oksanen. This would be certainly
an enlightening admission.

- My earlier installation of R with f2c produces
no error  when checking with "make check".
Can I conlcude that I had a safe installation?

Thanks again for any help.
Christian


----- Original Message -----
From: "Prof Brian D Ripley" <ripley at stats.ox.ac.uk>
To: "Jari Oksanen" <jhoksane at ecology.helsinki.fi>
Cc: "Christian Posse" <posse at talariainc.com>; "r-help"
<r-help at stat.math.ethz.ch>
Sent: Thursday, May 25, 2000 11:25 PM
Subject: Re: [R] problem on upgrading to RH6.2 (One solution)
on
have
a
-.-.-
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 26 May 2000, Christian Posse wrote:

            
I think it is slightly unsafe: see below.
Probably.  Unfortunately few things in make check test that you get the
right answer, just that things ran.  A few do, hence the reports on
R-bugs of errors in example(eigen) on some machines.  The problem is that
there are so many machine-accuracy points that it is hard to write
tests that will pass on all reasonable installations and fail on all
problematic ones.  (We, especially Martin Maechler, do try.)

My worry is as follows. If you configure R with f2c, it uses f2c for all
the contributed/local packages.  We have seen examples of packages that
compiled and ran under f2c even though the source code was not valid
Fortran and did not do what its author intended when translated.