Skip to content
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

proc_macro crate missing from miri sysroot beginning nightly-2023-05-05 #2874

Closed
dtolnay opened this issue May 5, 2023 · 5 comments · Fixed by rust-lang/rust#111236
Closed

Comments

@dtolnay
Copy link
Member

dtolnay commented May 5, 2023

// src/main.rs

extern crate proc_macro;

fn main() {}
$ cargo +nightly-2023-05-04 miri run  # works
$ cargo +nightly-2023-05-05 miri run
   Compiling testing v0.0.0
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `~/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/bin/cargo-miri runner target/miri/x86_64-unknown-linux-gnu/debug/testing`

error[E0463]: can't find crate for `proc_macro`
 --> src/main.rs:1:1
  |
1 | extern crate proc_macro;
  | ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.

Rust-lang/rust commit range is rust-lang/rust@473f916...74c4821. Probably rust-lang/rust#108865 (FYI @Zoxc @jyn514)

@jyn514
Copy link
Member

jyn514 commented May 5, 2023

Miri probably needs to change from building test to the new sysroot crate.

dtolnay added a commit to dtolnay/anyhow that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/quote that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/reflect that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/remain that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/readonly that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/inherent that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/async-trait that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/syn that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/serde-repr that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/ghost that referenced this issue May 5, 2023
dtolnay added a commit to dtolnay/proc-macro2 that referenced this issue May 5, 2023
@saethlin
Copy link
Member

saethlin commented May 5, 2023

Ouch. I might look into this tomorrow, but for anyone else interested in fixing this, Miri uses this crate to build the sysroot: https://github.com/RalfJung/rustc-build-sysroot

@RalfJung
Copy link
Member

RalfJung commented May 5, 2023

Yeah... that is the easy part though: RalfJung/rustc-build-sysroot#6. The hard part is that this crate would like to support a range of rustc versions, not just the latest nightly.

@workingjubilee
Copy link
Member

I've posted rust-lang/rust#111234 to hopefully give a bit more time to develop a migration plan.

@RalfJung
Copy link
Member

RalfJung commented May 5, 2023

For Miri at least I think the migration is done when rust-lang/rust#111236 lands.

@RalfJung RalfJung mentioned this issue May 5, 2023
bors added a commit that referenced this issue May 5, 2023
Rustup

This *should* fail because of #2874 but it seems we don't actually cover that in our tests...
RalfJung pushed a commit to RalfJung/rust that referenced this issue May 11, 2023
Rustup

This *should* fail because of rust-lang/miri#2874 but it seems we don't actually cover that in our tests...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants