HowToBuildR ForSolaris: Difference between revisions

From BRF-Software
Jump to navigation Jump to search
imported>MichaelDondrup
No edit summary
m (18 revisions)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
= Tips how to build R and Bioconductor using the [[SunPro]] 12 Compiler Suite =
= Tips how to build R and Bioconductor using the [[SunPro]] 12.1 Compiler Suite =


== Synopsis ==
== Synopsis ==
Line 20: Line 20:


<pre><nowiki>
<pre><nowiki>
dizzy~> which cc
azteca~> which cc
/opt/SUNWspro/bin/cc
/vol/studio-12.1/bin/cc
dizzy:~> cc -V
azteca:~> cc -V
cc: Sun C 5.8 Patch 121015-06 2007/10/03
cc: Sun C 5.10 SunOS_i386 Patch 142363-02 2009/09/21
dizzy:~> which CC
azteca:~> which CC
/opt/SUNWspro/bin/CC
/vol/studio-12.1/bin/CC
dizzy:~> CC -V
azteca:~> CC -V
CC: Sun C++ 5.8 Patch 121017-17 2008/11/12
CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
dizzy:~> which f95
azteca:~> which f95
/opt/SUNWspro/bin/f95
/vol/studio-12.1/bin/f95
dizzy:~> f95 -V
azteca:~> f95 -V
f95: Sun Fortran 95 8.2 Patch 121019-10 2008/04/16
CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
dizzy:~> uname -a
azteca:~> uname -a
SunOS dizzy 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Fire-V440 Solaris
SunOS azteca 5.10 Generic_142901-03 i86pc i386 i86pc Solaris
</nowiki></pre>
</nowiki></pre>


Line 51: Line 51:


* http://cran.r-project.org/mirrors.html and choose a mirror
* http://cran.r-project.org/mirrors.html and choose a mirror
* if having problems with building, use R-patched: ftp://ftp.stat.math.ethz.ch/Software/R/
* if having problems with building, use R-patched: ftp://ftp.stat.math.ethz.ch/Software/R/ or try R-latest: http://cran.r-project.org/src/base-prerelease/R-latest.tar.gz
* check the md5 sums to verify package integrity <code><nowiki>  </nowiki></code>
* check the md5 sums to verify package integrity <code><nowiki> Nope! Would be neat but no checksums provided! </nowiki></code> ;-)
* unpack the sources to your build directory: <code><nowiki> tar xvzf R-<rversion>.tar.gz  </nowiki></code>
* unpack the sources to your build directory: <code><nowiki> tar xvzf R-<rversion>.tar.gz  </nowiki></code>
* for multiple architectures it's best to have a build dir for each platform
* for multiple architectures it's best to have a build dir for each platform (separate x86 and sparc directories)
* use a separate sparc and i386 directory
* see the '''R Installation and Administration''' from CRAN document for more details
* see the '''R Installation and Administration''' from CRAN document for more details


== Building ==
== Building ==
* R must be built for each architecture individually: sparc and opteron, i386
* R must be built for each architecture individually: i386 (32bit), amd64 (64bit) and sparc
* If building a new version start on the faster one, aka. opteron, use qxterm86 to get a build machine use azteca
* If building a new version start on the faster one, aka. opteron, use qxterm86 to get a build machine or use azteca
* Use qxterm for a sparc machine
* Use qxterm for a sparc machine
* change to your source directory  <code><nowiki> cd i386/R-version </nowiki></code>
* change to your source directory  <code><nowiki> cd R-version-x86 </nowiki></code>


=== Configure ===
=== Configure ===
* To enable configure to find all the libraries, you need to configure environment variables
* To enable configure to find all the libraries, you need to configure environment variables
* Use a little script to save this:
* Use a little scriptsave this in your source directory:


<pre><nowiki>
<pre><nowiki>
Line 73: Line 72:
# Set the prefic to your versioned architecture specific volume
# Set the prefic to your versioned architecture specific volume
# If you just want to test building use a local directory
# If you just want to test building use a local directory
PREFIX=/vol/r-2.8.1
PREFIX=/vol/r-<version>
# please note: this script was tested on r-2.11


# use this per:
# use this per:
PERL_PREFIX=/vol/perl-5.8.8
PERL_PREFIX=/vol/perl-5.8.8
TCL_PREFIX=/vol/tcl-8.4.13
TCL_PREFIX=/vol/tcl-8.4.13
 
CSW_PREFIX=/vol/studio-12.1


CC="cc -xc99"
CC="cc -xc99"
CPPFLAGS="-I/opt/SUNWspro/include/"
CPPFLAGS="-I$CSW_PREFIX/include/"
CPPFLAGS="$CPPFLAGS -I$TCL_PREFIX/include -I/vol/local/include -I/vol/graphics/include -I/vol/gnu/include"
CPPFLAGS="$CPPFLAGS -I$TCL_PREFIX/include -I/vol/local/include -I/vol/graphics/include -I/vol/gnu/include -I/vol/gnu/include/readline"
CFLAGS="-O -xlibmieee"
CFLAGS="-O -xlibmieee"
F77=f95
F77="f95"
FFLAGS=-O4
FFLAGS=-O4
CXX=CC
CXX="CC"
CXXFLAGS=-O
CXXFLAGS="-O"
FC="f95  -xO2"
#R recommendation (liberal interpretation): CXXFLAGS="-O -features=tmplrefstatic"
#Michi recommended: FC="f95  -xO2"
FC="f95"
FCFLAGS=$FFLAGS
FCFLAGS=$FFLAGS
LDFLAGS="-lCstd -lCrun -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
LDFLAGS="-lCstd -lCrun -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"
LDFLAGS="$LDFLAGS -L$TCL_PREFIX/lib -R$TCL_PREFIX/lib -L/vol/local/lib -R/vol/local/lib -L/vol/graphics/lib -R/vol/graphics/lib  -L/vol/gnu/lib -R/vol/gnu/lib -R$PREFIX/lib/R/library/RSPerl/libs -R$PREFIX/lib/R/bin"
LDFLAGS="$LDFLAGS -L$TCL_PREFIX/lib -R$TCL_PREFIX/lib -L/vol/local/lib -R/vol/local/lib -L/vol/graphics/lib -R/vol/graphics/lib  -L/vol/gnu/lib -R/vol/gnu/lib -R$PREFIX/lib/R/library/RSPerl/libs -R$PREFIX/lib/R/bin"
SHLIB_CXXLDFLAGS="-lCstd -lCrun -G -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"


SHLIB_CXXLDFLAGS="-G -lCstd -lCrun -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
# To build a 64 bit version of R (amd64) use the following options:
# Suggestion: Add an architecture dependent flag to the configure arguments, both versions can afterwards be installed into the same directory.
# See below for further details...
#CC="cc -xc99 -m64"
#CPPFLAGS="-I$CSW_PREFIX/include/"
#CPPFLAGS="$CPPFLAGS -I$TCL_PREFIX/include -I/vol/local/include -I/vol/graphics/include -I/vol/gnu/include -I/vol/gnu/include/readline"
#CFLAGS="-O -xlibmieee"
#F77="f95 -m64"
#FFLAGS=-O4
#CXX="CC -m64"
#CXXFLAGS="-O"
#FC="f95 -m64"
#FCFLAGS=$FFLAGS
#LDFLAGS="-lCstd -lCrun -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"
#LDFLAGS="$LDFLAGS -L$TCL_PREFIX/lib -R$TCL_PREFIX/lib -L/vol/local/lib -R/vol/local/lib -L/vol/graphics/lib -R/vol/graphics/lib  -L/vol/gnu/lib/amd64 -R/vol/gnu/lib/amd64 -R$PREFIX/lib/R/library/RSPerl/libs -R$PREFIX/lib/R/bin"
#SHLIB_CXXLDFLAGS="-lCstd -lCrun -G -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"
 
