Checking your R package on Solaris

[This article was first published on Posts on R-hub blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

TL;DR

  1. To check your package on Solaris, call rhub::check() as usual and choose one of our Solaris builders.

  2. 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:

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 what rhub::check_on_solaris() uses.
  • solaris-x86-patched-ods uses the 32-bit GCC build to install all dependencies of the package, but then runs R CMD check with the ODS build. This maximizes the chance of a meaningful R 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.

To leave a comment for the author, please follow the link and comment on their blog: Posts on R-hub blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)