rustup icon indicating copy to clipboard operation
rustup copied to clipboard

`aarch64-unknown-linux-musl` fails to install for `1.62` but works for `1.62.x`

Open onelson opened this issue 3 years ago • 2 comments

Problem

With channel = "1.62" specified in my rust-toolchain.toml cargo commands fail when installing the aarch64-unknown-linux-musl component.

The complete toolchain file:

[toolchain]
channel = "1.62"
components = ["rustfmt", "clippy"]
targets = [
    "aarch64-unknown-linux-musl",
]

The output:

$ cargo check
info: syncing channel updates for '1.62-x86_64-unknown-linux-gnu'
info: latest update on 2022-07-19, rust version 1.62.1 (e092d0b6b 2022-07-16)
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'rust-std' for 'aarch64-unknown-linux-musl'
info: installing component 'rust-std' for 'aarch64-unknown-linux-musl'
info: rolling back changes
error: failed to install component: 'rust-std-aarch64-unknown-linux-musl', detected conflict: 'lib/rustlib/aarch64-unknown-linux-musl/lib/libgimli-c1ef154125dd6069.rlib'

Specifying 1.62.1 (the current latest for the 1.62.x line) instead of 1.62 seems to work fine.

Steps

$ cd /tmp/
$ cargo new repro
     Created binary (application) `repro` package
$ cd repro/
$ vim rust-toolchain.toml
$ cargo check
info: syncing channel updates for '1.62-x86_64-unknown-linux-gnu'
info: latest update on 2022-07-19, rust version 1.62.1 (e092d0b6b 2022-07-16)
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'rust-std' for 'aarch64-unknown-linux-musl'
info: installing component 'rust-std' for 'aarch64-unknown-linux-musl'
info: rolling back changes
error: failed to install component: 'rust-std-aarch64-unknown-linux-musl', detected conflict: 'lib/rustlib/aarch64-unknown-linux-musl/lib/libgimli-c1ef154125dd6069.rlib'

Again, the contents of the rust-toolchain.toml used here are as follows:

[toolchain]
channel = "1.62"
components = ["rustfmt", "clippy"]
targets = [
    "aarch64-unknown-linux-musl",
]

Possible Solution(s)

No response

Notes

For now, my workaround is to specify the three-part version.

Rustup version

rustup --version
rustup 1.25.1 (bb60b1e89 2022-07-12)

Installed toolchains

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/onelson/.rustup

info: syncing channel updates for '1.62-x86_64-unknown-linux-gnu'
info: latest update on 2022-07-19, rust version 1.62.1 (e092d0b6b 2022-07-16)
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'rust-std' for 'aarch64-unknown-linux-musl'
info: installing component 'rust-std' for 'aarch64-unknown-linux-musl'
 25.3 MiB /  25.3 MiB (100 %)  17.5 MiB/s in  1s ETA:  0s
info: rolling back changes
installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
1.52-x86_64-unknown-linux-gnu
1.55-x86_64-unknown-linux-gnu
1.56-x86_64-unknown-linux-gnu
1.58-x86_64-unknown-linux-gnu
1.59-x86_64-unknown-linux-gnu
1.60-x86_64-unknown-linux-gnu
1.62-x86_64-unknown-linux-gnu
1.63-x86_64-unknown-linux-gnu
1.56.0-x86_64-unknown-linux-gnu
1.58.1-x86_64-unknown-linux-gnu
1.62.0-x86_64-unknown-linux-gnu
1.62.1-x86_64-unknown-linux-gnu

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

(error: failed to install component: 'rust-std-aarch64-unknown-linux-musl', detected conflict: 'lib/rustlib/aarch64-unknown-linux-musl/lib/libgimli-c1ef154125dd6069.rlib'

onelson avatar Aug 16 '22 17:08 onelson

I cannot reproduce this on my macOS.

➜  repro git:(master) ✗ cargo check
info: syncing channel updates for '1.62-aarch64-apple-darwin'
info: latest update on 2022-07-19, rust version 1.62.1 (e092d0b6b 2022-07-16)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rust-std' for 'aarch64-unknown-linux-musl'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rust-std' for 'aarch64-unknown-linux-musl'
info: installing component 'rustc'
info: installing component 'rustfmt'
    Checking repro v0.1.0 (/private/tmp/repro)
    Finished dev [unoptimized + debuginfo] target(s) in 2.47s
➜  repro git:(master) ✗ rustup --version
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.62.1 (e092d0b6b 2022-07-16)`
➜  repro git:(master) ✗ rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/hi-rustin/.rustup

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

stable-aarch64-apple-darwin
beta-aarch64-apple-darwin (default)
nightly-2021-07-28-aarch64-apple-darwin
nightly-aarch64-apple-darwin
1.62-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
aarch64-unknown-linux-musl

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

1.62-aarch64-apple-darwin (overridden by '/private/tmp/repro/rust-toolchain.toml')
rustc 1.62.1 (e092d0b6b 2022-07-16)

0xPoe avatar Sep 27 '22 02:09 0xPoe

info: rolling back changes

Maybe it is related to this uncommitted dist transaction.

0xPoe avatar Sep 27 '22 02:09 0xPoe