-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Failed to build Windows crate with i686-pc-windows-msvc #82991
Comments
Actually, this seems to be the same issue that docs.rs is running into (#82988). |
Note docs.rs is using |
Backtrace:
|
Testing against this windows-rs commit. This fails in stable all the way back to 1.46. It may go further back but windows-rs relies on some const functionality that was introduced in 1.46 and so it fails to compile without an ICE in 1.45. This has a different backtrace on beta and all of the stables: backtrace
This does not fail with the |
I've not been able to reproduce this exactly like what's happening in The issue ICE on stable and beta but only plain compiler errors on nightly (though the code is fine and shouldn't error). This mirrors how the original issue seems to change behavior in nightly. Main Cratemain.rs fn main() {
dep::foo!();
} Cargo.toml [package]
name = "main_crate"
version = "0.1.0"
authors = ["Ryan Levick <me@ryanlevick.com>"]
edition = "2018"
[dependencies]
# Renaming the dependency seems to be the key here
dep = { package = "dependency", path = "dependency", version = "0.1.0" } Dependency Cratelib.rs use proc_macro::TokenStream;
#[proc_macro]
pub fn foo(_arg: TokenStream) -> TokenStream {
TokenStream::new()
} Cargo.toml [package]
name = "dependency"
version = "0.1.0"
authors = ["Ryan Levick <me@ryanlevick.com>"]
edition = "2018"
[lib]
proc-macro = true
[dependencies] CompilationNightly
Stable
rustc version
|
The issue is partially fixed (i.e., it goes from an ICE to just the compiler error message) in nightly-2021-03-09. It looks like #81635 is what caused the change. |
If the issue happens only when you are cross-compiling, then it may be #56935. |
@petrochenkov I can cause this ICE without cross-compiling (#83045 (comment) / #83138 (comment)) but I can't tell if this is the same situation - it would be nice to be able to consolidate all 3 of these issues under one, if they have the same cause. |
@eddyb if your ICE doesn't repro on stable than it may be related but isn't the same issue as this. |
Ah I see my confusion, #82991 (comment) states that #81635 fixed the ICE for you, while it introduced the ICE elsewhere. I believe #81635 just changes which crates are considered identical. The ICE seems to be separate, but whether it can be triggered depends on some logic that #81635 changed. |
Today the compiler reports a more readable error:
Note that this error only complains when cross compiling. The build succeeds when using i686 toolchain. |
That may explain why the ICE is gone: the error probably happens before the point the ICE would've triggered. |
@kennykerr I'm trying to get an updated picture of this issue, can you report if it still reproduces? thanks |
Oh yeah, #56935 has since been fixed. |
Cool, then if the issue is no more, please @kennykerr can you confirm we can close it? Otherwise I'll close it myself after a while @rustbot label -I-prioritize |
Looks good to me. |
As requested, here's another internal compiler error I just ran into. Targeting
x86_64-pc-windows-msvc
works fine but targetingi686-pc-windows-msvc
causes a compiler error.Repro steps
Results
The text was updated successfully, but these errors were encountered: