rust-lang / rust-lang/rustup

Zero-sized binaries in ~/.cargo/bin (ChromeOS?)

Open
#1,954 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

The latest version of rust (1.36.0 as of this comment) is not working. After installation on an i686 ChromeOS system, I get all zero byte binaries in ~/.cargo/bin. By the way, I fully agree with @josephRice. I see so many projects like this that require the user's path to be modified. I don't understand why this is so popular but it's the WRONG WAY to install an application. See below:

chronos@localhost /usr/local/tmp $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /home/chronos/user/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile files located at:

  /home/chronos/user/.profile
  /home/chronos/user/.bash_profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: i686-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: syncing channel updates for 'stable-i686-unknown-linux-gnu'
info: latest update on 2019-07-04, rust version 1.36.0 (a53f9df32 2019-07-03)
info: downloading component 'rustc'
103.6 MiB / 103.6 MiB (100 %)   8.2 MiB/s in 14s ETA:  0s
info: downloading component 'rust-std'
 61.0 MiB /  61.0 MiB (100 %)   7.7 MiB/s in  9s ETA:  0s
info: downloading component 'cargo'
info: downloading component 'rust-docs'
 11.0 MiB /  11.0 MiB (100 %)   8.3 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
103.6 MiB / 103.6 MiB (100 %)   1.5 MiB/s in  1m 12s ETA:  0s
info: installing component 'rust-std'
 61.0 MiB /  61.0 MiB (100 %)   1.6 MiB/s in 38s ETA:  0s
info: installing component 'cargo'
  4.7 MiB /   4.7 MiB (100 %)   1.7 MiB/s in  3s ETA:  0s
info: installing component 'rust-docs'
 11.0 MiB /  11.0 MiB (100 %) 425.6 KiB/s in 50s ETA:  0s    
info: default toolchain set to 'stable'

  stable installed - (error reading rustc version)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH 
environment variable. Next time you log in this will be done automatically.

To configure your current shell run source $HOME/.cargo/env
chronos@localhost ~ $ source $HOME/.cargo/env
chronos@localhost ~ $ cd .cargo/bin/
chronos@localhost ~/.cargo/bin $ ls -la
total 104
drwxr-xr-x  2 chronos chronos 4096 Jul 28 01:31 .
drwxr-xr-x  3 chronos chronos 4096 Jul 28 01:35 ..
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 cargo
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 cargo-clippy
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 cargo-fmt
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 cargo-miri
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 clippy-driver
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rls
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rustc
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rustdoc
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rustfmt
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rust-gdb
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rust-lldb
-rwxr-xr-x 12 chronos chronos    0 Jul 28 01:31 rustup

Also, why does the script download everything twice? Sorry for the rant.

Originally posted by @uberhacker in https://github.com/rust-lang/rustup.rs/issues/686#issuecomment-515738186

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported rustup installation on an i686 ChromeOS system, starting with the installer command and the resulting files in ~/.cargo/bin. Compare component installation with the reported output and verify whether rustc can report its version. Done means the installed binaries are non-empty and the default toolchain works.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.