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

complete profile is an attractive nuisance #2661

Open
mbuesch opened this issue Feb 13, 2021 · 11 comments
Open

complete profile is an attractive nuisance #2661

mbuesch opened this issue Feb 13, 2021 · 11 comments
Assignees

Comments

@mbuesch
Copy link

mbuesch commented Feb 13, 2021

Problem
rustup-init fails with: detected conflict: '"share/doc/rust/html/rustc/favicon.svg"'
when installing nightly complete:

info: profile set to 'complete'    
info: setting default host triple to x86_64-unknown-linux-gnu               
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'                                                                                    
info: latest update on 2021-02-13, rust version 1.52.0-nightly (3f5aee2d5 2021-02-12)                                                                   
info: downloading component 'cargo'   
info: downloading component 'clippy'
info: downloading component 'llvm-tools-preview'                            
 20.2 MiB /  20.2 MiB (100 %)   6.3 MiB/s in  3s ETA:  0s        
info: downloading component 'miri'                                          
info: downloading component 'rls'     
  8.4 MiB /   8.4 MiB (100 %)   6.5 MiB/s in  1s ETA:  0s       
info: downloading component 'rust-analysis'                                 
info: downloading component 'rust-analyzer-preview'                         
info: downloading component 'rust-docs'                                     
 15.0 MiB /  15.0 MiB (100 %)   6.4 MiB/s in  2s ETA:  0s                   
info: downloading component 'rust-src'                                      
info: downloading component 'rust-std'
 25.0 MiB /  25.0 MiB (100 %)   6.6 MiB/s in  3s ETA:  0s                   
info: downloading component 'rustc'   
 50.2 MiB /  50.2 MiB (100 %)   6.5 MiB/s in  8s ETA:  0s                   
info: downloading component 'rustc-dev'                                     
103.7 MiB / 103.7 MiB (100 %)   6.2 MiB/s in 16s ETA:  0s     
info: downloading component 'rustc-docs'                                    
 11.1 MiB /  11.1 MiB (100 %)   6.3 MiB/s in  1s ETA:  0s   
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 'llvm-tools-preview'                  
 20.2 MiB /  20.2 MiB (100 %)   9.8 MiB/s in  2s ETA:  0s
info: installing component 'miri'     
info: installing component 'rls'
info: installing component 'rust-analysis'                                  
info: installing component 'rust-analyzer-preview'                          
info: installing component 'rust-docs'                                      
 15.0 MiB /  15.0 MiB (100 %)   6.8 MiB/s in  2s ETA:  0s                   
info: installing component 'rust-src' 
info: installing component 'rust-std'
 25.0 MiB /  25.0 MiB (100 %)   8.6 MiB/s in  2s ETA:  0s                   
info: installing component 'rustc'    
 50.2 MiB /  50.2 MiB (100 %)  10.1 MiB/s in  4s ETA:  0s
info: installing component 'rustc-dev'                                      
103.7 MiB / 103.7 MiB (100 %)   9.5 MiB/s in 12s ETA:  0s                   
info: installing component 'rustc-docs'                                     
 11.1 MiB /  11.1 MiB (100 %)   4.9 MiB/s in  3s ETA:  0s                   
info: rolling back changes                                                  
error: failed to install component: 'rustc-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/rustc/favicon.svg"'                 

Steps

Operating system: Linux amd64

Use installer settings:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: nightly
               profile: complete
  modify PATH variable: no

Possible Solution(s)

Notes

@mbuesch mbuesch added the bug label Feb 13, 2021
@mingmoe
Copy link

mingmoe commented Feb 14, 2021

You may have interrupted the download.
If it's true.
You may need to clear your download cache.
Usually in ~/.rustup and ~/.cargo.

@mbuesch
Copy link
Author

mbuesch commented Feb 14, 2021

You may have interrupted the download.

No.

You may need to clear your download cache.
Usually in ~/.rustup and ~/.cargo.

