[R] Re: R-1.1.0 on Alpha?
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Thu Jul 13 09:00:00 CEST 2000
On Thu, 13 Jul 2000, Ray Brownrigg wrote:
> I asked:
> > Has anyone succeeded in compiling R-1.1.0 on a Digital (Compaq) Alpha
> > running OSF4.0F (or E)? Everything seems to compile OK (except the
> > frequent "Warning: Unresolved:" at link time - this threw me off the
> > scent for a while!), but then at run time I get:
> >
> > Fatal error: The X11 shared library could not be loaded.
> > The error was dlopen: cannot load ....../R-1.1.0/bin/R_X11.so
> >
> Well I've finally solved it - it was an 'rpath' problem!
>
> For completeness, here are the changes I had to make to config.site to
> get R running on Digital Unix 4.0F, using f77 and gcc. Systems with g77
> may not have some of these problems.
>
> 1) Add:
> CPPFLAGS="-I/usr/local/include -I/usr/X11R6/include"
> otherwise there are problems compiling tcltk
That is intended to be fixed already in R-patched: could you try that?
(It sets PKG_CPPFLAGS in src/library/tcltk/src/Makefile. Whether this is
needed seems to depend on the Tcl version.)
> 2) Add:
> LIBS="-L../../.. -L/usr/local/lib"
> to include a 'private' copy of readline.a, otherwise I get the following
> when linking R.bin:
> ld:
> Object file format error in:
> /usr/local/lib/libreadline.a(tilde.o):local_is_complete:
> iaux(21) > iauxMax(14) for obj /usr/local/lib/libreadline.a(tilde.o)
> fort: Severe: Failed while trying to link.
>
> As far as I can remember, my 'private' libreadline.a has the -g option
> specified, whereas the system one does not. [So this may not be a
> problem in other systems.]
Looks like a compiler-mix problem to me, as you hint. Let us assume that
is specific to you.
> 3) Add:
> MAINLDFLAGS="-Wl,-rpath -Wl,/usr/X11R6/lib"
> This is the key to setting appropriate shared library paths in the main
> program. Under R-1.0.0 this flag was known as LDFLAGS.
Um. The X11 flags are found from xmkmf. My Solaris box has
X_LIBS = -L/usr/openwin/lib -R/usr/openwin/lib -lX11
for example, and R_X11.so is built with $(X_LIBS). So is the -rpath
missing in X_LIBS, or is there something else wrong? Can you take a
look at the command used to build R_X11.so (in src/unix/X11)?
My understanding is that setting the rpath on the dynamic library
(not the main executable) should suffice, but perhaps DU-4.0 is different
from everything else.
The simplest way out is to add /usr/X11R6/lib to R_LD_LIBRARY_PATH
in the R front-end script, I guess. It might be desirable to do the
equivalent of that on all platforms.
--
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