Skip to content

Reproduction #458 RISC-V install fail #480

@Sieluna

Description

@Sieluna

Bug description

Address the issue:

$ rustup toolchain install -h
Install or update the given toolchains, or by default the active toolchain

Usage: rustup[EXE] toolchain install [OPTIONS] [TOOLCHAIN]...

Arguments:
  [TOOLCHAIN]...  Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`

Options:
      --profile <PROFILE>      [possible values: minimal, default, complete]
  -c, --component <COMPONENT>  Comma-separated list of components to be added on installation
  -t, --target <TARGET>        Comma-separated list of targets to be added on installation
      --no-self-update         Don't perform self update when running the `rustup toolchain install` command
      --force                  Force an update, even if some components are missing
      --allow-downgrade        Allow rustup to downgrade the toolchain to satisfy your component choice
      --force-non-host         Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
  -h, --help                   Print help

It says: Comma-separated list of targets to be added on installation

  1. case 1:
    rustup toolchain install nightly --profile minimal --component rust-src --target riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,riscv32imafc-unknown-none-elf OK

  2. case 2:
    rustup toolchain install nightly --profile minimal --component rust-src --target riscv32imc-unknown-none-elf --target riscv32imac-unknown-none-elf --target riscv32imafc-unknown-none-elf OK

  3. espup's method:

$ rustup toolchain install nightly --profile minimal --component rust-src --target riscv32imc-unknown-none-elf riscv32imac-unknown-none-elf riscv32imafc-unknown-none-elf
error: invalid value 'riscv32imac-unknown-none-elf' for '[TOOLCHAIN]...': invalid toolchain name: 'riscv32imac-unknown-none-elf'

For more information, try '--help'.

Outdated:

Since espup directly ignore the stderr, the error information is lost. The method (-l debug) you mentioned not working in #458 .

espup/src/toolchain/rust.rs

Lines 379 to 380 in 8d0109e

.stdout(Stdio::null())
.stderr(Stdio::null())

To allow you to successfully reproduce, I think using GitHub codespace is a good solution,

To Reproduce

Steps to reproduce the behavior:

  1. Setup Github Codespace by blank template.

Image

  1. Run this command (restart bash and redo the command again if cargo not found):
sudo apt-get update && sudo apt-get install -y clang libudev-dev git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && cargo install cargo-generate && cargo install ldproxy && cargo install espup && cargo install espflash && espup install --targets=esp32c3

Expected behavior

Install RISC-V Rust target successful.

Screenshots

Image

Environment

  • OS: Github codespace (Ubuntu 20 for blank template)
  • espup version: latest

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions