This project is mostly superseded by the Solaris VM provided by R-hub:
- The R-hub Solaris vmware/virtualbox images: https://files.r-hub.io/solaris/
- Using the VM: https://github.com/r-hub/solarischeck/tree/master/packer#using-the-vm
- How to create a Solaris VM yourself: https://docs.r-hub.io/technical/solaris/
This is the same VM as used by the R-hub online check service.
This is a customized version of the publicly available Solaris 10 for testing R packages. It includes preinstalled ORD 3.2.0, Solaris Studio 12.3 and OpenCSW r_base 3.3.0.
VMware Image: https://drive.google.com/open?id=0B9GbYGrVAoVbT25SRFpNeC1mWTQ
Username: root
Password: solaris
You must accept the OTN License Agreement for Oracle Solaris and Oracle Solaris Studio OTN Developer License Agreement to download this software.
This VM It is based of the official Oracle Solaris 10 x86 ISO. The installation includes two versions of R, two compilers and some other software:
- Solaris Studio 12.3
- Oracle R Distribution aka ORD (uses Solaris Studio) in
/usr/bin/R
- OpenCSW:
Simply download and extract the VMWare image zip file and double click to import in VMware.
There are Desktop icons to launch both versions of R.
To open R manually, start a terminal by clicking the terminal icon on the top menu bar. The ORD version of R is available from the PATH, just run:
R
Programs from CSW are not added to the PATH. To run the GCC build of R:
export PATH=/opt/csw/bin:$PATH
R
Both installations use separate directories to store their R package libraries so they should not conflict.
CSW is an open source package manager and repository that is also used by CRAN. It is preinstalled on this system. Use pkgutil to install a library:
/opt/csw/bin/pkgutil -y -i libcurl_dev libssl_dev
It is unclear to me where the compilers look for headers. CRAN is setting a bunch of environment variables but it often seems to work out of the box.
A list of available CSW software: http://www.opencsw.org/get-it/packages/
The versions of R on this image are quite dated (3.2 and 3.3). The Solaris/OpenCSW community is pretty stale by now, so if you need a more recent version of R to debug your problem, you need to build R from source.
Joe Cheng has documented the steps for building R-devel on the solarisvm in this gist.
For some reason vmware keeps around all deleted files ever which results in ever increasing size of the VM image. To wipe old data you need to run in solaris:
vmware-toolbox-cmd disk shrink /
This does not actually delete any files, it only reduces the size of your VM file by wiping history data (at least I think that's whats happening).
The Solaris Studio 12.3 compiler does not support recent C++ features as used by Rcpp or C++11. Currently CRAN checks these packages only using the GCC build of R.
Create a new Virtual Machine and mount the Solaris 10 iso in the virtual CD drive. Increase the disk size in VMware before starting because it's very tricky to do this after installation.
In the installer I did a custom installation in order to increase the size of the root partition. Other than that standard installation.
To make bash default user shell
usermod -s /usr/bin/bash root
To add gmake
and make
to path you need:
PATH=${PATH}:/usr/ccs/bin:/usr/sfw/bin
Follow instructions
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i sudo vim
To install r_base:
/opt/csw/bin/pkgutil -y -i r_base
Other stuff
/opt/csw/bin/pkgutil -y -i git gmake
ORD install script requires sudo (from OpenCSW).
PATH=$PATH:/opt/csw/bin
Then follow steps:
- Download ORD installer and run install script
- Download Supporting Libraries and extract libs to
/usr/lib/64/R/lib/
- Download Solaris Studio 12.3 and extract to
/opt/SunProd/studio12u3/
.
Test by running /usr/bin/R
and install a package with C code (e.g. jsonlite).
Add to ~/.Rprofile
script:
Sys.setenv(PATH=paste0(Sys.getenv("PATH"), ":/usr/ccs/bin:/usr/sfw/bin"))
options(repos = "http://cloud.r-project.org")
To create Gnome desktop launchers create a file text file R-ORD.desktop
:
[Desktop Entry]
Type=Application
Terminal=true
Name=R-3.2.0 (ORD)
Exec=/usr/bin/R
Icon=/usr/local/logo/logo-old.png
And another one with R-CSW.desktop
:
[Desktop Entry]
Type=Application
Terminal=true
Name=R-3.3.0 (CSW)
Exec=/usr/bin/Rcsw
Icon=/usr/local/logo/logo-new.png