plain sample project build fails with compiler / linker error like /Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:29:6: error: 'struct _reent' has no member named '__sdidinit'
Would you like to work on a fix? n
To Reproduce
Steps to reproduce the behavior:
be using m1 mac
fresh install esp-idf v5.1
cargo generate esp-rs/esp-idf-template cargo, esp32, no advanced template
CRATE_CC_NO_DEFAULTS=1 cargo build
Expected behavior
successful build
Environment
OS: MacOS Monterey 12.6.8
espup v0.11.0
xtensa-esp-elf-gcc version 13.2.0
cargo 1.75.0
Error
[1/543] Building C object esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj
FAILED: esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj
/Users/andrewklitzke/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.1.3-204-ge3e112e612\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/Users/andrewklitzke/esp/is-cat-fed/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-75975dbced1903a2/out/build/config -I/Users/andrewklitzke/esp/esp-idf/components/newlib/platform_include -I/Users/andrewklitzke/esp/esp-idf/components/newlib/priv_include -I/Users/andrewklitzke/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/Users/andrewklitzke/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/Users/andrewklitzke/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/Users/andrewklitzke/esp/esp-idf/components/freertos/esp_additions/include -I/Users/andrewklitzke/esp/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_hw_support/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_hw_support/include/soc -I/Users/andrewklitzke/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/Users/andrewklitzke/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/Users/andrewklitzke/esp/esp-idf/components/heap/include -I/Users/andrewklitzke/esp/esp-idf/components/log/include -I/Users/andrewklitzke/esp/esp-idf/components/soc/include -I/Users/andrewklitzke/esp/esp-idf/components/soc/esp32 -I/Users/andrewklitzke/esp/esp-idf/components/soc/esp32/include -I/Users/andrewklitzke/esp/esp-idf/components/hal/esp32/include -I/Users/andrewklitzke/esp/esp-idf/components/hal/include -I/Users/andrewklitzke/esp/esp-idf/components/hal/platform_port/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_rom/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_rom/include/esp32 -I/Users/andrewklitzke/esp/esp-idf/components/esp_rom/esp32 -I/Users/andrewklitzke/esp/esp-idf/components/esp_common/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_system/include -I/Users/andrewklitzke/esp/esp-idf/components/esp_system/port/soc -I/Users/andrewklitzke/esp/esp-idf/components/esp_system/port/include/private -I/Users/andrewklitzke/esp/esp-idf/components/xtensa/include -I/Users/andrewklitzke/esp/esp-idf/components/xtensa/esp32/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/include/apps -I/Users/andrewklitzke/esp/esp-idf/components/lwip/include/apps/sntp -I/Users/andrewklitzke/esp/esp-idf/components/lwip/lwip/src/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/port/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/port/freertos/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/port/esp32xx/include -I/Users/andrewklitzke/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/Users/andrewklitzke/esp/esp-idf/components/spi_flash/include -mlongcalls -Wno-frame-address -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Os -freorder-blocks -fmacro-prefix-map=/Users/andrewklitzke/esp/is-cat-fed/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-75975dbced1903a2/out=. -fmacro-prefix-map=/Users/andrewklitzke/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj -MF esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj.d -o esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj -c /Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c: In function 'esp_reent_init':
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:29:6: error: 'struct _reent' has no member named '__sdidinit'
29 | r->__sdidinit = 1;
| ^~
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:30:6: error: 'struct _reent' has no member named '__sglue'
30 | r->__sglue._next = NULL;
| ^~
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:31:6: error: 'struct _reent' has no member named '__sglue'
31 | r->__sglue._niobs = 0;
| ^~
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:32:6: error: 'struct _reent' has no member named '__sglue'
32 | r->__sglue._iobs = NULL;
| ^~
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c: In function 'esp_reent_cleanup':
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:60:40: error: 'struct _reent' has no member named '__sglue'
60 | struct _glue* prev = &_GLOBAL_REENT->__sglue;
| ^~
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:61:43: error: 'struct _reent' has no member named '__sglue'
61 | for (struct _glue* cur = _GLOBAL_REENT->__sglue._next; cur != NULL;) {
| ^~
Bug description
plain sample project build fails with compiler / linker error like
/Users/andrewklitzke/esp/esp-idf/components/newlib/reent_init.c:29:6: error: 'struct _reent' has no member named '__sdidinit'
To Reproduce
Steps to reproduce the behavior:
cargo generate esp-rs/esp-idf-template cargo
, esp32, no advanced templateCRATE_CC_NO_DEFAULTS=1 cargo build
Expected behavior
successful build
Environment
Error
Additional Context
CAN build idf's non-rust 'hello world' template
env: