problem on upgrading to RH6.2 (One solution)
On Fri, 26 May 2000, Jari Oksanen wrote:
posse at talariainc.com said:
I finally found a way around though the underlying problem persists. It seems that the problem is with g77. Only the packages using FORTRAN failed to be loaded correctly in either way (R from rpm or built from scratch).
The solution was to build R from the source using the flag
--with-f2c
with ./configure.
All contrib packages installed with this version of R are loaded correctly and, as far as I can superficially see, work. make check gives positive feedback.
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. 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).
Not all Fortran fails. For instance, MASS (or all of VR_*) loads (and runs) beautifully, although it uses many Fortran routines.
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.)
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._