[R] Fortran level mismatch between package and R

Steve Simmons scs at umich.edu
Fri Jan 18 17:58:55 CET 2008


We have a user here who is attempting to compile a package which  
requires f90 (gfortran will do). Our version of R was built with f77  
(g77). When the user attempts to build the package, f77 is always  
invoked and fails due to the presence of f90 features.

Is there a simple method or some documentation on how to force a  
package build to use a different compiler than the one used in  
building R? If so, are opening ourselves up to any problems? In  
particular, we're concerned about API mismatches and fortran library  
mismatches, but there may be other problems we've not considered.

We're using R 2.4.1, linux 2.6/x64, gcc/gfortran 4.0.

To pre-answer some possible questions/suggestions -

Doing a full conversion of our R installation is almost certainly not  
feasible; we also have legacy packages in place which don't build  
with f90/f95.

Yes, we've thought of installing R built with gfortran and retaining  
the old with f77; that's probably our first fallback. Unfortunately  
that shuts legac package users from R improvements and will shut them  
out from packages which start require R2.6 and up features. We do  
*not* wish to run a f77 version of R2.6 and a f95 version of R2.6.  
That's probably our last fallback.

Neither Suleman nor I are on the r-help mailing lists; please try to  
cc us on responses. We'll use the maillist archives to try and catch  
the responses which don't do that.

Advance thanks,

Steve Simmons



More information about the R-help mailing list