[R] Building R on Solaris (OpenIndiana) with gcc 4.6.2 for amd64 target - relocation problems solved
Michael Figiel
mifigiel at gmx.net
Fri Apr 6 20:38:00 CEST 2012
Hello,
the "R Installation and Administration" handbook states in Section C 5.1:
For ‘amd64’ the builds have failed to complete in several different
ways, currently with relocation errors for libRblas.so.
To fix it: add '-shared' to the SHLIB_LDFLAGS, SHLIB_CXXLDFLAGS and
SHLIB_FCLDFLAGS before starting configure.
So the complete set of variables' values sufficient to build for the
amd64 target (as used on OpenIndiana 151a2 with gcc 4.6.2):
SHLIB_LDFLAGS=-shared
SHLIB_CXXFLAGS=-shared
SHLIB_FCLDFLAGS=-shared
CFLAGS=-m64
CXXFLAGS=-m64
FFLAGS=-m64
FCFLAGS=-m64
LDFLAGS=-m64 -L/usr/local/lib/amd64
CPPFLAGS=-I/usr/local/include
Additionally you'll need the gnu libiconv, which resides probably in
/usr/gnu, so the CPPFLAGS will need an -I/usr/gnu/include and the
LDFLAGS needs a -L/usr/gnu/lib/amd64 (on my machines I keep everything
in /usr/local therefor no reference to /usr/gnu )
If you prefer to use the Solaris linker (/usr/bin/ld) add
-fno-gnu-linker to the SHLIB_* variables and make sure, your PATH
doesn't list /usr/gnu/bin before /usr/bin.
I've got only OpenIndiana machines, but it should work on Solaris 10/11,
too.
Kind regards
Michael Figiel
More information about the R-help
mailing list