[R] R INSTALL: problem related to LD_LIBRARY_PATH

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu Jul 18 12:59:38 CEST 2002


On 18 Jul 2002, Peter Dalgaard BSA wrote:

> Agustin Lobo <alobo at paleo.ija.csic.es> writes:
>
> > Well, I've found that the line in INSTALL
> > that gives the problem is
> > gzip -dc "${1}" | (cd "${tmpdir}" && tar -xf -)
> > ("tar: /usr/local/lib/libpthread.so.0: version `GLIBC_2.2' not found
> > (required by /lib/librt.so.1)")
> >
> > If I run that command from the shell, i.e.,
> >
> > gzip -dc KernSmooth_2.22-7.tar.gz | (cd /tmp/R.INSTALL.2186 && tar -xf -)
> >
> > it runs ok.
> >
> > I've compared my environment setings within R INSTALL and outside R
> > INSTALL and found that a major difference is that
> > in my shell I do not have LD_LIBRARY_PATH set to anything, while R
> > sets LD_LIBRARY_PATH to:
> >
> > LD_LIBRARY_PATH=/usr/local/lib/R/bin:/usr/local/lib:/usr/local/lib:/usr/local/lib:
> > /usr/lib/gcc-lib/i486-suse-linux/2.95.3:/usr/i486-suse-linux/lib:/usr/X11/lib:/usr/lib:/usr/lib:
> > /usr/X11R6/lib:/usr/lib:/usr/lib:/usr/lib
> >
> > If I include
> > unset LD_LIBRARY_PATH
> >
> > in INSTALL, R INSTALL works.
> >
> > Therefore, it's clear that I have a problem with the LD_LIBRARY_PATH env.
> > var. that is set by R.
> >
> > Does anyone know what can be wrong with my R LD_LIBRARY_PATH ?
>
> This is really Kurt's domain, but the absence of /lib in the path
> looks suspicious. You could try inserting it manually (and get rid of
> the duplicates). Also, are you sure you want to pick up libpthread
> from /usr/local (could this be an old version)?

The next check I would do would be `ldd tar' both with LD_LIBRARY_PATH set
and unset.  That should tell you what is being found in different places.
I agree with Peter: /usr/local/lib looks to contain incompatible versions,
probably older ones.  You may want to set LDFLAGS when building R to
exclude /usr/local/lib if you can't clean up the incompatibilities.

It is intentional that /usr/local/lib precedes /usr/lib, and AFAIK the
standard places (/usr/lib, /lib if different) are searched after those in
LD_LIBRARY_PATH.  Some Unixes have /usr/local/lib in the standard places,
but these days most do not.

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