TL;DR
-
To check your package on Solaris, call
rhub::check()
as usual and choose one of our Solaris builders. -
Bookmark this page, in case you get an email from CRAN about your package failing on Solaris.
Oracle Solaris
Oracle Solaris is a non-free Unix operating system. CRAN regularly tests R packages on Solaris 10. See this talk by Uwe Ligges if you want to know more about the motivation for this, at 32:45.
This is a post about checking that your R package on Solaris, using R-hub, and how you can create your own Solaris virtual machine to debug your R code.
OpenCSW
OpenCSW is a repository of open source
software packages. It uses a package manager tool called pkgutil
.
pkgutil
is similar to apt
, yum
, etc.
OpenCSW greatly varies in terms of how current its various packages are.
By default OpenCSW uses its “testing” distribution, which has a rolling
release model. The most recently added packages are in the “unstable”
distribution. OpenCSW unstable has now a new R 4.0.0 build, called
r_base
. It will move to the “testing” distibution in a couple of days.
OpenCSW r_base
4.0.0 is one of the R builds used on R-hub’s Solaris
builder.
R-hub also has a repository (catalog) of OpenCSW packages,
which we use for system requirements that are not (yet) updated in the
official OpenCSW catalog. The R-hub catalog is at
https://files.r-hub.io/opencsw/. (This is the URL you need to use in
the pkgutil.conf
file or with pkgutil -t
.)
CRAN’s Solaris builder
CRAN uses two sets of compilers for their R package checks. Oracle Developer Studio (ODS) is a commercial product that supports Oracle Solaris 10. In addition, OpenCSW packages GCC, version 5.5.0 currently.
CRAN compiles R packages with ODS by default. If ODS is not able to compile a package, they use GCC instead. GCC should be able to compile most (all?) CRAN R packages. Notably, Rcpp and all packages linking to it are compiled with GCC.
The CRAN package check flavours page links to the details of the Solaris configuration.
R-hub’s Solaris builder
R-hub’s setup is similar. Our Solaris virtual machine has three R versions:
- 32-bit GCC build at
/opt/csw/bin/R
, from the OpenCSWr_base
package. The configuration of this build is in OpenCSW. - 64-bit GCC build at
/opt/csw/bin/amd64/R
, from the same OpenCSWr_base
package. - 32-bit ODS build, see the a
config.site
file in oursolarischeck
repository.
If you call rhub::platforms()
you’ll see two
Solaris builders:
solaris-x86-patched
uses the 32-bit GCC build of R. This is also whatrhub::check_on_solaris()
uses.solaris-x86-patched-ods
uses the 32-bit GCC build to install all dependencies of the package, but then runsR CMD check
with the ODS build. This maximizes the chance of a meaningfulR CMD check
run.
System requirements
It is unclear how system requirements are installed on CRAN’s Solaris.
R-hub’s Solaris machine installs all system requirements from OpenCSW.
The list of installed packages are in the solarischeck
GitHub repository.
If you need another library for your package, please let use know and we can install it. See the current list of OpenCSW packages.
If the library you need is missing from OpenCSW, or it is outdated, let us know, there is a good chance that we can add it or update it.
Creating your own Solaris 10 VM
R-hub’s Solaris check is great if you want to make sure that your package works on Solaris before a CRAN submission. If it does not work, and the fix is not obvious, then you probably want to debug it on a Solaris machine.
We have a template for the packer automated VM builder tool that helps you do this with as little work as possible. (Which is not the same as little work, mind you!) You’ll need:
- A sufficiently powerful computer to run a virtual machine.
- packer, available for Windows, macOS, Linux, free and open source.
- Virtualization software: VMware or VirtualBox. VirtualBox is open source and available for many platforms. VMware has free evaluation versions.
- You need to create an Oracle ID, and download the Oracle Solaris 10 install DVD image and also Oracle Developer Studio. They are free for non-commercial use, without support.
- You need to wait about 15-30 minutes for packer to build the virtual machine.
Please see the detailed steps in the docs of the solarischeck
repo.
If you want to install Solaris yourself without the packer automation, our internal R-hub docs have a detailed walkthrough.
Need help? Contact us!
If creating a virtual machine is not the right solution for you, do not despair! We have other ways to help you with your Solaris issues, please contact us by opening an issue in the R-hub issue tracker.
Resources, links
- CRAN’s Solaris config by Brian Ripley.
- Our
solarischeck
GitHub repository for Solaris related tools. - packer template to build your Solaris VM:
- An R ODS build and other Solaris related tools, e.g. newer R builds for Solaris on our web site.
- A walkthrouh of a manual Solaris installation, on our internal docs site.
- The R-hub OpenCSW catalog is at https://files.r-hub.io/opencsw.
- Prior art and inspriration.
- Our packer config is based on Edwin Biemond’s work.
- To get help with R and Solaris please open an issue in our issue tracker.