[R] Re: R-1.1.0 on Alpha?

Ray Brownrigg Ray.Brownrigg at mcs.vuw.ac.nz
Thu Jul 13 06:30:55 CEST 2000

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

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:
Object file format error in:
 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.]

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.

There is a minor 'feature' in the configure script, which results in the
if: Expression syntax.
In line 6213 there is:
  if test "`which ${cc}`" = "`which ${CC}`"; then 
The "which ${cc}" within this is what issues the error, because $cc is
the string
"gcc -fpcc-struct-return" and the command:
which gcc -fpcc-struct-return
from a Bourne shell will return that message.  Interestingly,
$ which -a
does not issue the message, but
$ which -f
does!  This looks like a weird bug to me.  [On a Sun Solaris system we
$ which -f
if: Missing file name
which is just as strange.]

Ray Brownrigg
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