-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Bug]: cargo marker setup --auto-install-toolchain
fails with E0554 #[feature]
on stable channel
#318
Comments
@tigerros Thank you for the report. Could you maybe run the command again with more logging enabled like this: MARKER_ERROR_TRACE=1 MARKER_LOG=info cargo marker setup --auto-install-toolchain In the meantime, I would recommend to use our installation script to download the precompiled binaries. This will install curl.exe -fsSL https://raw.githubusercontent.com/rust-marker/marker/v0.4/scripts/release/install.ps1 | powershell -command - cc: @Veetaha Looking at this, we probably want to test |
#[feature]
on stable channel with cargo marker setup --auto-install-toolchain
fails with E0554 #[feature]
on stable channel
@xFrednet Sorry for not replying sooner. I'm a little confused... I ran the command again and it didn't fail, but then I cleaned both the lint crate (the template) and the crate that's using the lints (empty stable project), and it failed with the same log. However, then I ran Error log2023-11-24T16:51:41.544332Z INFO cli: ❱ cargo locate-project "--color=always" --workspace 2023-11-24T16:51:41.606825Z INFO cli: ❱ rustup toolchain install nightly-2023-10-05 --component rustc-dev llvm-tools info: syncing channel updates for 'nightly-2023-10-05-x86_64-pc-windows-msvc' info: latest update on 2023-10-05, rust version 1.75.0-nightly (2bbb61989 2023-10-04) info: component 'llvm-tools' for target 'x86_64-pc-windows-msvc' is up to date info: component 'rustc-dev' for target 'x86_64-pc-windows-msvc' is up to date nightly-2023-10-05-x86_64-pc-windows-msvc unchanged - rustc 1.75.0-nightly (2bbb61989 2023-10-04) info: checking for self-update 2023-11-24T16:51:42.224620Z INFO cli: ❱ rustup which --toolchain nightly-2023-10-05 cargo 2023-11-24T16:51:42.238505Z INFO cargo_marker::backend::toolchain: Found the tool tool=cargo toolchain=nightly-2023-10-05 path=C:\Users\aurel\.rustup\toolchains\nightly-2023-10-05-x86_64-pc-windows-ms vc\bin\cargo.exe Marker compiling rustc driver v0.4.0 with nightly-2023-10-05 2023-11-24T16:51:42.239400Z INFO cli: ❱ rustup which --toolchain nightly-2023-10-05 cargo 2023-11-24T16:51:42.251834Z INFO cargo_marker::backend::toolchain: Found the tool tool=cargo toolchain=nightly-2023-10-05 path=C:\Users\aurel\.rustup\toolchains\nightly-2023-10-05-x86_64-pc-windows-ms vc\bin\cargo.exe 2023-11-24T16:51:42.252152Z INFO cli: ❱ MARKER_ALLOW_DRIVER_BUILD=1 RUSTFLAGS=" --cap-lints=allow" RUSTUP_TOOLCHAIN=nightly-2023-10-05 cargo install marker_rustc_driver --version 0.4.0 --force --root "C:\\Users\\aurel\\.rustup\\toolchains\\nightly-2023-10-05-x86_64-pc-windows-msvc" --no-track Updating crates.io index Installing marker_rustc_driver v0.4.0 Updating crates.io index Compiling proc-macro2 v1.0.69 Compiling unicode-ident v1.0.12 Compiling windows_x86_64_msvc v0.48.5 Compiling once_cell v1.18.0 Compiling cfg-if v1.0.0 Compiling cc v1.0.83 Compiling winapi v0.3.9 Compiling thiserror v1.0.50 Compiling rustc-demangle v0.1.23 Compiling lazy_static v1.4.0 Compiling tracing-core v0.1.32 Compiling thread_local v1.1.7 Compiling sharded-slab v0.1.7 Compiling windows-targets v0.48.5 Compiling windows-sys v0.48.0 Compiling serde v1.0.193 Compiling quote v1.0.33 Compiling syn v2.0.39 Compiling pin-project-lite v0.2.13 Compiling unicode-linebreak v0.1.5 Compiling is_ci v1.1.1 Compiling smawk v0.3.2 Compiling unicode-width v0.1.11 Compiling tracing v0.1.40 Compiling tracing-subscriber v0.3.18 Compiling textwrap v0.15.2 Compiling is-terminal v0.4.9 Compiling backtrace v0.3.69 Compiling terminal_size v0.1.17 Compiling supports-hyperlinks v2.1.0 Compiling supports-unicode v2.0.0 Compiling supports-color v2.1.0 Compiling owo-colors v3.5.0 Compiling camino v1.1.6 Compiling either v1.9.0 Compiling backtrace-ext v0.2.1 Compiling tracing-error v0.2.0 Compiling yansi v1.0.0-rc.1 Compiling rustc_tools_util v0.3.0 Compiling itertools v0.11.0 Compiling marker_rustc_driver v0.4.0 Compiling libloading v0.8.1 Compiling bumpalo v3.14.0 Compiling thiserror-impl v1.0.50 Compiling typed-builder-macro v0.16.2 Compiling serde_derive v1.0.193 Compiling miette-derive v5.10.0 Compiling visibility v0.1.0 Compiling typed-builder v0.16.2 Compiling marker_api v0.4.0 Compiling miette v5.10.0 Compiling marker_error v0.4.0 Compiling marker_utils v0.4.0 Compiling marker_adapter v0.4.0 error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:2:1 | 2 | #![feature(rustc_private)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:3:1 | 3 | #![feature(let_chains)] | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:4:1 | 4 | #![feature(lint_reasons)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:5:1 | 5 | #![feature(iter_collect_into)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:6:1 | 6 | #![feature(non_exhaustive_omitted_patterns_lint)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:7:1 | 7 | #![feature(once_cell_try)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:5:12 | 5 | #![feature(iter_collect_into)] | ^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> C:\Users\aurel\.cargo\registry\src\index.crates.io-6f17d22bba15001f\marker_rustc_driver-0.4.0\src\lib.rs:7:12 | 7 | #![feature(once_cell_try)] | ^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0554`. error: could not compile `marker_rustc_driver` (lib) due to 8 previous errors warning: build failed, waiting for other jobs to finish... To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. x Failed to build the custom marker rustc driver | Backtrace: | 0: | 1: | 2: | 3: | 4: | 5: | 6: | 7: | 8: | 9: | 10: BaseThreadInitThunk | 11: RtlUserThreadStart | | ⚠️ Spantrace wasn't captured. It may be expected if the error happened outside of any spans, or those spans were not enabled. You may | try capturing it by enabling tracing logging or increasing its level via MARKER_LOG env variable in cargo-marker. Spantrace capturing | in marker_rustc_driver isn't supported yet. help: Make sure that you have the rustc-dev and llvm-tools components installed. Try running the following command: cargo marker setup --auto-install-toolchain or: rustup toolchain install {toolchain} --component rustc-dev llvm-tools |
@tigerros thanks for sharing the logs. The fix for this bug is in PR #319. In the meantime I recommend you to use the installation script, which handles all the corner cases of Windows environments and installs
I recommend using this approach because it is much faster and more reliable. Other solution
Additionally, could you share your experience of trying to install |
@Veetaha I've installed it through the powershell script, but now running Error log
I wanted to have the option to easily uninstall it with |
@tigerros could you share the command that you ran and also the layout of files in your directory? I can't reproduce this error. Ideally, a git repo I could clone and run the command in to reproduce would be cool |
@Veetaha I ran [workspace.metadata.marker.lints]
lint-crate-template = { git = "https://github.com/rust-marker/lint-crate-template" } Perhaps I should just reinstall marker. How would I do that? |
I should also point out that if I switch to nightly, I still get an error, although a different one. Error log
|
The error Let's try do this with a clean from-source build. Just run the following, and this should work for you. cargo install cargo_marker --force
cargo +nightly-2023-11-16 marker setup --auto-install-toolchain
# Run the linting
cargo +nightly-2023-11-16 marker
I still can't reproduce it with this setup. There must be something I'm missing in your environment. To further proceed with the debugging. Could you check if the following command works if you run it directly.
If not, then, could you share the output of |
@Veetaha I get an error saying that cargo is not applicable for the nightly toolchain you provided. I'll try reinstalling Rust. |
Yeah, you can run:
Sometimes rustup just doesn't have |
I uninstalled Rust completely, installed cargo marker with the precompiled binary, ran the auto setup and it works. I guess something was wrong with my Rust toolchains. Don't really know. |
@tigerros does it mean that now you can run |
Yes |
Thanks, nice to hear that! Btw. thanks for reporting this #318 (comment). I created a PR to fix the release build for windows #320. It should fix |
Fixes marker_rustc_driver crashing on windows with `exit code: 0xc0000005, STATUS_ACCESS_VIOLATION`. Reported in #318 (comment). I disabled LTO, in release build and it fixes the problem. I extended the CI to perform a really simple release smoke test both for the current release and for the previous release (in github action test CI job). Here, for example, you may see that the bug reproduces in master on the changed CI - [CI job for the current version of marker](https://github.com/rust-marker/marker/actions/runs/6985541482/job/19009920759?pr=320#step:4:93) - [CI job for the released version of marker](https://github.com/rust-marker/marker/actions/runs/6985541482/job/19009920759?pr=320#step:4:93) With the disabled LTO `release-smoke-test` [passes](https://github.com/rust-marker/marker/actions/runs/6985586586/job/19010007386?pr=320) Btw. @xFrednet could you add the `release-smoke-test` jobs to required ones please?
Summary
I've extracted this error from trailofbits/dylint#839, there it was reported by @tigerros
Reproducer
No response
Version
Logs
The text was updated successfully, but these errors were encountered: