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

Getting started: quick note about "cargo install cargo-binutils" #215

Open
DavidAntliff opened this issue Aug 13, 2024 · 1 comment
Open

Comments

@DavidAntliff
Copy link

I'm motivated to post this to help with the "on-boarding".

Instructions say to run:

$ cargo install cargo-binutils rustfilt

Not sure exactly why, but this failed for me with:

error: failed to compile `cargo-binutils v0.3.6`

Caused by:
  package `cargo-platform v0.1.8` cannot be built because it requires rustc 1.73 or newer, while the currently active rustc version is 1.66.0-nightly
  Try re-running cargo install with `--locked`

I happened to have nightly-2022-10-13-x86_64-unknown-linux-gnu installed, which I think corresponds to rustc 1.66.0-nightly (c0983a9aa 2022-10-12), but this isn't my active toolchain normally. It's just installed.

So I re-ran with --locked and it worked:

$ cargo install cargo-binutils rustfilt --locked
...
   Installed package `cargo-binutils v0.3.6` (executables `cargo-cov`, `cargo-nm`, `cargo-objcopy`, `cargo-objdump`, `cargo-profdata`, `cargo-readobj`, `cargo-size`, `cargo-strip`, `rust-ar`, `rust-cov`, `rust-ld`, `rust-lld`, `rust-nm`, `rust-objcopy`, `rust-objdump`, `rust-profdata`, `rust-readobj`, `rust-size`, `rust-strip`)

Assuming that this was the right thing to do, would it make sense to suggest that users always run with --locked, to ensure that the correct versions are picked up?

@BartMassey
Copy link
Member

Yeah, we just ran into this in another place as well. I'm going to change everything to suggest --locked. I need to talk to the Cargo folks about why this isn't the default.

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

No branches or pull requests

2 participants