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

Instllation of 1.82.0.3 on M1 mac failed #455

Open
georgik opened this issue Nov 1, 2024 · 5 comments
Open

Instllation of 1.82.0.3 on M1 mac failed #455

georgik opened this issue Nov 1, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@georgik
Copy link
Contributor

georgik commented Nov 1, 2024

Command: espup install

Log:

[info]: Installing the Espressif Rust ecosystem
[info]: Checking Rust installation
[info]: Installing Xtensa Rust 1.82.0.3 toolchain
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[info]: Installing GCC (xtensa-esp-elf)
[info]: Installing Xtensa LLVM
[info]: Downloading 'rust.tar.xz'
[info]: Downloading 'xtensa-esp-elf.tar.xz'
[info]: Downloading 'idf_tool_xtensa_elf_clang.libs.tar.xz'
[info]: Creating symlink between '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/georgik/.espup/esp-clang'
[warn]: Installation for 'LLVM' failed, retrying
[warn]: Previous installation of LLVM exists in: '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912'. Reusing this installation
[info]: Creating symlink between '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/georgik/.espup/esp-clang'
[warn]: Installation for 'LLVM' failed, retrying
[warn]: Previous installation of LLVM exists in: '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912'. Reusing this installation
[info]: Creating symlink between '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/georgik/.espup/esp-clang'
[warn]: Installation for 'LLVM' failed, retrying
[warn]: Previous installation of LLVM exists in: '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912'. Reusing this installation
[info]: Creating symlink between '/Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/georgik/.espup/esp-clang'
[warn]: Installation for 'LLVM' failed, retrying
thread 'tokio-runtime-worker' panicked at /Users/georgik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/espup-0.13.0/src/toolchain/mod.rs:244:32:
called `Result::unwrap()` on an `Err` value: SendError { .. }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error:   × File exists (os error 17)

Expected behavior: Display error message with suggestion on remedy, not a RUST_BACKTRACE.

Workaround: rm -rf /Users/georgik/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib /Users/georgik/.espup/esp-clang

After the removel the installation proceeds.

@georgik georgik added the bug Something isn't working label Nov 1, 2024
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Nov 1, 2024
@SergioGasquez
Copy link
Member

Just tried reproducing the issue but had no troubles:

> rustc +esp --version
rustc 1.80.0-nightly (1b259e0b8 2024-07-22) (1.80.0.0)
> espup update
[info]: Updating the Espressif Rust ecosystem
[info]: Checking Rust installation
[warn]: Previous installation of LLVM exists in: '/Users/sergio/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912'. Reusing this installation
[info]: Installing GCC (xtensa-esp-elf)
[warn]: Previous installation of GCC exists in: '/Users/sergio/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906'. Reusing this installation
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[info]: Creating symlink between '/Users/sergio/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/sergio/.espup/esp-clang'
[info]: Uninstalling Xtensa Rust toolchain
[info]: Installing Xtensa Rust 1.82.0.3 toolchain
[info]: Downloading 'rust.tar.xz'
[info]: Installing 'rust' component for Xtensa Rust toolchain
[info]: Downloading 'rust-src.tar.xz'
[info]: Installing 'rust-src' component for Xtensa Rust toolchain
[info]: Update successfully completed!

	To get started, you need to set up some environment variables by running: '. /Users/sergio/export-esp.sh'
	This step must be done every time you open a new terminal.
	    See other methods for setting the environment in https://esp-rs.github.io/book/installation/riscv-and-xtensa.html#3-set-up-the-environment-variables

After sourcing the new export file I was able to build Xtensa Rust projects

@SergioGasquez
Copy link
Member

Were you using latest espup (0.13.0)?

@anjumkaiser
Copy link

anjumkaiser commented Nov 20, 2024

having similar issue on macOS 15, M2

➜ ~ espup --version
espup 0.13.0
➜ ~ espup install
[info]: Installing the Espressif Rust ecosystem
[info]: Checking Rust installation
[info]: Installing Xtensa Rust 1.82.0.3 toolchain
[info]: Installing Xtensa LLVM
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[info]: Installing GCC (xtensa-esp-elf)
[info]: Downloading 'rust.tar.xz'
[info]: Downloading 'idf_tool_xtensa_elf_clang.libs.tar.xz'
[info]: Downloading 'xtensa-esp-elf.tar.xz'
[info]: Creating symlink between '/Users/anjumkaiser/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/anjumkaiser/.espup/esp-clang'
[info]: Installing 'rust' component for Xtensa Rust toolchain
[info]: Downloading 'rust-src.tar.xz'
[warn]: Installation for 'RISC-V Rust target' failed, retrying
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[warn]: Installation for 'RISC-V Rust target' failed, retrying
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[warn]: Installation for 'RISC-V Rust target' failed, retrying
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[warn]: Installation for 'RISC-V Rust target' failed, retrying
Error: espup::toolchain::rust::install_riscv_target

× Failed to Install RISC-V targets for 'nightly' toolchain

@SergioGasquez
Copy link
Member

Installation for 'RISC-V Rust target' failed, retrying

That doesn't look like the same issue. How did you install rust?. If you use espup install --targets=esp32,esp32s2,esp32s3 you should avoid this error. Could you also share the output of running the failing command with verbose log level?

@tronical
Copy link

I'm seeing exactly the same issue (on apple silicon only). Thanks @georgik for the workaround! I think this is some kind of race condition.

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
Status: Todo
Development

No branches or pull requests

4 participants