Kaspar Pflugshaupt
2002-Feb-04 14:00 UTC
[R] Installing contributed packages on MacOS X: Solved!
I had run into problems when compiling some contributed packages to an installation of R 1.40 by fink on MacOS X. Namely, packages KernSmooth (2.22-7) and cluster (1.4-0) would not find required libraries, though those were present on the system. Jeff Whitaker, the maintainer of the R fink packages, kindly sent me this:> Kaspar: It's not looking in /sw/lib, where the libs are (the "-L/sw/lib" > is missing). Probably a bug in the packages themselves, or in R - I don't > know which. Seems silly to assume they are installed in /usr/lib or > /usr/local/lib. However, the r-recommended package has both of these and > installs fine (but they are the older versions). You could also probably > install them by hand by downloading the source, then use > > setenv LDFLAGS -L/sw/lib > setenv CPPFLAGS -I/sw/include > R CMD INSTALL KernSmooth_2.22-7.tar.gz > > -JeffThat solved the problem here instantly. To the developers: Do I understand correctly that those two packages had their library path hard-coded instead of "inheriting" it from the R CMD INSTALL process? I had assumed that R CMD INSTALL would pass on the lib paths that R itself was compiled with, but I may be wrong... though a cursory reading of "Writing R Extensions" seems to confirm this. Anyway, it works now. Cheers Kaspar Pflugshaupt -- Kaspar Pflugshaupt Geobotanisches Institut Zuerichbergstr. 38 CH-8044 Zuerich Tel. ++41 1 632 43 19 Fax ++41 1 632 12 15 mailto:pflugshaupt at geobot.umnw.ethz.ch privat:pflugshaupt at mails.ch http://www.geobot.umnw.ethz.ch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian D Ripley
2002-Feb-04 14:43 UTC
[R] Installing contributed packages on MacOS X: Solved!
KernSmooth does not have any paths `hard-wired'. But pre-compiled packages do inherit from the R they were built under, in this case the location of BLAS_LIBS in etc/Makeconf. So looks like the problem is with whoever built the packages: definitely not `in the packages themselves'. On Mon, 4 Feb 2002, Kaspar Pflugshaupt wrote:> I had run into problems when compiling some contributed packages to an > installation of R 1.40 by fink on MacOS X. Namely, packages KernSmooth > (2.22-7) and cluster (1.4-0) would not find required libraries, though those > were present on the system. > > Jeff Whitaker, the maintainer of the R fink packages, kindly sent me this: > > > Kaspar: It's not looking in /sw/lib, where the libs are (the "-L/sw/lib" > > is missing). Probably a bug in the packages themselves, or in R - I don't > > know which. Seems silly to assume they are installed in /usr/lib or > > /usr/local/lib. However, the r-recommended package has both of these and > > installs fine (but they are the older versions). You could also probably > > install them by hand by downloading the source, then use > > > > setenv LDFLAGS -L/sw/lib > > setenv CPPFLAGS -I/sw/include > > R CMD INSTALL KernSmooth_2.22-7.tar.gz > > > > -Jeff > > That solved the problem here instantly. > > To the developers: Do I understand correctly that those two packages had > their library path hard-coded instead of "inheriting" it from the R CMD > INSTALL process? I had assumed that R CMD INSTALL would pass on the lib > paths that R itself was compiled with, but I may be wrong... though a > cursory reading of "Writing R Extensions" seems to confirm this.A cursory reading of the sources will elucidate this! -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._