export CC
export CPPFLAGS
export CFLAGS
export F77
export FFLAGS
export CXX
export CXXFLAGS
export FC
export FCFLAGS
export LDFLAGS
export SHLIB_CXXLDFLAGS


# to help finding gnome-config
# to help finding gnome-config
PATH=/vol/gnu/bin:/vol/graphviz-2.8/bin:/vol/graphics/bin:/vol/perl-5.8.8/bin:/vol/java-1.5.0/bin:/vol/mysql-5.0.45/bin:/vol/qt-3.3.8/bin:/vol/subversion-1.3.0/bin:/vol/gtk-1.2.10/bin:/vol/emboss-2.9.0/bin:/vol/biotools/bin:/vol/thunderbird-2.0/bin:/vol/firefox-3.0/bin:/vol/gnu/bin:/vol/local/bin:/vol/cups/bin:/opt/staroffice9/bin:/vol/X11/bin:/usr/dt/bin:/usr/openwin/bin:/vol/tex-2008/bin:/vol/studio-12/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/vol/codine-6.0/bin/sol-x86
#PATH=/vol/gnu/bin:/vol/graphviz-2.8/bin:/vol/graphics/bin:/vol/perl-5.8.8/bin:/vol/java-1.5.0/bin:/vol/mysql-5.0.45/bin:/vol/qt-3.3.8/bin:/vol/subversion-1.3.0/bin:/vol/gtk-1.2.10/bin:/vol/emboss-2.9.0/bin:/vol/biotools/bin:/vol/thunderbird-2.0/bin:/vol/firefox-3.0/bin:/vol/gnu/bin:/vol/local/bin:/vol/cups/bin:/opt/staroffice9/bin:/vol/X11/bin:/usr/dt/bin:/usr/openwin/bin:/vol/tex-2008/bin:/vol/studio-12/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/vol/codine-6.0/bin/sol-x86


# use the THIS perl
# use the THIS perl
PATH=$PERL_PREFIX/bin:$TCL_PREFIX/bin:$PATH
#PATH=$PERL_PREFIX/bin:$TCL_PREFIX/bin:$PATH
export PATH
#export PATH
 
# Set default paper size for R
R_PAPERSIZE=A4
export R_PAPERSIZE
 
# For optimal performance, the Sun Performance library (libsunperf) as part of the Studio compiler suite should be used.
# But - although compilation succeeded on both i386 and amd64 - tests failed on amd64.
# Maybe this is fixed in a newer version of the Sun compiler? To try out append the following two configure flags:
# --with-blas=-lsunperf
# --with-lapack=-lsunperf
 
# Use an architecture-dependent subdir to build both i386 and amd64 versions of R into the same directory.
# Common files are shared between both versions, while architecture dependent files will be stored in a
# appropriate sub-directories.
# Uncomment the following two lines to build R on amd64.
# Suggestion: Leave out the flag for one of the builds.
# Note: The last build version will be the default, regardless of the architecture-dependent flag
# Note: Packages are always build for all versions automatically.
# r_arch="amd64"
# export r_arch
 
./configure --prefix=$PREFIX \
                --with-recommended-packages \
--with-readline \
--enable-R-shlib \
--enable-shared \
--with-jpeglib \
--with-libpng\
--with-tcl-config=$TCL_PREFIX/lib/tclConfig.sh \
--with-tk-config=$TCL_PREFIX/lib/tkConfig.sh
 
 
</nowiki></pre>
 
* run the configure script:
 
<pre><nowiki>
> sh buildR.sh
....
 
R is now configured for i386-pc-solaris2.10
 
  Source directory:          .
  Installation directory:    /vol/r-2.11
 
  C compiler:                cc -xc99 -O -xlibmieee
  Fortran 77 compiler:      f95 -O4
 
  C++ compiler:              CC -O
  Fortran 90/95 compiler:    f95 -O4
  Obj-C compiler:            gcc -g -O2
 
  Interfaces supported:      X11, tcltk
  External libraries:        readline # Removed due to test errors (see R-documentation): BLAS(SunPerf), LAPACK(SunPerf)
  Additional capabilities:  PNG, JPEG, TIFF, NLS, cairo
  Options enabled:          shared R library, shared BLAS (see above), R profiling, Java
 
  Recommended packages:      yes
 
azteca:~/src/r/R-2.11.1.X86>
</nowiki></pre>
 
 
If something is wrong look into the file configure.log.
 
== Make it ==
This will make the thing using 10 parallel processes, use less for small hosts
and have a look at the current load of your chosen host!
 
<pre><nowiki>
azteca> make -j10
</nowiki></pre>
 
 
== Check ==
 
<pre><nowiki>
make check
</nowiki></pre>
 
that should print *OK* for each test
 
== Install ==
 
<pre><nowiki>
make install
</nowiki></pre>


echo `type perl`


# no architecture specific options needed any more
== Again ==
* Repeat configure, make, make check, make install for each architecture


case `isainfo -k` in
== Installing additional Packages ==
  i386|amd64)
* Note: each package must be installed for each separately installed architecture (this is not needed in case r_arch is used!)
* You can install add on packages from inside R using install.packages()
* This is for CRAN packages, Bioconductor packages are installed in a different way


    ;;
<pre><nowiki>
  sparc*)
> install.packages("sma")
# choose a mirror
> install.packages(c("sma", "vioplot")) # to install multiple packages
</nowiki></pre>


    ;;
* If you got problems installing the package, you can download it from CRAN and install it manually
  *)
* The RSPerl package and other ''locally optimized'' packages (e.g. amap) must be installed this way:
    echo Plattform not supported.
    exit 1
    ;;
esac


<pre><nowiki>
azteca~> /vol/r-<version>/bin/R CMD INSTALL package.version.tar.gz
</nowiki></pre>


* To debug a compilation problem, untar the package, try to fix it and install from a directory


export CPPFLAGS
<pre><nowiki>
export LDFLAGS
azteca~> tar -xvzf package.tar.gz
# fix me
azteca~> /vol/r-<version>/bin/R CMD INSTALL package/
</nowiki></pre>
 
* If there is a problem report the problem to the package maintainer or author first, look into the DESCRIPTION file for the email
 
== Installing RSPerl ==
 
see [[HowToInstallRSPerl]]
 
== Installing rJava ==
 
see [[HowToInstallRJava]]
 
== Other Packages ==
 
The following packages should not be installed from the repository because they contain patches for our system, which the authors did not apply
* vioplot (use version 0.3)
* amap
* RSPerl (use our version 0.92)
 
== Installing Bioconductor Packages ==
* /!\ Some Bioconductor packages currently require [[TheMeanPthreadHack]] on our system
* Bioconductor packages are found on: http://www.bioconductor.org/
* Follow the installation instructions from the Bioconductor site
* Report problems to the Bioconductor mailing list
* To install biobase run in R:
 
<pre><nowiki>
source("http://bioconductor.org/biocLite.R")
biocLite()
</nowiki></pre>
 
* To install more packages:
 
<pre><nowiki>
biocLite(c('biobla1','bioblubb'))
</nowiki></pre>


export CC
* You can also download bioconductor packages from
export CXX
export F77
export FC


echo $CC
== Installing all packages from the previous version ==
echo $CXX
* Often you want to have all the packages from the old version in the new one
echo $F77
* This is a tip to simplify this a bit:
* You can do this in R:
* Open the old R binary


R_PAPERSIZE=A4
<pre><nowiki>
azteca~>/vol/old-r/bin/R
allp <- installed.packages()
save(allp, file='~/rpackages.rda')
q()
</nowiki></pre>


./configure --prefix=$PREFIX \
* in the new R excute the following script:
--with-blas=-lsunperf \
--with-lapack=-lsunperf \
--with-readline \
--enable-R-shlib \
--enable-shared \
--with-X \
--with-zlib \
--with-pcre \
--with-jpeglib \
--with-libpng\
--with-bzlib \
--with-tcl-config=$TCL_PREFIX/lib/tclConfig.sh \
--with-tk-config=$TCL_PREFIX/lib/tkConfig.sh


<pre><nowiki>
azteca~>/vol/new-r/bin/R


load ('~/rpackages.rda')
# do not reinstall already installed packages
allp = setdiff(allp[,1], installed.packages()[,1])
cranpackages = intersect(allp, available.packages()[,1])
install.packages(cranpackages)
# install bioconductor basepackage
source("http://bioconductor.org/biocLite.R")
biocLite()
rest = setdiff(allp, installed.packages()[,1])
biocLite(rest)
# this could give an error for some packages not contained in both
# repositories e.g RSPerl, so install that first
</nowiki></pre>
</nowiki></pre>

Latest revision as of 07:18, 26 October 2011

Tips how to build R and Bioconductor using the SunPro 12.1 Compiler Suite

Synopsis

This pages gives some hints on how R and Boioconductor can be compiled using the Sun Compilers. This works at the CeBiTec. If you try that somwhere else your milage may vary. Using gcc everything might be different. Most tips are given as shell commands. Note: a simple


 configure
 make
 make install


will not work. You have to set more options, that's what this page is for.

Preconditions

Checking the versions of the compilers, yours should be same or higher:


azteca~> which cc
/vol/studio-12.1/bin/cc
azteca:~> cc -V
cc: Sun C 5.10 SunOS_i386 Patch 142363-02 2009/09/21
azteca:~> which CC
/vol/studio-12.1/bin/CC
azteca:~> CC -V
CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
azteca:~> which f95
/vol/studio-12.1/bin/f95
azteca:~> f95 -V
CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
azteca:~> uname -a
SunOS azteca 5.10 Generic_142901-03 i86pc i386 i86pc Solaris


This information must as minimum be provided when reporting build problems.

Reporting Problems

  • read "R Installation and Administration" document from "CRAN"
  • report build or compilation errors of R to the R-devel mailing list not to R-help
  • report error in Bioconductor errors to the bioconductor mailing list not to R
  • before reporting an error you must download and try to build the latest R-patched from the R-homepage
  • search first for a related problem using search terms Sun Pro, Sun C, Solaris
  • add the output of the compiler including the error message
  • try to analyse the problem in depth before making any complaint, try to be helpful

Download sources

Building

  • R must be built for each architecture individually: i386 (32bit), amd64 (64bit) and sparc
  • If building a new version start on the faster one, aka. opteron, use qxterm86 to get a build machine or use azteca
  • Use qxterm for a sparc machine
  • change to your source directory cd R-version-x86

Configure

  • To enable configure to find all the libraries, you need to configure environment variables
  • Use a little script, save this in your source directory:
#!/usr/bin/sh

# Set the prefic to your versioned architecture specific volume
# If you just want to test building use a local directory
PREFIX=/vol/r-<version>
# please note: this script was tested on r-2.11

# use this per:
PERL_PREFIX=/vol/perl-5.8.8
TCL_PREFIX=/vol/tcl-8.4.13
CSW_PREFIX=/vol/studio-12.1

CC="cc -xc99"
CPPFLAGS="-I$CSW_PREFIX/include/"
CPPFLAGS="$CPPFLAGS -I$TCL_PREFIX/include -I/vol/local/include -I/vol/graphics/include -I/vol/gnu/include -I/vol/gnu/include/readline"
CFLAGS="-O -xlibmieee"
F77="f95"
FFLAGS=-O4
CXX="CC"
CXXFLAGS="-O"
#R recommendation (liberal interpretation): CXXFLAGS="-O -features=tmplrefstatic"
#Michi recommended: FC="f95  -xO2"
FC="f95"
FCFLAGS=$FFLAGS
LDFLAGS="-lCstd -lCrun -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"
LDFLAGS="$LDFLAGS -L$TCL_PREFIX/lib -R$TCL_PREFIX/lib -L/vol/local/lib -R/vol/local/lib -L/vol/graphics/lib -R/vol/graphics/lib  -L/vol/gnu/lib -R/vol/gnu/lib -R$PREFIX/lib/R/library/RSPerl/libs -R$PREFIX/lib/R/bin"
SHLIB_CXXLDFLAGS="-lCstd -lCrun -G -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"

