Re: [Rd] some fixes for R 2.01.1 on OpenSolaris using Sun Studio compilers

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 22 Mar 2010 16:51:55 +0000 (GMT)

On Mon, 22 Mar 2010, Kostas Oikonomou wrote:

> Hello,
>
> I recently built a 64-bit R 2.10.1 on OpenSolaris using the Sun Studio 12.1
> compilers. I would like to contribute the following notes, to update the
> OpenSolaris installation instructions.

Do you mean the R-admin manual? Your 'updates' all seem to be failures to follow that manual.

> ================================================
>
> 0. GNU libiconv and GNU gettext are assumed to be in /opt/lib.

Assumed by whom? Not by our manual.

> GNU libiconv is easy to build from source. After building it, configure
> gettext like this:
>
> configure --prefix=/opt/lib --with-included-gettext CC=cc CFLAGS=-m64
> LDFLAGS=-lsec
> make
> pfexec make install

Why do you do this rather than use R's included gettext?

> 1. export PATH=/opt/lib/bin:$PATH
>
> 2. Edit R's configure in *three* places to add the 2nd ${CFLAGS} below:

No, please don't: rather RTFM. The R-admin manual has things like

CC="gcc -m64"

and it seems you needed

CC="cc -m64 -xarch=native"

If you need specific options to run a compiler, they are part of CC (and so on) and not CFLAGS.

> if ${CC} ${CFLAGS} -c conftest.c 1>&5 2>&5; then
> ## <NOTE>
> ## This should really use MAIN_LD, and hence come after this is
> ## determined (and necessary additions to MAIN_LDFLAGS were made).
> ## But it seems that we currently can always use the C compiler.
> ## Also, to be defensive there should be a similar test with SHLIB_LD
> ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
> ## use ld for SHLIB_LD) ...
> if ${CC} ${CFLAGS} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
> conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
> ${LIBM} 1>&5 2>&5;
> ## </NOTE>
>
>
> 4. configure --prefix=/opt/R/2.10.1 --disable-nls --enable-R-shlib
> --with-libintl-prefix=/opt/lib
> CC=cc CFLAGS='-O -m64 -xarch=native' CPPFLAGS=-I/opt/lib/include
> LDFLAGS='-m64 -L/opt/lib/lib -R/opt/lib/lib'
> LIBS=-liconv CXX=CC CXXFLAGS='-O -m64 -xarch=native'
> F77=f95 FFLAGS='-O -m64 -xarch=native'
> R_BROWSER=opera R_PDFVIEWER=evince

>
>
> 5. The results of running the tests:

>
> cd tests.
> make test-Examples Ok
> make test-Specific Ok
> make test-Reg
> running tests of plotting Latin-1
> expect failure or some differences if not in a Latin or UTF-8 locale
> running code in 'reg-plot-latin1.R' ... FAILED
> make test-Demo Ok
> make test-Random Ok
> make test-Internet Ok
>
> =======================================================
>
>
> Regards,
>
> Kostas Oikonomou
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 22 Mar 2010 - 16:56:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 22 Mar 2010 - 18:21:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive