-
Notifications
You must be signed in to change notification settings - Fork 884
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
rustup-init chooses wrong toolchain #2179
Comments
This is fascinatingly wrong yes. I apologise for the difficulty this will have given you. Once you installed the correct toolchain, you'll have wanted to Thank you for your report and log. |
I've chased this through and found the following:
Critically the difference is that in 1, I imagine that you acquired the 32 bit version of the installer, though that seems odd as I'd have expected us to give you the 64bit one if your system identified as 64bit. @pietroalbini does the lambda for win.rustup.rs do bitness detection? Either way, that discrepancy explains what you saw, now I just need to work out which is more usefully correct -- changing Clearly one or the other has to change, but let's see if Pietro can tell us why you got a 32bit installer instead of a 64bit one. |
Thanks Daniel, I have corrected the default toolchain on my system via And yes, that was my first idea too. But I only found this one download button. So if there is a 64-Bit version, than I was given the wrong installer version. Still it might be nice if the installer would be able to install the best matching toolchain for my system. My host is Windows 10 64-Bit, and the browser I used for downloading is Firefox 71.0 (64-bit). I checked the rustup-init.exe file, it is definitely the 32-bit Version.
|
@kinnison well... no, this is the whole lambda: 'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
if (request.uri === '/') {
request.uri = '/i686-pc-windows-msvc/rustup-init.exe';
} else if (request.uri == '/i686') {
request.uri = '/i686-pc-windows-msvc/rustup-init.exe';
} else if (request.uri == '/x86_64') {
request.uri = '/x86_64-pc-windows-msvc/rustup-init.exe';
}
callback(null, request);
}; |
Okay, in that case I'd suggest that the better approach is to use the |
Hit this bug today. Interestingly, if I select to modify the default values and type in the same thing ( |
Yeah that follows the logic in the code correctly. I'll decide on the right fix and clear it up today. |
In order to resolve an issue where installing on x86_64 with the i686 installer would claim to want to install x86_64 and then install i686 instead, ensure that we match the obvious behaviour (install matching the host) by making the default for the config match that. Fixes: rust-lang#2179 Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
In order to resolve an issue where installing on x86_64 with the i686 installer would claim to want to install x86_64 and then install i686 instead, ensure that we match the obvious behaviour (install matching the host) by making the default for the config match that. Fixes: rust-lang#2179 Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Indeed this is a fascinating bug. Given that 32 bit is basically niche at this point, , I think our biggest risk of issues is going to be things like debian multiarch. What would happen there, for instance? |
Multiarch is an interesting question. Rustup uses |
I also experienced this issue. I've downloaded the rustup-init.exe version 1.21.1 (7832b2e 2019-12-20) from https://www.rust-lang.org/tools/install that actually uses https://win.rustup.rs/ as the download link. It gave me a 32-bit version. I've found the 64-bit version of rustup-init.exe here: https://rustup.rs/ with actual download link https://win.rustup.rs/x86_64 Also the 32-bit version of rustup-init.exe actually can install the x86_64 version of Rust toolchain on 64-bit Windows as well. You need just chose the option 2 (Customize installation) and press Enter several times, choosing everything default. So this doesn't look mandatory to use a 64-bit version of rustup-init.exe to install x86_64 version of Rust toolchain. However it will install 32-bit version of the rustup.exe and probably of other tools. So the main bug here is that the rustup-init.exe doesn't inform what bit version of rustup it's going to install. Also if it can install both the 32-bit and the 64-bit versions of toolchan why it can't download and install the appropriate version of the rustup and rest of the tools? After all the restup-init.exe is just an installer. I think the 32-bit and the 64-bit versions of rustup-init.exe should be unified into a single 32-bit only (i.e. not multiarch) executable that will ask the user what bit version of the rustup to install or properly detect it by itself. Everything rustup-init.exe installs should be downloaded and not packed into itself. Also there is a problem in the https://www.rust-lang.org/tools/install webpage that doesn't detect the client's OS correctly and offers a wrong download link. Another problem is that the 32-bit and the 64-bit version of rustup-init.exe have exactly the same name and this can confuse, especially on shared storage. Nobody would check this executable with a tool like Reopen this bug please. |
The bug is fixed, just not in a release yet - I'm sorry you've also been hit by it. is the fix. What this changes is makes sure that we honour the host we're running on appropriately, regardless of whether a 32 or 64 bit windows binary of rustup-init is running. Then self-update will eventually get the ideal build of rustup itself over time too, though that matters much much less. There are perhaps other issues you are highlighting, but if so please do file new bugs. FWIW rustup-init and rustup are the same binary, just different names; and they can and do install either toolchain versions already - that is kindof how the bug arose in the first place. |
In order to resolve an issue where installing on x86_64 with the i686 installer would claim to want to install x86_64 and then install i686 instead, ensure that we match the obvious behaviour (install matching the host) by making the default for the config match that. Fixes: rust-lang#2179 Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
I downloaded rustup-init.exe for Windows from here:
https://www.rust-lang.org/tools/install
My host is Windows 10 64-bit.
When I ran rustup-init.exe it detected the default host triple correct as:
x86_64-pc-windows-msvc
But when I agreed to proceed with installation it changed its mind to this instead:
i686-pc-windows-msvc
I will attach the log file (just copied std::cout).
Anyway, not a very big problem.
rust-install.log
I installed the 64-bit toolchain now with like this:
C:\Users\David>rustup toolchain list
stable-i686-pc-windows-msvc (default)
C:\Users\David>rustup toolchain install stable-x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
471.3 KiB / 471.3 KiB (100 %) 133.0 KiB/s in 4s ETA: 0s
info: latest update on 2019-12-19, rust version 1.40.0 (73528e339 2019-12-16)
info: downloading component 'cargo'
3.1 MiB / 3.1 MiB (100 %) 128.0 KiB/s in 26s ETA: 0s
........
......
The text was updated successfully, but these errors were encountered: