By Jeroen Ooms, April 2015. Suggestions welcome.
VirtualBox Image: http://bit.ly/r-solaris
Username: root
Password: solaris11
You must accept the OTN License Agreement for Oracle Solaris and Oracle Solaris Studio OTN Developer License Agreement to download this software.
A VirtualBox image of Solaris 11.2 to test building of R packages. It is based of the official Oracle Solaris 11.2 VM template. 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)
- OpenCSW:
- r_base (uses GCC)
- gcc4g++ and gcc4gfortran
- git
- vim
Install VirtualBox for your system and download the image from the URL above (it's about 4gb). Double click the image file to import it in VirtualBox (or use the import function from the tool bar). After booting the Solaris system, it will show you a graphical login screen. Login with username root
and password solaris11
.
Open 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:
/opt/csw/bin/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
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/
Some R packages such as Rcpp and RJSONIO only seem to build with GCC and not with on ORD. From the very sparse information from BDR I get the sense that CRAN builds these packages with GCC as well. However I am not sure about this, please let me know if you figure out how to build these packages with ORD / Solaris Studio.
The image is in ova
format, which is simply a tar ball containing the virtual disk (vmdk file) and a small config file. To extract the virtual disk for deploying it elsewhere:
tar xzvf Solaris11.ova
VirtualBox has some nice features that can be enabled from the "Devices" menu in the toolbar:
- Enable shared clipboard to copy/paste text or commands to the guest machine.
- Enable Drag'n'drop to copy a file (e.g. a source package) by dragging it from your mac/win desktop into solaris.