[R] path to libgfortran 'hardcoded' in R?
Charles C. Berry
cberry at tajo.ucsd.edu
Sat Oct 20 18:07:10 CEST 2007
On Sat, 20 Oct 2007, Rainer Hurling wrote:
> I am using R-2.6.0 on FreeBSD 8.0-CURRENT (i386). In the last days I had
> problems when building packages SparseM, lme4 and randomForest.
>
> The below message shows for randomForest, that 'libgfortran' was not
> found. The same error appeared with SparseM and lme4.
>
>
> ---------------------------------
> R CMD INSTALL randomForest_4.5-19.tar.gz
> * Installing to library '/usr/local/lib/R/library'
> * Installing *source* package 'randomForest' ...
> ** libs
> gcc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -fpic -g -O2 -c classTree.c -o classTree.o
> gcc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -fpic -g -O2 -c regTree.c -o regTree.o
> gcc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -fpic -g -O2 -c regrf.c -o regrf.o
> gcc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -fpic -g -O2 -c rf.c -o rf.o
> gfortran -fpic -g -O2 -c rfsub.f -o rfsub.o
> gcc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include
> -I/usr/local/include -fpic -g -O2 -c rfutils.c -o rfutils.o
> gcc -std=gnu99 -shared -L/usr/local/lib -o randomForest.so classTree.o
> regTree.o regrf.o rf.o rfsub.o rfutils.o
> -L/usr/local/lib/gcc-4.2.2/gcc/i386-portbld-freebsd7.0/4.2.2
> -L/usr/local/lib/gcc-4.2.2 -lgfortran -lm -lgcc_s -L/usr/local/lib/R/lib -lR
> /usr/bin/ld: cannot find -lgfortran
> *** Error code 1
>
> Stop in /tmp/R.INSTALL.QXafuj/randomForest/src.
> ERROR: compilation failed for package 'randomForest'
> ** Removing '/usr/local/lib/R/library/randomForest'
> ** Restoring previous '/usr/local/lib/R/library/randomForest'
> ---------------------------------
>
>
> Two weeks ago I upgraded from gcc-4.2.2 to gcc-4.2.3, so the search path
> for the library was not valid any more when trying to build these packages.
>
> Rebuilding and installing R-2.6.0 itself does the job. Now these
> packages are able to find libgfortran and all packages install as expected.
>
> Is it essential for packages like randomForest to get this library path
> from R itself? Or is this just an inaccuracy, not to say a bug?
Not a bug.
I believe the term 'reverse dependency' is used generally. You upgrade one
software upon which a second software depends and that second software
breaks. In this case R is the second software and gcc is the first. You
fix it just as you did by rebuilding the second software.
See
http://en.wikipedia.org/wiki/Dependency_hell
and links there for info on why softwares use such dependencies.
Chuck
>
> Sincerely,
> Rainer
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the R-help
mailing list