It seems r-lib/actions still uses Rtools40. I know it works fine as it contains /ucrt64 toolchain, but, still, I think the CI setup should match with the officially recommended one. Are there any plan to migrate to Rtools42? Or, do we need to migrate to Tomas Kalibera's GitHub Action eventually?
Thanks for clarifying! But, IIUC, CRAN already uses Rtools42 for building R-devel and doing CRAN checks, so I'm afraid checking with Rtools40 might not be very reliable. Why is the plan still "at some point"? Is it that there are some problem on R-core's (or CRAN's?) side?
There isn't a good reason to hurry, as far as I can tell.
I just checked, the official CRAN R-devel installer is still built with Rtools40, and Rtools42 is not available for download from the CRAN mirrors. Once there is a stable download URL for Rtools42 on CRAN, I'll add optional support for it at r-lib/actions.
Once R 4.2.0 is out, GitHub will hopefully include Rtools42 on their Windows images.
If you want to check your package with ucrt now, Rtools40 works fine for that, at least I haven't seen any cases where it didn't. If we find some cases then I'll add Rtools42 earlier.
Why do you think that? Rtools40 and Rtools42 actually use the same compiler version for ucrt builds.
Which is not the case for any suggested r-lib/actions configuration, btw: all Linux and macOS configurations use different compilers than CRAN.
the official CRAN R-devel installer is still built with Rtools40
Oh, really...? Then, it's just I'm confusing with the official blog post by the R-core members. It says:
On Monday December 13, CRAN will switch the incoming checks on Windows to what is now “ucrt3”. At the same time, R-devel source code will be patched with “ucrt3” patches. From that point on, it will assume 64-bit UCRT and no longer support MSVCRT nor 32-bit targets, and CRAN will start building R-devel snapshot binary builds with Rtools42.
Sorry that I didn't confirm it enough, and sorry for taking your time for this...
Why do you think that? Rtools40 and Rtools42 actually use the same compiler version for ucrt builds.
There are several differences I'm concerning about:
envvar: Rtools42 uses RTOOLS42_HOME instead of RTOOLS40_HOME.
absence of 32-bit toolchains.
You are right in that these don't matter for usual packages as the compiler versions are the same, but I'm developing a package that compiles Rust code, which needs to handle these differences in the toolchain.
Yes, maybe that was the plan, but the R-devel installer is still built with Rtools40, by Jeroen. You can see the digital signature in Windows Explorer -> Properties. It is true that it does not support MSVCRT and 32 bit targets any more, though. As I understand CRAN's plan is now to switch over to their own daily builds during the current CRAN winter break.
You should not rely on that. People can install Rtools40 and Rtools42 wherever they want to. I am not even sure where they are installed on GHA.
Yeah, we rely on pkgbuild for finding the path to Rtools, thanks for that
One more difference I forgot to mention is that the paths (x86_64-w64-mingw32.static.posix/bin) are hard coded in R's source code. I don't think this will cause any major problem, but I'm just a bit uneasy about these subtle differences. Anyway, I'll wait until they get ready...
And I found it actually matters to me (I guess this is my problem and few people will hit this, so please just ignore. This is just for information). I get this error,
x error: linker `x86_64-w64-mingw32-gcc` not found