ropensci / redland-bindings

Redland librdf language bindings
http://librdf.org/bindings/
Other
17 stars 3 forks source link

patch for Rtools42 on Windows #95

Closed mbjones closed 2 years ago

mbjones commented 2 years ago

The attached message came from CRAN with details of a breaking change for Windows and their proposed fix.

@jeroen do you know if their proposed UCRT patch is the best course for the windows build, or do you have another recommendation for Rtools42 support? Thanks.

Dear maintainers,

This concerns the CRAN packages

bioacoustics cairoDevice cblasr clustermq gdtools ggiraph git2r imager KSgeneral libsoc mpmi nanotime ncdf4 nloptr pcaL1 pexm PKI R2SWF RcppCCTZ RcppUUID redland RoBMA RProtoBuf RSclient Rserve Rsymphony runjags SuperGauss svglite sysfonts tiff vdiffr XBRL

maintained by one of you:

Artem Klevtsov a.a.klevtsov@gmail.com: RcppUUID Chris Pardy cooliomcdude@gmail.com: mpmi David Gohel david.gohel@ardata.fr: gdtools ggiraph David Pierce dpierce@ucsd.edu: ncdf4 Dirk Eddelbuettel edd@debian.org: nanotime RcppCCTZ RProtoBuf František Bartoš f.bartos96@gmail.com: RoBMA Jean Marchal jean.marchal@wavx.ca: bioacoustics Jelmer Ypma uctpjyy@ucl.ac.uk: nloptr Kurt Hornik Kurt.Hornik@R-project.org: Rsymphony Lionel Henry lionel@rstudio.com: vdiffr Martin Lysy mlysy@uwaterloo.ca: SuperGauss Matthew B. Jones jones@nceas.ucsb.edu: redland Matthew Denwood md@sund.ku.dk: runjags Michael Schubert mschu.dev@gmail.com: clustermq Paul Brooks jpbrooks@vcu.edu: pcaL1 Rikard Nordgren rikard.nordgren@farmbio.uu.se: libsoc Roberto Bertolusso rbertolusso@rice.edu: XBRL Senren Tan raymondtsrtsr@outlook.com: KSgeneral Shota Ochi shotaochi1990@gmail.com: imager Simon Urbanek Simon.Urbanek@r-project.org: PKI RSclient Rserve tiff Stefan Widgren stefan.widgren@gmail.com: git2r Thomas Lin Pedersen thomas.pedersen@rstudio.com: svglite Vinicius Mayrink vdinizm@gmail.com: pexm Yi Pan ypan1988@gmail.com: cblasr Yixuan Qiu yixuan.qiu@cos.name: R2SWF sysfonts

your packages need to be updated for R-devel/R 4.2 to work on Windows, following the recent switch to UCRT and Rtools42.

I've created patches for you, so please review and adopt them:

https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r_packages/patches/CRAN/

You can apply them as follows

tar xfz RcppUUID_1.0.0.tar.gz

wget https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r_packages/patches/CRAN/RcppUUID.diff

patch --binary < RcppUUID.diff

The patches add ".ucrt" files to your packages, which will be ignored by R 4.1 and older. These are make or configure files to use the libraries for your packages from Rtools42.

For more information, please see

https://developer.r-project.org/Blog/public/2021/12/07/upcoming-changes-in-r-4.2-on-windows/

https://developer.r-project.org/WindowsBuilds/winutf8/ucrt3/howto.html

These patches are currently automatically applied by R-devel on Windows at installation time, which makes your packages pass their checks (as OK or NOTE, please see your CRAN results). However, the patching is just a temporary measure, and hence we would like to ask you to adopt these patches to your package code, so that your packages keep working.

Once you add your patches, your package will show a warning during R CMD check (as patching would be attempted to be applied again). That's ok, at that point please let me know and I will remove my patch from the repository of automatically applied patches.

If you end up just applying the patch as is, there is probably no need testing on your end, but you can do so using Winbuilder, r-hub, github actions (e.g. https://github.com/kalibera/ucrt3).

If you wanted to test locally on your Windows machine and do not have a UCRT version of R-devel yet, please uninstall your old version of R-devel, delete the old library used with that, install a new UCRT version of R-devel , and install Rtools42. You can keep Rtools40 installed if you need it with R 4.1 or earlier.

Currently, the new R-devel can be downloaded from https://www.r-project.org/nosvn/winutf8/ucrt3/web/rdevel.html

And Rtools42 from https://www.r-project.org/nosvn/winutf8/ucrt3/web/rtools.html

If you end up testing locally, you can use _R_INSTALL_TIMEPATCHES environment variable to disable the automated patching, see the "howto" document above.

If you wanted to find libraries to link for yourself, e.g. in a newer version of your package, please look for "Using findLinkingOrder with Rtools42 (tiff package example)" in the "howto" document above. I created the patches for you manually before we finished this script, so you may be able to create a shorter version using it, but - it's probably not worth the effort.

If you wanted to try in a virtual machine, but did not have a license, you can use also an automated setup of a free trial VM from https://developer.r-project.org/Blog/public/2021/03/18/virtual-windows-machine-for-checking-r-packages

(but that needs a very good and un-metered network connection to install)

Please let us know if you have any questions.

Thanks, Tomas & Uwe

jeroen commented 2 years ago

We had already fixed ucrt support in the last commit, but it was not released to CRAN yet. I would suggest submitting the current master branch to CRAN, such that the behavior is consistent between R <= 4.1 and 4.2+

mbjones commented 2 years ago

Awesome, thanks. I hadn't caught that -- I'll run the tests and send it off.

mbjones commented 2 years ago

Fixed by #93. Needs to be released in 1.10.17-15.

mbjones commented 2 years ago

Closing as duplicate of #93, which is testing out well.