No. This is a completely fresh start. rustup and cargo directories don't exist.

It only happens in complete profile. I guess two components provide the same file or something like that.
Please try to reproduce the problem.

$ RUSTUP_HOME=/tmp/rustup CARGO_HOME=/tmp/cargo sh ./rustup-init.sh --profile complete --no-modify-path --default-toolchain nightly -y
info: downloading installer
Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
Warning: Not enforcing TLS v1.2, this is potentially less secure
warning: downloading with complete profile isn't recommended unless you are a developer of the rust language
info: profile set to 'complete'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-02-14, rust version 1.52.0-nightly (8e54a2113 2021-02-13)
info: downloading component 'cargo'
  6.0 MiB /   6.0 MiB (100 %)   5.7 MiB/s in  1s ETA:  0s
info: downloading component 'clippy'
info: downloading component 'llvm-tools-preview'
 20.2 MiB /  20.2 MiB (100 %)   6.1 MiB/s in  3s ETA:  0s
info: downloading component 'miri'
info: downloading component 'rls'
  8.4 MiB /   8.4 MiB (100 %)   6.0 MiB/s in  1s ETA:  0s
info: downloading component 'rust-analysis'
info: downloading component 'rust-analyzer-preview'
  6.3 MiB /   6.3 MiB (100 %)   5.5 MiB/s in  1s ETA:  0s
info: downloading component 'rust-docs'
 15.0 MiB /  15.0 MiB (100 %)   6.3 MiB/s in  2s ETA:  0s
info: downloading component 'rust-src'
info: downloading component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)   6.2 MiB/s in  4s ETA:  0s
info: downloading component 'rustc'
 50.1 MiB /  50.1 MiB (100 %)   5.9 MiB/s in  8s ETA:  0s
info: downloading component 'rustc-dev'
103.6 MiB / 103.6 MiB (100 %)   6.1 MiB/s in 17s ETA:  0s
info: downloading component 'rustc-docs'
 11.1 MiB /  11.1 MiB (100 %)   6.2 MiB/s in  1s ETA:  0s
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 'llvm-tools-preview'
 20.2 MiB /  20.2 MiB (100 %)  10.4 MiB/s in  1s ETA:  0s
info: installing component 'miri'
info: installing component 'rls'
info: installing component 'rust-analysis'
info: installing component 'rust-analyzer-preview'
info: installing component 'rust-docs'
 15.0 MiB /  15.0 MiB (100 %)   7.3 MiB/s in  1s ETA:  0s
info: installing component 'rust-src'
info: installing component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)   9.0 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 50.1 MiB /  50.1 MiB (100 %)  10.4 MiB/s in  4s ETA:  0s
info: installing component 'rustc-dev'
103.6 MiB / 103.6 MiB (100 %)   9.9 MiB/s in 10s ETA:  0s
info: installing component 'rustc-docs'
 11.1 MiB /  11.1 MiB (100 %)   7.6 MiB/s in  1s ETA:  0s
info: rolling back changes
error: failed to install component: 'rustc-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/rustc/favicon.svg"'

@rbtcollins
Copy link
Contributor

Don't use the complete profile. It is not intended for use.

@mbuesch
Copy link
Author

mbuesch commented Feb 15, 2021

Ah Ok.

So could we remove this user visible option?
It's pretty confusing to have a visible option that's not supposed to be used.

@kinnison
Copy link
Contributor

I agree that it is confusing and I'll bring it up for discussion at our next dev-tools meeting. I'm considering hiding complete entirely as we've never really made it work properly.

@kinnison kinnison self-assigned this Feb 16, 2021
@blesson3
Copy link

blesson3 commented Feb 22, 2021

I'm using the default profile and I'm getting a similar error failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/std/keyword.self.html"'. The non-native-host toolchain is required by cross, but I've boiled the issue down to the default profile used by rustup.

I even removed the ~/.rustup dir before installing to avoid other toolchain conflicts.

Host: macOS big sur 11.1 (20C69)
Target: raspberry pi 3b+

$ rustup --version                                                       
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.

$ rm -rf ~/.rustup                                                      

$ sw_vers
ProductName:    macOS
ProductVersion: 11.1
BuildVersion:   20C69

$ rustup show profile                                                   
default

$ rustup toolchain add stable-x86_64-unknown-linux-gnu                  
warning: toolchain 'stable-x86_64-unknown-linux-gnu' 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-gnu` instead?
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
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'
 14.7 MiB /  14.7 MiB (100 %)  12.2 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)  12.5 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 60.3 MiB /  60.3 MiB (100 %)  13.6 MiB/s in  4s ETA:  0s
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 %)   5.0 MiB/s in  2s ETA:  0s
info: rolling back changes
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/std/keyword.self.html"'

The install works using the minimal profile though, probably because it's not installing rust-docs component.

$ rm -rf ~/.rustup                                    

$ sw_vers                                             
ProductName:    macOS
ProductVersion: 11.1
BuildVersion:   20C69

$ rustup set profile minimal                               
info: profile set to 'minimal'

$ rustup show profile       
minimal

$ rustup toolchain add stable-x86_64-unknown-linux-gnu
warning: toolchain 'stable-x86_64-unknown-linux-gnu' 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-gnu` instead?
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-02-11, rust version 1.50.0 (cb75ad5db 2021-02-10)
info: downloading component 'cargo'
info: downloading component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)   9.6 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 60.3 MiB /  60.3 MiB (100 %)  13.6 MiB/s in  4s ETA:  0s
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)  11.2 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 60.3 MiB /  60.3 MiB (100 %)  13.2 MiB/s in  4s ETA:  0s

  stable-x86_64-unknown-linux-gnu installed - (error reading rustc version)

info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
info: checking for self-updates

blesson3 added a commit to blesson3/cross that referenced this issue Feb 22, 2021
this is needed bc of some bug(?) in rustup not being able to install the
necessary toolchain without error
using the `default` profile

see my comment in the rustup project:
rust-lang/rustup#2661 (comment)
blesson3 added a commit to blesson3/cross that referenced this issue Feb 22, 2021
this is needed bc of some bug(?) in rustup not being able to install the
necessary toolchain without error using the `default` profile

see my comment in the rustup project:
rust-lang/rustup#2661 (comment)
@rbtcollins rbtcollins changed the title rustup-init fails with: detected conflict: '"share/doc/rust/html/rustc/favicon.svg"' complete profile is an attractive nuisance Feb 28, 2021
@rbtcollins
Copy link
Contributor

@blesson3 no, you're hitting #2672

@kinnison
Copy link
Contributor

For reference, from the dev-tools meeting, I was tasked with taking the discussion to the release team to see what they'd prefer to do between redefining the set of things in complete to something which can be guaranteed to install on stable toolchains, or to deprecating/removing it entirely.

In the meantime the dev-tools team, as a whole, was okay with the idea of hiding the complete profile (ie. removing it from documentation and CLI help) but leaving it possible to use. Perhaps increasing the warning that it is currently considered an unstable choice might be a good way to decrease people's expectations until we have a release team decision.

@rubin55
Copy link

rubin55 commented Mar 31, 2021

Like @blesson3, I'm running into the exact same issue, but on Linux, Pop!_OS 20.04 (an Ubuntu variant). Note that this happens both with complete and default. The fact that complete could/should be hidden has nothing to do with this issue:

rm -rf ~/.cargo ~/.rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(...)
info: profile set to 'default'
info: setting default host triple to x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 50.4 MiB /  50.4 MiB (100 %)  36.2 MiB/s in  2s ETA:  0s
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.9 MiB /  14.9 MiB (100 %)   4.9 MiB/s in  4s ETA:  0s
info: rolling back changes
warning: could not delete temp directory: /home/rubin/.rustup/tmp/csn105hulr00a8d6_dir
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/std/keyword.self.html"'