# To build a 64 bit version of R (amd64) use the following options:
# Suggestion: Add an architecture dependent flag to the configure arguments, both versions can afterwards be installed into the same directory.
# See below for further details...
#CC="cc -xc99 -m64"
#CPPFLAGS="-I$CSW_PREFIX/include/"
#CPPFLAGS="$CPPFLAGS -I$TCL_PREFIX/include -I/vol/local/include -I/vol/graphics/include -I/vol/gnu/include -I/vol/gnu/include/readline"
#CFLAGS="-O -xlibmieee"
#F77="f95 -m64"
#FFLAGS=-O4
#CXX="CC -m64"
#CXXFLAGS="-O"
#FC="f95 -m64"
#FCFLAGS=$FFLAGS
#LDFLAGS="-lCstd -lCrun -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"
#LDFLAGS="$LDFLAGS -L$TCL_PREFIX/lib -R$TCL_PREFIX/lib -L/vol/local/lib -R/vol/local/lib -L/vol/graphics/lib -R/vol/graphics/lib  -L/vol/gnu/lib/amd64 -R/vol/gnu/lib/amd64 -R$PREFIX/lib/R/library/RSPerl/libs -R$PREFIX/lib/R/bin"
#SHLIB_CXXLDFLAGS="-lCstd -lCrun -G -L$CSW_PREFIX/lib -R$CSW_PREFIX/lib"

export CC
export CPPFLAGS
export CFLAGS
export F77
export FFLAGS
export CXX
export CXXFLAGS
export FC
export FCFLAGS
export LDFLAGS
export SHLIB_CXXLDFLAGS

# to help finding gnome-config
#PATH=/vol/gnu/bin:/vol/graphviz-2.8/bin:/vol/graphics/bin:/vol/perl-5.8.8/bin:/vol/java-1.5.0/bin:/vol/mysql-5.0.45/bin:/vol/qt-3.3.8/bin:/vol/subversion-1.3.0/bin:/vol/gtk-1.2.10/bin:/vol/emboss-2.9.0/bin:/vol/biotools/bin:/vol/thunderbird-2.0/bin:/vol/firefox-3.0/bin:/vol/gnu/bin:/vol/local/bin:/vol/cups/bin:/opt/staroffice9/bin:/vol/X11/bin:/usr/dt/bin:/usr/openwin/bin:/vol/tex-2008/bin:/vol/studio-12/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/vol/codine-6.0/bin/sol-x86

# use the THIS perl
#PATH=$PERL_PREFIX/bin:$TCL_PREFIX/bin:$PATH
#export PATH

# Set default paper size for R
R_PAPERSIZE=A4
export R_PAPERSIZE

# For optimal performance, the Sun Performance library (libsunperf) as part of the Studio compiler suite should be used.
# But - although compilation succeeded on both i386 and amd64 - tests failed on amd64. 
# Maybe this is fixed in a newer version of the Sun compiler? To try out append the following two configure flags:
# --with-blas=-lsunperf
# --with-lapack=-lsunperf

# Use an architecture-dependent subdir to build both i386 and amd64 versions of R into the same directory.
# Common files are shared between both versions, while architecture dependent files will be stored in a
# appropriate sub-directories.
# Uncomment the following two lines to build R on amd64.
# Suggestion: Leave out the flag for one of the builds.
# Note: The last build version will be the default, regardless of the architecture-dependent flag
# Note: Packages are always build for all versions automatically.
# r_arch="amd64"
# export r_arch

./configure --prefix=$PREFIX \
                --with-recommended-packages \
		--with-readline \
		--enable-R-shlib \
		--enable-shared \
		--with-jpeglib \
		--with-libpng\
		--with-tcl-config=$TCL_PREFIX/lib/tclConfig.sh \
		--with-tk-config=$TCL_PREFIX/lib/tkConfig.sh


  • run the configure script:
 > sh buildR.sh
....

R is now configured for i386-pc-solaris2.10

  Source directory:          .
  Installation directory:    /vol/r-2.11

  C compiler:                cc -xc99 -O -xlibmieee
  Fortran 77 compiler:       f95 -O4

  C++ compiler:              CC -O
  Fortran 90/95 compiler:    f95 -O4
  Obj-C compiler:            gcc -g -O2

  Interfaces supported:      X11, tcltk
  External libraries:        readline # Removed due to test errors (see R-documentation): BLAS(SunPerf), LAPACK(SunPerf) 
  Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo
  Options enabled:           shared R library, shared BLAS (see above), R profiling, Java

  Recommended packages:      yes

azteca:~/src/r/R-2.11.1.X86> 


If something is wrong look into the file configure.log.

Make it

This will make the thing using 10 parallel processes, use less for small hosts and have a look at the current load of your chosen host!

azteca> make -j10


Check

make check

that should print *OK* for each test

Install

make install


Again

  • Repeat configure, make, make check, make install for each architecture

Installing additional Packages

  • Note: each package must be installed for each separately installed architecture (this is not needed in case r_arch is used!)
  • You can install add on packages from inside R using install.packages()
  • This is for CRAN packages, Bioconductor packages are installed in a different way
> install.packages("sma")
# choose a mirror
> install.packages(c("sma", "vioplot")) # to install multiple packages
  • If you got problems installing the package, you can download it from CRAN and install it manually
  • The RSPerl package and other locally optimized packages (e.g. amap) must be installed this way:
azteca~> /vol/r-<version>/bin/R CMD INSTALL package.version.tar.gz
  • To debug a compilation problem, untar the package, try to fix it and install from a directory
azteca~> tar -xvzf package.tar.gz
# fix me
azteca~> /vol/r-<version>/bin/R CMD INSTALL package/
  • If there is a problem report the problem to the package maintainer or author first, look into the DESCRIPTION file for the email

Installing RSPerl

see HowToInstallRSPerl

Installing rJava

see HowToInstallRJava

Other Packages

The following packages should not be installed from the repository because they contain patches for our system, which the authors did not apply

  • vioplot (use version 0.3)
  • amap
  • RSPerl (use our version 0.92)

Installing Bioconductor Packages

  • /!\ Some Bioconductor packages currently require TheMeanPthreadHack on our system
  • Bioconductor packages are found on: http://www.bioconductor.org/
  • Follow the installation instructions from the Bioconductor site
  • Report problems to the Bioconductor mailing list
  • To install biobase run in R:
source("http://bioconductor.org/biocLite.R")
biocLite()
  • To install more packages:
biocLite(c('biobla1','bioblubb'))
  • You can also download bioconductor packages from

Installing all packages from the previous version

  • Often you want to have all the packages from the old version in the new one
  • This is a tip to simplify this a bit:
  • You can do this in R:
  • Open the old R binary
azteca~>/vol/old-r/bin/R
allp <- installed.packages()
save(allp, file='~/rpackages.rda')
q()
  • in the new R excute the following script:
azteca~>/vol/new-r/bin/R

load ('~/rpackages.rda')
# do not reinstall already installed packages
allp = setdiff(allp[,1], installed.packages()[,1]) 
cranpackages = intersect(allp, available.packages()[,1])
install.packages(cranpackages)
# install bioconductor basepackage
source("http://bioconductor.org/biocLite.R")
biocLite()
rest = setdiff(allp, installed.packages()[,1])
biocLite(rest)
# this could give an error for some packages not contained in both 
# repositories e.g RSPerl, so install that first