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

profile-rustflags vs stable in toolchain/miri-script #3863

Closed
DeSevilla opened this issue Sep 6, 2024 · 3 comments · Fixed by #3864
Closed

profile-rustflags vs stable in toolchain/miri-script #3863

DeSevilla opened this issue Sep 6, 2024 · 3 comments · Fixed by #3864

Comments

@DeSevilla
Copy link
Contributor

I'm building Miri for the first time on Windows according to the instructions here. I've installed rustup-toolchain-install-master, but by default, running './miri toolchain' in order to install the right version of Rust gives me the following error message:

The package requires the Cargo feature called `profile-rustflags`, but that feature is not stabilized in this version of Cargo (1.81.0 (2dbb1af80 2024-08-20)).
  Consider trying a newer version of Cargo (this may require the nightly release).
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-rustflags-option for more information about the status of this feature.
Failed to build miri-script. Is the 'stable' toolchain installed?

The culprit here appears to be this line in miri.bat, which calls "cargo +stable".

cargo +stable build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml ^

Changing it to "+nightly" lets me build and run Miri successfully. The +stable was introduced in #3402, to fix an inability to build miri-script in case of an error, so just removing "+stable" might not be the best way to solve this in general. Is it possible to build miri-script on stable without requiring profile-rustflags?

@RalfJung
Copy link
Member

RalfJung commented Sep 6, 2024

Thanks for the report! None of the core devs use Windows or know the batch file syntax, so the miri.bat file tends to go out-of-date. In this case however the fix is hopefully trivial -- do things work if you apply #3864 ?

@DeSevilla
Copy link
Contributor Author

Yep, changing +stable to +nightly makes everything work fine.

@RalfJung
Copy link
Member

RalfJung commented Sep 6, 2024

Okay, thanks for testing. :)

@bors bors closed this as completed in 782b383 Sep 6, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Sep 8, 2024
miri.bat: use nightly toolchain

Hopefully fixes rust-lang/miri#3863 (but I can't test that)
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.

2 participants