How did you install R?
This looks like an issue where R was built wiht g77 bu that is no
longer present.
A system using gcc 4.1.2 should be using gfortran not g77 (for
compatibility).
R 2.7.1 is obsolete: I suggest you install a current R from the
sources (or a source RPM).
On Tue, 20 Jan 2009, Richard Yanicky wrote:
> I have search the help archives and can't find a direct reference to
the
> following issue:
>
>
>
> When installing randomForest on under CentOS 5.2 , R version 2.7.1 with gcc
> 4.1.2.
>
>
>
> We receive the following error (see below, can't find ?lg2c) it is in
the
> path!
>
>
>
> root at abcsci12 ~]# R CMD INSTALL
> /scisys/home/yanicrk/randomForest_4.5-28.tar.gz
>
> * Installing to library '/usr/lib64/R/library'
>
> * Installing *source* package 'randomForest' ...
>
> ** libs
>
> gcc -I/usr/lib64/R/include -I/usr/local/include -fpic -O2 -g
-std=gnu99
> -c classTree.c -o classTree.o
>
> gcc -I/usr/lib64/R/include -I/usr/local/include -fpic -O2 -g
-std=gnu99
> -c regrf.c -o regrf.o
>
> gcc -I/usr/lib64/R/include -I/usr/local/include -fpic -O2 -g
-std=gnu99
> -c regTree.c -o regTree.o
>
> gcc -I/usr/lib64/R/include -I/usr/local/include -fpic -O2 -g
-std=gnu99
> -c rf.c -o rf.o
>
> g77 -fpic -O2 -g -c rfsub.f -o rfsub.o
>
> gcc -I/usr/lib64/R/include -I/usr/local/include -fpic -O2 -g
-std=gnu99
> -c rfutils.c -o rfutils.o
>
> gcc -shared -Wl,-O1 -o randomForest.so classTree.o regrf.o regTree.o rf.o
> rfsub.o rfutils.o -lg2c -lm -L/usr/lib64/R/lib -lR
>
> /usr/bin/ld: cannot find -lg2c
>
> collect2: ld returned 1 exit status
>
> make: *** [randomForest.so] Error 1
>
> ERROR: compilation failed for package 'randomForest'
>
> ** Removing '/usr/lib64/R/library/randomForest'
>
>
>
> Any assistance would be greatly appreciated.
>
>
>
> Rich
>
> [[alternative HTML version deleted]]
>
>
--
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