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

Error installing 1.50-x86_64-unknown-linux-musl toolchain on macOS #2694

Closed
probablykasper opened this issue Mar 15, 2021 · 12 comments
Closed
Labels
not-rustup Whatever is described in this issue isn't Rustup's fault

Comments

@probablykasper
Copy link

Problem
Installing the <version>-x86_64-unknown-linux-musl toolchain worked for Rust 1.49, but doesn't in Rust 1.50. I'm on x86_64 macOS 10.14.6.

Logs from running rustup toolchain install 1.50-x86_64-unknown-linux-musl:

warning: toolchain '1.50-x86_64-unknown-linux-musl' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add x86_64-unknown-linux-musl` instead?
info: syncing channel updates for '1.50-x86_64-unknown-linux-musl'
info: latest update on 2021-02-11, rust version 1.50.0 (cb75ad5db 2021-02-10)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'clippy'
info: installing component 'rust-docs'
 14.7 MiB /  14.7 MiB (100 %)   9.2 MiB/s in  1s ETA:  0s
info: rolling back changes
error: failed to install component: 'rust-docs-x86_64-unknown-linux-musl', detected conflict: '"share/doc/rust/html/std/keyword.self.html"'

Notes

Output of rustup --version:

rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.49.0 (e1884a8e3 2020-12-29)`

Output of rustup show:

Default host: x86_64-apple-darwin
rustup home:  /Users/kasper/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin
1.49-x86_64-apple-darwin (default)
1.49-x86_64-unknown-linux-gnu
1.49-x86_64-unknown-linux-musl
1.50-x86_64-pc-windows-gnu

active toolchain
----------------

1.49-x86_64-apple-darwin (default)
rustc 1.49.0 (e1884a8e3 2020-12-29)
@kinnison
Copy link
Contributor

AIUI the musl toolchains are tier 2 and as such not guaranteed in any sense. You can install with the minimal profile to avoid the rust-docs component. I assume you're doing these installs for some kind of research or use in docker since they likely won't run on macos?

If you want to persue this further then the issue needs @rust-lang/infra to move it to the rust-lang/rust repository.

@kinnison kinnison added the not-rustup Whatever is described in this issue isn't Rustup's fault label Mar 15, 2021
@probablykasper
Copy link
Author

@kinnison I'm using cross, which uses Docker, to cross-compile. From what I could tell musl is better for compatibility, although I know basically nothing about musl vs gnu so not sure how much that actually matters.

I initially thought this issue was for the rust repo, so I'll just re-open the issue I made there rust-lang/rust#83154.

@rbtcollins
Copy link
Contributor

Ok, so we should probably work with cross when we make toolchain installing a hard fail for non-native platforms, and allow a release cross-over period for #2672

@tmh-azinhal
Copy link

I have the same problem. However I am using the toolchain armv7-unknown-linux-gnueabihf.
Like @probablykasper, it worked with Rust 1.49. I am on macOS 11.2.3

@kinnison
Copy link
Contributor

After a bunch of research it seems that there are keyword documentation files for self and for Self (keyword.self.html and keyword.Self.html are the files) - on Linux these both exist because Linux filesystems are case-sensitive by default. On macOS and Windows, whichever is written second by rustdoc will win over the other, and thus there's actually an overwrite bug on those platforms. When you try and install a Linux toolchain onto Windows or macOS for use with cross, those files will conflict and thus you fail to install. I strongly suggest you use --profile minimal when installing a linux toolchain on macOS or Windows.

@kinnison
Copy link
Contributor

Note, these keyword documentation files were only enabled in 1.50

@kinnison kinnison removed the bug label Mar 24, 2021
@kinnison
Copy link
Contributor

rust-lang/rust#25879

@jyn514
Copy link
Member

jyn514 commented Mar 30, 2021

After a bunch of research it seems that there are keyword documentation files for self and for Self (keyword.self.html and keyword.Self.html are the files) - on Linux these both exist because Linux filesystems are case-sensitive by default. On macOS and Windows, whichever is written second by rustdoc will win over the other, and thus there's actually an overwrite bug on those platforms. When you try and install a Linux toolchain onto Windows or macOS for use with cross, those files will conflict and thus you fail to install. I strongly suggest you use --profile minimal when installing a linux toolchain on macOS or Windows.

@kinnison does it make sense for rustup to default to --profile minimal when installing a toolchain that's not for the host? That would "fix" 1.50 in future releases of rustup; rust-lang/rust#83678 can only help for new releases of rust, so 1.50 would still be broken.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Mar 30, 2021
…nflict, r=jyn514

Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)

This is just a hack to allow rustup to work on macOS and windows again to distribute std documentation (hopefully once rust-lang/rfcs#3097 or an equivalent is merged).

Fixes rust-lang#80504. Prevents rust-lang#83154 and rust-lang/rustup#2694 in future releases.

cc `@kinnison`
r? `@jyn514`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Mar 30, 2021
…nflict, r=jyn514

Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)

This is just a hack to allow rustup to work on macOS and windows again to distribute std documentation (hopefully once rust-lang/rfcs#3097 or an equivalent is merged).

Fixes rust-lang#80504. Prevents rust-lang#83154 and rust-lang/rustup#2694 in future releases.

cc ``@kinnison``
r? ``@jyn514``
@kinnison
Copy link
Contributor

That's certainly an interesting idea @jyn514 -- @rbtcollins how would you feel about overriding the default profile to minimal for non-same-host installs (unless --profile is given)?

@jyn514
Copy link
Member

jyn514 commented Apr 2, 2021

@probablykasper could you confirm that rustup toolchain install nightly-2021-04-02-unknown-linux-musl works on macOS?

@rbtcollins
Copy link
Contributor

rbtcollins commented Apr 2, 2021

@kinnison not sure thats the right thing to do on win32 on win64 configs etc. Maybe just for cross OS e.g. linux -> ~linux etc.

@probablykasper
Copy link
Author

@jyn514 Yup, it's working!

ehuss pushed a commit to ehuss/rust that referenced this issue Apr 21, 2021
…nflict, r=jyn514

Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)

This is just a hack to allow rustup to work on macOS and windows again to distribute std documentation (hopefully once rust-lang/rfcs#3097 or an equivalent is merged).

Fixes rust-lang#80504. Prevents rust-lang#83154 and rust-lang/rustup#2694 in future releases.

cc ``@kinnison``
r? ``@jyn514``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rustup Whatever is described in this issue isn't Rustup's fault
Projects
None yet
Development

No branches or pull requests

5 participants