Skip to content

rustup doesn't install a toolchain? #3757

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

Closed
2 tasks done
casesolved-co-uk opened this issue Apr 6, 2024 · 11 comments
Closed
2 tasks done

rustup doesn't install a toolchain? #3757

casesolved-co-uk opened this issue Apr 6, 2024 · 11 comments
Labels

Comments

@casesolved-co-uk
Copy link

Verification

Problem

rustup thinks the stable toolchain is both up to date and not installed:

$ rustup --verbose toolchain install --force stable
verbose: read metadata version: '12'
verbose: installing toolchain 'stable-i686-apple-darwin'
verbose: toolchain directory: '/Users/rich/.rustup/toolchains/stable-i686-apple-darwin'
info: syncing channel updates for 'stable-i686-apple-darwin'
verbose: creating temp file: /Users/rich/.rustup/tmp/6_fbc3uuq0c_3inq_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/rich/.rustup/tmp/6_fbc3uuq0c_3inq_file
verbose: no update hash at: '/Users/rich/.rustup/update-hashes/stable-i686-apple-darwin'
verbose: creating temp file: /Users/rich/.rustup/tmp/y_zwqlzuujit3a6__file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
verbose: downloading with reqwest
verbose: checksum passed
verbose: creating temp file: /Users/rich/.rustup/tmp/_grzq49wquikkwnh_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.asc'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/rich/.rustup/tmp/_grzq49wquikkwnh_file
verbose: Good signature from on https://static.rust-lang.org/dist/channel-rust-stable.toml from:
verbose: from builtin Rust release key
verbose:   RSA/85AB96E6-FA1BE5FE - Rust Language (Tag and Release Signing Key) <[email protected]>
verbose:   Fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
verbose: deleted temp file: /Users/rich/.rustup/tmp/y_zwqlzuujit3a6__file.toml
info: latest update on 2024-03-28, rust version 1.77.1 (7cf61ebde 2024-03-27)
verbose: toolchain is already up to date

  stable-i686-apple-darwin unchanged - (toolchain not installed)

info: checking for self-updates
info: downloading self-update

Is there any way to force/trick an install?
I have tried an uninstall too.
I think this is the latest version for my old MacOS 10.11?

Steps

$ rustup --verbose toolchain install --force stable

Possible Solution(s)

I'm a newb, could be me, could just be the old version

Notes

No response

Rustup version

$ rustup --version
rustup 1.21.1 :: 1.21.0+13 (03e2c55dd 2019-12-20)

Installed toolchains

$ rustup show
Default host: i686-apple-darwin
rustup home:  /Users/rich/.rustup

(error: toolchain 'stable-i686-apple-darwin' is not installed, not a directory: '/Users/rich/.rustup/toolchains/stable-i686-apple-darwin')

OS version

MacOS 10.11
@casesolved-co-uk
Copy link
Author

Does this have something to do with me using i686 as opposed to x86_64?

@casesolved-co-uk
Copy link
Author

It was, fixed with the following on MacOS 10.11 (1.73.0 appears to be the latest compatible version):

rustup --verbose toolchain install 1.73.0-x86_64-apple-darwin
rustup default 1.73.0-x86_64-apple-darwin

@djc djc reopened this Apr 6, 2024
@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
@rbtcollins
Copy link
Contributor

Hi, I think there might be a bug here.

Can you ls -ld /Users/rich/.rustup/toolchains/stable-i686-apple-darwin please?

@rbtcollins rbtcollins reopened this Apr 8, 2024
@casesolved-co-uk
Copy link
Author

There isn't one, rustup wouldn't create it. I think because i686 builds don't exist anymore possibly? So it was looking for v1.77 ?

@rami3l
Copy link
Member

rami3l commented Apr 8, 2024

There isn't one, rustup wouldn't create it. I think because i686 builds don't exist anymore possibly? So it was looking for v1.77 ?

@casesolved-co-uk Looking at https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 i686-apple-darwin is a tier 3 target, so there's no guarantee that its artifacts will be available on the release server (that target corresponds to Core Solo/Duo Macs no later than mid 2006, so a bit less than two decades ago, are you sure that's what you wanted?). OTOH x86_64-apple-darwin is a perfectly fine tier 1 target.

@rbtcollins Where do you think Rustup's behavior could be improved in this case?

@rbtcollins
Copy link
Contributor

@rami3l / @casesolved-co-uk

So there are a few possibilities.

I think rustup show does nothing with the distribution channels, so whether or not the target is supported or current is quite irrelevant.

The path in the error is where a toolchain dir is expected to be found.

So if there is no path on disk present, we need to ask why rustup was trying to access/examine one.

One possibility is that when the default toolchain is set to one that does not exist, rustup does not handle the toolchain not existing. This is a possible regression from my refactoring of toolchain structs recently. I think this is most likely.

Another possibility is that there was a path present, that was not a directory, but its been removed in the intervening time. I think this is less likely.

In terms of improvements, I rather suspect rustup should handle the case (if it is what I suspect) and show something like 'default toolchain (name) [not installed]'

@casesolved-co-uk
Copy link
Author

Some additional info in case it helps:

I used the latest i686 version of rustup-init since it is the only one that would run on my Mac, hence why it was trying to install the i686 toolchain. Maybe the i686 init hasn't been updated?

Every attempt gave the same result: it refused to create a toolchains directory or the actual toolchain until I gave it a different target platform: x86_64.

It was a fresh install, I've never used/installed rust before, so no changes in paths.

My comment was based on the logic that maybe the only way that both up to date and not installed could both be true is if the stable version it is looking for doesn't exist?

I just wanted any working version of rustc to be installed because a python library wouldn't install without it.

@rami3l
Copy link
Member

rami3l commented Apr 9, 2024

One possibility is that when the default toolchain is set to one that does not exist, rustup does not handle the toolchain not existing. This is a possible regression from my refactoring of toolchain structs recently. I think this is most likely.

@rbtcollins Please note that this is rustup 1.21.1 :: 1.21.0+13 (03e2c55 2019-12-20) and I'm not sure if the issue is still there after like 4 years... Anyway it definitely has nothing to do with your recent refactoring given that.

@rami3l
Copy link
Member

rami3l commented Apr 9, 2024

@casesolved-co-uk If you're using an x86_64 Mac maybe you can try our latest test build targeting macOS 10.12: #3708 (comment)

If that doesn't work my recommendation is to try older x86_64 Rustup builds, probably something like v1.26.0. According to https://blog.rust-lang.org/2023/09/25/Increasing-Apple-Version-Requirements.html, Rust only supports macOS 10.12+ now.

Due to our release model it's not very feasible for us to pinpoint problems in an old build from 2019, sorry 🙇‍♀️

@casesolved-co-uk
Copy link
Author

Yeah it's all moot now because I fixed the issue and closed this. But appreciate that I used the wrong version of rustup which sounds like it caused the issue.

@rbtcollins
Copy link
Contributor

Ah, missed the age of rustup. Yes, lets close.

@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants