Docker Container with R --disable-long-double

I have some package tests that tripped up do to double precision checks on CRAN (the last bullet point of sec 1.6 on https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages). I'd like to check that my fixes are working as expected and safeguard against this in future iterations, but don't have a ready image of R built without long-double support. None of the rocker-org Docker images look to be built this way. Has anyone done the work to create such a container image (or a Vagrant box, for that matter)?

I'd be happy with local testing, though I'd ideally like to add this to my build matrix on Travis for more long term testing.

1 Like

Following up on this thread, I was able to cobble a working Docker container based off of the rocker R-devel base image. My working Dockerfile is at https://github.com/davidski/evaluator-docker/blob/master/noLD/Dockerfile. Not fancy, but it works.

Note that while the CRAN supplemental checks page for noLD (https://www.stats.ox.ac.uk/pub/bdr/noLD/README.txt) lists configuring with --without-long-double, when I used that flag on this image I would still get double support listed in capabilities(). I had to put in --enable-long-double=no to disable double support. Perhaps a difference in the tool chain? Would love insight on this point.

3 Likes

For info for anyone reading this now, there's now a platform of the R-hub package builder that has long doubles disabled.

You can use its online version,

rhub::check(<pkg-path>, platform = "debian-gcc-devel-nold") 

Or run a local check if your OS is not Windows,

rhub::local_check_linux(<pkg-path>, image = "rhub/debian-gcc-devel-nold")

More info about rhub

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.