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

Mismatch rust version in cargo and global installation #14219

Closed
chandankrishn opened this issue Jul 9, 2024 · 5 comments
Closed

Mismatch rust version in cargo and global installation #14219

chandankrishn opened this issue Jul 9, 2024 · 5 comments
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@chandankrishn
Copy link

Problem

solana-hello-world % cargo build-bpf
error: package bumpalo v3.16.0 cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.72.0-dev
Either upgrade to rustc 1.73.0 or newer, or use
cargo update -p [email protected] --precise ver
where ver is the latest version of bumpalo supporting rustc 1.72.0-dev
solana-hello-world % rustc --version
rustc 1.79.0 (129f3b996 2024-06-10) (Homebrew)

I have been running cargo build-bpf. It is showing some different version of rustc and while global rustc is different

  • I have tried uninstalling rustc by brew
  • I have reinstalled it several times

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

@chandankrishn chandankrishn added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jul 9, 2024
@Muscraft
Copy link
Member

Muscraft commented Jul 9, 2024

If I am reading this issue correctly, the problem you are running into is caused by solana, not by cargo. It looks like that issue talks about possible solutions and links to others that have potential solutions.

@weihanglo weihanglo added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels Jul 9, 2024
@Skgland
Copy link

Skgland commented Jul 30, 2024

The problem sounds like a confusion of the rustc version used by cargo (i.e. cargo rustc -- --version) and the version of a separately installed rustc (rust --version).
Basically the rustc version used by cargo is linked to the version of cargo and has nothing to do with your seperatly installed rustc, so rather than updating your separate rustc installation you would need to update your cargo installation.

@weihanglo
Copy link
Member

Thanks people. Going to close this as it doesn't seem to be an issue in Cargo. Feel free to reopen if later it is found a Cargo bug.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
@Skgland
Copy link

Skgland commented Jul 30, 2024

Also I just noticed that you are running cargo build-bpf rather than cargo build, so it looks like this might be a similar problem to solana-labs/solana#34987 it looks like a better error message was only implemented for build-sbf but not build-bpf or you are using an old version

@Skgland
Copy link

Skgland commented Jul 30, 2024

Maybe the cargo error message could be improved to indicate where the rustc it is using originates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

4 participants