[R] shared libraries on FreeBSD 4.*
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Oct 31 18:19:43 CET 2001
On Wed, 31 Oct 2001, loren mccarter wrote:
> I've used R for a couple of years on FreeBSD with few problems. Recently,
> a couple of the contributed packages seem to have difficulty finding
> symbols in the shared libraries. Currently, I'm running R 1.3.1 on FreeBSD
> 4.4. I've tried setting LD_LIBRARY_PATH to /usr/local/lib
> and some other things. The packages I've had trouble with are:
> Matrix 0.3.15
> RODBC 0.8.3
> RSPython 0.3
> Matrix could not find my BLAS library:
> checking for dgemm_ in -lcomplib.sgimath... no
> checking for zherk in -lblas... no
> checking for dgemm_ in -lblas... no
> could not find your BLAS library
> ERROR: Configuration failed for package `Matrix'
> I solved the problem with Matrix by adding -L/usr/local/lib to the 'FLIBS'
> variable in $RHOME/etc/Makeconf. Then, it found the library and installed
> just fine.
> RODBC gives me the following error:
> Installing source package `RODBC' ...
> creating cache ./config.cache
> checking for library containing SQLTables... no
> configure: error: no ODBC driver manager found
> ERROR: Configuration failed for package `RODBC'
> I have unixODBC and libiodbc installed in /usr/local/lib and "nm
> -g" returns the symbol SQLTables in libiodbc.so, libodbc.so,
> libodbcpsql.so, libpsqlodbc.so. -L/usr/local/lib is in the FLIBS
> statement so that is not the problem.
I think it is. FLIBS refers to Fortran, and this is looking for C
libraries. (Also, the configure script for RODBC is not looking for
FLIBS in $RHOME/etc/Makeconf.) I think you need to set LIBS to
(not FLIBS) to -L/usr/local/lib -R/usr/local/lib (or whatever the
FreeBSD equivalent is) before running these configure scripts.
That said, on all my platforms having LD_LIBRARY_PATH set correctly works.
> RSPython installs fine, but when I load the library in R
> 'library(RSPython' it returns the following:
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
> /usr/local/lib/R/library/RSPython/libs/RSPython.so: Undefined symbol
> Error in library(RSPython) : .First.lib failed
do ldd on RSPython.so: I suspect -lpthreads is needed (plus an appropriate
> Am I correct in thinking that these three issues result from a
> common problem with R and shared libraries on FreeBSD? Can
Well, FreeBSD is not a common platform for R but I recall no other
> you think of something that I am doing incorrectly upon installation
> or R or the packages that could cause these problems. In case it is
> relevant, FreeBSD uses an older version of libtool as compared to the one
> that comes with R. Here is the version information:
> FreeBSD libtool:
> ltmain.sh (GNU libtool) 1.3.4-freebsd-ports (1.385.2.196 1999/12/07
> R libtool:
> ltmain.sh (GNU libtool) 1.3e (1.890 2001/04/06 23:48:27)
> Thanks for any help you can provide!
> 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
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
More information about the R-help