-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error on Windows with Rust 1.70 #559
Comments
Excellent finding. |
Oh, good catch. I believe so... |
😨 |
Asked the warning on the Rust user forum. |
Quick update. The warning disappears if we use binutils >= 2.40, and Rtools43 contains binutils 2.40. What's unfortunate is the setup-r action uses a bit outdated version of Rtools. rust-lang/rust#112368 (comment) The setup-r action can be fixed easily, and GHA will install the latest one by default soon because chocolatey specifies the latest version of Rtools. So, warnings on R 4.3 will be resolved sooner or later. However, probably we can't fix R 4.2, so that's a headache. |
And I presume Rtools 4.3 is not backward-compatible with R < 4.3? |
Yes. I posted a summary on R-package-devel. This might help to catch up. https://stat.ethz.ch/pipermail/r-package-devel/2023q2/009229.html (This contains one mistake. "it's the case on GitHub Actions" is not true) |
Thank you @yutannihilation for taking the lead on this issue and finding the root cause! I hope we can properly fix it soon (I'd hate to pin rust to < 1.70 for R < 4.3) |
@Ilia-Kosenkov |
Btw,
I believe it's safer to presume so, but I found R-universe thinks it's backward-compatible... https://github.com/r-universe/r-rust/actions/runs/5213842120/jobs/9409449202#step:9:11 |
Should we try out Rtools v 43 for R-oldrel? |
Do you mean extendr will require users to use Rtools43 for R 4.2 just for avoiding the warnings that are likely harmless? It doesn't sound a good idea to me... |
I get your point, just exploring options. Let's keep it as-is for now. |
Compile error
(Originally found in #558 (comment))
If we try to compile R package using extendr with Rust 1.70, we'll see several errors like this:
It seems this is because Rust 1.70 requires DLL
ntdll
. cf., We encountered similar issue before with Rust 1.57: #339So, how did I come up with this DLL? I first checked the line 290 of
std\src\sys\windows/handle.rs
, which is referred in the error message above.https://github.com/rust-lang/rust/blame/1.70.0/library/std/src/sys/windows/handle.rs#L290
This line actually contains the symbol
NtWriteFile
, which is defined here:https://github.com/rust-lang/rust/blob/36aa75e44d5c6a83d9cb61eeaaadf82354307015/library/std/src/sys/windows/c.rs#L1269-L1341
I don't know what
compat_fn!
means, but it seems this should be somehow releated tontdll
(So, I still don't understand what's happening completely).Warning
Even if we fix the error above, we'll see this warning.
It seems this indicates some incompatibility between compilers.
https://stackoverflow.com/questions/25161814/warning-corrupt-drectve-at-end-of-def-file
There are two possibilities:
I think 2. is unlikely. If it were true, things should break more badly. So I guess 1 is the cause. LLVM was upgraded to version 16 in Rust 1.70.
The text was updated successfully, but these errors were encountered: