esp-rs / espup

Tool for installing and maintaining Espressif Rust ecosystem.
Apache License 2.0
224 stars 23 forks source link

cargo install espup doesn't work on M1 #409

Closed chuckberrypi closed 9 months ago

chuckberrypi commented 9 months ago

Bug description

Running cargo install espup resulted in espup error: linking with 'cc' failed: exit status: 1, followed by a long dump of gobbledygook, ending with "-llzma" "-framework" "SystemConfiguration" "-framework" "Security" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-L" "~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/jc/vqhjf43j7gx42h9lj2ngxmzw0000gn/T/cargo-installbTBcBe/release/deps/espup-f117ec602e38a3be" "-Wl,-dead_strip" "-nodefaultlibs" = note: ld: warning: ignoring file '/opt/homebrew/Cellar/xz/5.4.5/lib/liblzma.5.dylib': found architecture 'arm64', required architecture 'x86_64'

To Reproduce

Steps to reproduce the behavior:

  1. Macbook Air with M1 Apple Silicon
  2. open terminal, type cargo install espup

Expected behavior

espup to be installed in ~/.cargo/bin

Environment

Additional context

chuckberrypi commented 9 months ago

NVM, chatgpt helped me figure out the problem was that at some point when I was setting up rust for developing on the esp board, I had changed the default target for rust, which was causing problems.