[R] shared libraries on FreeBSD 4.*

loren mccarter lorenmc at socrates.berkeley.edu
Fri Nov 2 18:07:47 CET 2001

Thanks for the additional information! In response to the question: 

> Kurt Hornik writes:
> Hmm ... why did you think that LIBS from R_HOME/etc/Makeconf was being
> used?  

I thought $R_HOME/etc/Makeconf was being used because I had a similar
problem with the Matrix package (0.3-9) where it could not find my BLAS
library. The solution in that case was to add -L/usr/local/lib to the
FLIBS definition in $R_HOME/etc/Makeconf. I incorrectly assumed that
packages will look there for library paths. 

> It is not clear whether one should use the information about libs and
> headers in non-standard locations which was used when building R also
> when building add-on packages.  What we could maybe do was to provide
> some autoconf macros for accessing such information, and we definitely
> need to do this for BLAS (which has been on my TODO list for some
> time).

Yes, this would be helpful, although I think you've already done an
excellent job because with most packages and base R I really haven't had a
problem, just three packages (RODBC, RSPython and Matrix). I've learned a
bit more about shared libraries on FreeBSD over the past couple of days
and it appears that the issues I've had are quite simple: I just needed to
tell the R package where the library is located (e.g., -L/usr/local/lib,
LIBS=, FLIBS= or LD_LIBRARY_PATH) and make sure I specify the correct name
of the actual library that should be used (e.g., -lc_r). Pretty basic
stuff that I had neglected (the R Core team has done such a wonderful job
with making things easy that I haven't had to learn about these technical
issues until now). I'm actually glad I was 'forced' to dig in and
figure it out. The libraries were available on FreeBSD (or could be
installed through the FreeBSD Ports collection) but I just wasn't telling
the R packages where to find them. 



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 mailing list