[R] Building R on Solaris (OpenIndiana) with gcc 4.6.2 for amd64 target - relocation problems solved

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Apr 7 08:13:08 CEST 2012


On 06/04/2012 19:38, Michael Figiel wrote:
> 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.

Your instructions are for the GNU linker: those in the manual are for 
the Solaris linker, which does not support --shared.

>
> Kind regards
> Michael Figiel
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list