sneumann / mzR

This is the git repository matching the Bioconductor package mzR: parser for netCDF, mzXML, mzData and mzML files (mass spectrometry data)
40 stars 26 forks source link

Update Windows builds for R4.2 with UCRT as the new C runtime for Windows #258

Closed sneumann closed 2 years ago

sneumann commented 2 years ago

Hi, there will be a switch to UTF-8 as native encoding on Windows in R-4.2, see https://developer.r-project.org/Blog/public/2021/12/07/upcoming-changes-in-r-4.2-on-windows/ which will require us to change a few things. This issue is to keep track of them.

@kalibera has created a patch at https://www.r-project.org/nosvn/winutf8/ucrt3//patches/BIOC/mzR.diff for mzR that is applied upon build time, e.g. https://github.com/sneumann/mzR/runs/4800423243?check_suite_focus=true#step:20:34 but which currently fails for some of our pull requests.

So aim should be to get the mzR build to work with R-4.2 and the patches can then be dropped.

Yours, Steffen

sneumann commented 2 years ago

The fix was a simple removal of the find calls in the clean: target in Makevars. The UCRT build machine is palomino3 at https://master.bioconductor.org/checkResults/3.15/bioc-LATEST/mzR/palomino3-checksrc.html and the build succeeds now. The CHECK is still in ERROR state, I was unable to figure out what actually fails:

* checking tests ...
  Running 'runTests.R'
 ERROR
Running the tests in 'tests/runTests.R' failed.
Complete output:
  > library("mzR")
  Loading required package: Rcpp
  > library("msdata")
  > 
  > BiocGenerics:::testPackage("mzR")
  Loading required namespace: XML
  reading Tandem.mzid.gz... DONE!
* checking for unstated dependencies in vignettes ... OK
...
See
  'F:/biocbuild/bbs-3.15-bioc/meat/mzR.Rcheck/00check.log'
for details.

I couldn't find the 00check.log with more info :-(

kalibera commented 2 years ago

I am not sure where it is (don't know the builders), but probably it won't show much more in this case, anyway. This could have been some crash. One can set environment variables _R_CHECK_TESTSNLINES=0 and _R_CHECK_VIGNETTESNLINES=0 to always get a full context in the main output, that would be useful to have in either case.

Otherwise I would recommend trying on other builders (e.g. Winbuiler or r-hub) to see if it fails there, too, and what is the diagnostics there. Some of the debugging is of course always easiest locally, where you can use Process Monitor (sysinternals) or WinDbg (e.g. as postmortem debugger, from Windows 10 SDK, debugging tools).

sneumann commented 2 years ago

Hi, I can confirm that mzR-3.9.3 at http://bioconductor.org/checkResults/devel/bioc-LATEST/mzR/ at commit 458704d6 builds fine on all four BioC build machines including the UCRT Currently we have https://github.com/sneumann/mzR/blob/master/src/Makevars.ucrt to (identical to Makevars) actually prevent the UCRT patch from applying. Thanks all who helped ! Yours, Steffen