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

Reproduction #458 RISC-V install fail #480

Closed
Sieluna opened this issue Mar 3, 2025 · 4 comments · Fixed by #481
Closed

Reproduction #458 RISC-V install fail #480

Sieluna opened this issue Mar 3, 2025 · 4 comments · Fixed by #481
Labels
bug Something isn't working

Comments

@Sieluna
Copy link
Contributor

Sieluna commented Mar 3, 2025

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

@Sieluna Sieluna added the bug Something isn't working label Mar 3, 2025
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Mar 3, 2025
@AnthonyGrondin
Copy link

I'm having the same issue. v0.10.0 used to work, upgraded to any version above, it would fail with the above error, rolling back to v0.10.0 it would work, but now it also fails on this version, so I wonder if this could be a rate limiting issue from Github.

@Sieluna
Copy link
Contributor Author

Sieluna commented Mar 4, 2025

@SergioGasquez

Could you please prioritize releasing this patch? I believe it addresses a critical bug that is causing numerous downstream infrastructure to malfunction, such as the complete failure of RISC-V target in esp-idf-template.

Before

Image

Fixed #481

Image

SergioGasquez pushed a commit that referenced this issue Mar 4, 2025
* Try fix install failure

* Update changelog

* Let fmt happy
@SergioGasquez SergioGasquez linked a pull request Mar 4, 2025 that will close this issue
@SergioGasquez
Copy link
Member

but now it also fails on this version, so I wonder if this could be a rate limiting issue from Github.

Update to main with: cargo install espup --git https://github.com/esp-rs/espup (Ill do a release today or tomorrow, if you wait you can just cargo install espup). Its installing a rustup target, so it doesnt have to do with Github rate limit

Closed by #481

@SergioGasquez
Copy link
Member

[email protected] was just released! Use cargo install espup to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants