-
Notifications
You must be signed in to change notification settings - Fork 52
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
[MacOS - likely recent CC regression] Can't build new project #174
Comments
I realized |
Hi! Let me know how it goes after updating installation with recent |
Hi, thank you for your comment, still failing even if updating espup to
I noticed export-esp.sh now indicates My export-esp.sh is as below. export PATH="/Users/yoshiakiyamada/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:$PATH"
export LIBCLANG_PATH="/Users/yoshiakiyamada/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib" Let me know if you need more information. |
Same problem with ESP32C3 [build]
target = "riscv32imc-esp-espidf"
[target.riscv32imc-esp-espidf]
linker = "ldproxy"
# runner = "espflash --monitor" # Select this runner for espflash v1.x.x
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
[unstable]
build-std = ["std", "panic_abort"]
[env]
MCU="esp32c3"
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "v5.1.1"
My Cmake version is I created other projects before for the same target and didn't get this error. Any ideas what could be going on? |
I'll use M5Stack Gray. target in |
The gcc version used to build esp-idf is closely tied to the esp-idf release itself. When esp-idf is installed in .embuild it will come with its own gcc version. The version that is used is essentially the one declared in the respective tools.json file. So for std development you can pass the --std flag to |
@ysak-y @LarryMerino could you test it out with Also are you both using MacOS ? |
Yes, I'm using MacOs @Vollbrecht
|
It seams that the new released version of the cc crate version 1.0.84 brakes MacOS. The following PR maybe introduced the behavior rust-lang/cc-rs#709 |
I'm using macOS and it works too. Thanks @Vollbrecht !! |
|
Argh, I'm sorry. I've missed a bunch of notifications and earlier comments on the bug. It seems @Vollbrecht has suggested a solution. |
Still - let's keep this issue open. Ideally, we should not be asking users to use |
Can you rename the issue to make it clear that it is scoped to MacOS user? |
cc version 1.0.84 was yanked - so if you get back to version 1.0.83 you should not need to compile with |
This helped me as well. ~/git/esp/humidity master ?8 ❯ CRATE_CC_NO_DEFAULTS=1 cargo build 19:04:31
Compiling esp-idf-sys v0.34.1
Compiling esp-idf-hal v0.43.1
Compiling esp-idf-svc v0.48.1
Compiling humidity v0.1.0 (/Users/xxxxx/git/esp/humidity)
error[E0063]: missing field `hys_ctrl_mode` in initializer of `esp_idf_sys::gpio_config_t`
--> /Users/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.43.1/src/gpio.rs:1442:15
|
1442 | let cfg = gpio_config_t {
| ^^^^^^^^^^^^^ missing `hys_ctrl_mode`
For more information about this error, try `rustc --explain E0063`.
error: could not compile `esp-idf-hal` (lib) due to 1 previous error in my case i also had to monkey patch this file by adding |
This is a different issue, its now merged but not yet released, see esp-rs/esp-idf-hal#387 |
UPDATE:: Use the following command line to build on MacOSX:
================
Bug description
Build fail when build new project from
esp-idf-template
.To Reproduce
Steps to reproduce the behavior:
cargo generate esp-rs/esp-idf-template cargo
and generate project without advanced configurationscargo build
on project directoryExpected behavior
Build success.
Screenshots
Below is full build log.
xtensa-esp32-elf-gcc: error: unrecognized command-line option '--target=xtensa-esp32-espidf'
is the actual reason of error. I'm not sure whether it should be reported on this repository, please let me know if there is proper place to report.I did prerequisites already and I can build the project until sometime yesterday.
Environment
The text was updated successfully, but these errors were encountered: