[R] package installation problems

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 18 11:43:21 CEST 2006


On Tue, 18 Jul 2006, Demmler J. wrote:

> Hello,
> 
> I just updated from R 2.1.1 to R 2.3.1 (I also updated from Fedora 3 to

How?  Did you install an RPM?  Before or after OS update?
I checked the RPM for fc4 on CRAN which has

  C compiler:                gcc  -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables
  Fortran 77 compiler:       gfortran  -O2 -g -pipe 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 
-fasynchronous-unwind-tables

  C++ compiler:              g++  -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables
  Fortran 90/95 compiler:    gfortran -g -O2

not as you show.  However, read on.

> Fedora 4 if that is of any importance). However, several packages (e.g.
> fields etc.) refuse to be installed. I get the following error message:
> 
> [root at localhost R-files]# R CMD INSTALL fields_2.3.tar.gz
> * Installing *source* package 'fields' ...
> ** libs
> g77   -fpic  -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -c css.f -o css.o
> f771: invalid option `tune=pentium4'
> make: *** [css.o] Error 1
> ERROR: compilation failed for package 'fields'
> ** Removing '/usr/lib/R/library/fields'
> 
> For some reason -mtune is set to Pentium 4, although I'm using an Athlon-XP.

That may not actually be a problem: the problem is that your compiler is 
not recognizing -mtune.   (I seem to have run R RPMs for fc3 with 
-march=i386 -mtune=pentium4 on a dual Athlon MP.  'tune' should generate 
code that runs on other CPUs, just not optimally.)

> I searched the files in the fields package for this line but couldn't find
> it. Other packages, like f.i. maps didn't have any problems.
> 
> I hope anyone can help me, as I need those packages urgently for my PhD
> project.

The options are coming from the version of R you installed.  I would 
expect R compiled for FC4 to be using gfortran not g77 (as in the CRAN 
RPM).  The simplest way out here is compile R from the sources on your 
actual machine, but you could try replacing your RPM with the CRAN fc4 
one.


-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list