Note also that it's the exact same file that's conflicting (share/doc/rust/html/std/keyword.self.html). I can confirm that minimal works, because it does not install rust-docs-x86_64-unknown-linux-gnu.

@kinnison
Copy link
Contributor

kinnison commented Apr 2, 2021

@rubin55 The rust-docs problem is not the same as the other problems on this. This implies you're installing a linux toolchain onto a non-linux host as that kind of error is more related to the fact that 1.50 and 1.51's documentation contains filenames which differ only by case which upsets Windows and mac filesystems in their default configuration

@eshikafe

This comment has been minimized.

bors bot added a commit to cross-rs/cross that referenced this issue Sep 5, 2021
522: specify the `minimal` profile when installing rust toolchain (due to bug in rustup?) r=Emilgardis a=blesson3

this is needed bc of some bug(?) in rustup not being able to install the necessary toolchain without error using the `default` profile, so the `minimal` profile is needed.

see my comment in the rustup project regarding this issue: rust-lang/rustup#2661 (comment)

this is the error I get when running cross
```
# clear all toolchains
$ rm -rf ~/.rustup                                       

$ cross build --target aarch64-unknown-linux-gnu
warning: toolchain 'nightly-x86_64-unknown-linux-gnu' 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-gnu` instead?
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-02-22, rust version 1.52.0-nightly (3e826bb11 2021-02-21)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 15.0 MiB /  15.0 MiB (100 %)  10.0 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)  12.7 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 47.9 MiB /  47.9 MiB (100 %)  13.5 MiB/s in  3s ETA:  0s
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'
 15.0 MiB /  15.0 MiB (100 %)   6.0 MiB/s in  2s ETA:  0s
info: rolling back changes
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html/std/keyword.self.html"'
error: couldn't install toolchain `nightly-x86_64-unknown-linux-gnu`
caused by: `"rustup" "toolchain" "add" "nightly-x86_64-unknown-linux-gnu"` failed with exit code: Some(1)
note: run with `RUST_BACKTRACE=1` for a backtrace
```

I get the same error when running cross with the following (randomly selected toolchains)
- `aarch64-unknown-linux-gnu`
- `armv7-linux-androideabi`
- `thumbv6m-none-eabi`
- `s390x-unknown-linux-gnu`

`cargo test` seems to pass and cross-compilation seems to work okay now (with this PR).

### Another work-around that isn't this pull request

<details>
    <summary>install the toolchain outside of cross using the `minimal` profile, then run cross command</summary>

```
$ rm -rf ~/.rustup

$ rustup toolchain add nightly-x86_64-unknown-linux-gnu --profile minimal
warning: toolchain 'nightly-x86_64-unknown-linux-gnu' 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-gnu` instead?
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-02-22, rust version 1.52.0-nightly (3e826bb11 2021-02-21)
info: downloading component 'cargo'
info: downloading component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)  12.4 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 47.9 MiB /  47.9 MiB (100 %)  13.6 MiB/s in  3s ETA:  0s
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)  11.1 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 47.9 MiB /  47.9 MiB (100 %)  12.6 MiB/s in  3s ETA:  0s

  nightly-x86_64-unknown-linux-gnu installed - (error reading rustc version)

info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'
info: checking for self-updates

$ cross build --target aarch64-unknown-linux-gnu                         
info: downloading component 'rust-std' for 'aarch64-unknown-linux-gnu'
info: installing component 'rust-std' for 'aarch64-unknown-linux-gnu'
info: using up to 500.0 MiB of RAM to unpack components
 26.6 MiB /  26.6 MiB (100 %)  11.5 MiB/s in  2s ETA:  0s
   Compiling libc v0.2.77
   Compiling proc-macro2 v1.0.21
   Compiling syn v1.0.41
...
```
</details>

Co-authored-by: Matt Blessed <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants