[R] Successfully building 2.3.1 with Sun One Studio 8 on Solaris 9 (SPARC)

Rodney Sparapani rsparapa at mcw.edu
Tue Jun 20 21:52:18 CEST 2006


I had a hard time building 1.9.1 with the Sun One Studio
on Solaris (SPARC) almost 2 years ago.  I filed a bug report,
but I can't seem to find it right now.  For 2.3.1, I discovered
that the same problems remain.  Here are the tricks that
resolved them for me if anyone is interested.

#1. /usr/lib/cpp will give you nothing, but headaches.
Fortunately, the Solaris Software Companion CD (SSCC)
has an alternative version and alot of other goodies
that will make your life easier.  I'm assuming that you have
installed all of these tools in the default location:  /opt/sfw

#2. the Sun Performance library is also on the SSCC
which has optimized BLAS and LAPACK routines.  This is an
optional choice, so make sure you pick it.

#3. for some reason, the Foreign package will not build
initially.  So delete src/library/Recommended/foreign.tgz
and create src/library/Recommended/foreign.ts

#4. setup your environment to be as free software-friendly
as possible with /opt/sfw/bin in your PATH:
CONFIG_SHELL=/usr/xpg4/bin/sh
CC=cc
GCC=
CFLAGS=-xlibmil -dalign
CXX=CC
CXXFLAGS=-xlibmil -dalign
F77=f95
F95=f95
FFLAGS=-xlibmil -dalign
CPP=/opt/sfw/bin/cpp
CPPFLAGS=-I/opt/sfw/include
LDFLAGS=-L/opt/sfw/lib
BLAS_LIBS=-xlic_lib=sunperf

#5. configure, make and install
configure --with-blas --with-lapack
gmake
gmake install
cd src/library/Recommended
R CMD INSTALL foreign_0.8-15.tar.gz

#6. I also asked on R-help about how to install a bunch of
packages at once.  There were some interesting tips.  But, the
easiest way that I found was the command line:
for i in *.tar.gz
do
R CMD INSTALL $i
done

That did the trick for me.  Hopefully, I didn't leave anything
out.

Rodney



More information about the R-help mailing list