Skip to content

Failed to build Windows crate with i686-pc-windows-msvc #82991

Closed
@kennykerr

Description

@kennykerr

As requested, here's another internal compiler error I just ran into. Targeting x86_64-pc-windows-msvc works fine but targeting i686-pc-windows-msvc causes a compiler error.

Repro steps

git clone http://github.com/microsoft/windows-rs
cd windows-rs
cargo build --target i686-pc-windows-msvc

Results

C:\windows-rs>cargo build --target i686-pc-windows-msvc
   Compiling proc-macro2 v1.0.24
   Compiling syn v1.0.63
   Compiling unicode-xid v0.2.1
   Compiling squote v0.1.2
   Compiling const-sha1 v0.2.0
   Compiling quote v1.0.9
   Compiling windows_gen_macros v0.4.0 (C:\windows-rs\crates\gen\macros)
   Compiling windows_gen v0.4.0 (C:\windows-rs\crates\gen)
thread 'rustc' panicked at 'Failed to get crate data for crate15', compiler\rustc_metadata\src\creader.rs:136:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (3a5d45f68 2021-03-09) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `windows_gen`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-proc-macrosArea: Procedural macrosC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions