我使用的是windows11,esp-idf-4.4版本的离线安装版,使用hello_world例程执行idf.py build 时报错,报错部分如下,说是sched_yield的问题不知到怎么解决,重新安装或者安装不同版本也是同样的错误,求各位大佬解答!!
这是部分日志,类似的错误重复了很多次。附件是完整日志。
[180/919] Building CXX object esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_partition.cpp.obj
FAILED: esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_partition.cpp.obj
ccache D:\programFile\esp\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -I../../../../components/nvs_flash/include -I../../../../components/newlib/platform_include -I../../../../components/freertos/include -I../../../../components/freertos/include/esp_additions/freertos -I../../../../components/freertos/port/xtensa/include -I../../../../components/freertos/include/esp_additions -I../../../../components/esp_hw_support/include -I../../../../components/esp_hw_support/include/soc -I../../../../components/esp_hw_support/include/soc/esp32 -I../../../../components/esp_hw_support/port/esp32/. -I../../../../components/heap/include -I../../../../components/log/include -I../../../../components/lwip/include/apps -I../../../../components/lwip/include/apps/sntp -I../../../../components/lwip/lwip/src/include -I../../../../components/lwip/port/esp32/include -I../../../../components/lwip/port/esp32/include/arch -I../../../../components/soc/include -I../../../../components/soc/esp32/. -I../../../../components/soc/esp32/include -I../../../../components/hal/esp32/include -I../../../../components/hal/include -I../../../../components/hal/platform_port/include -I../../../../components/esp_rom/include -I../../../../components/esp_rom/include/esp32 -I../../../../components/esp_rom/esp32 -I../../../../components/esp_common/include -I../../../../components/esp_system/include -I../../../../components/esp_system/port/soc -I../../../../components/esp_system/port/public_compat -I../../../../components/esp32/include -I../../../../components/xtensa/include -I../../../../components/xtensa/esp32/include -I../../../../components/driver/include -I../../../../components/driver/esp32/include -I../../../../components/esp_pm/include -I../../../../components/esp_ringbuf/include -I../../../../components/efuse/include -I../../../../components/efuse/esp32/include -I../../../../components/vfs/include -I../../../../components/esp_wifi/include -I../../../../components/esp_event/include -I../../../../components/esp_netif/include -I../../../../components/esp_eth/include -I../../../../components/tcpip_adapter/include -I../../../../components/esp_phy/include -I../../../../components/esp_phy/esp32/include -I../../../../components/esp_ipc/include -I../../../../components/app_trace/include -I../../../../components/esp_timer/include -I../../../../components/spi_flash/include -I../../../../components/mbedtls/port/include -I../../../../components/mbedtls/mbedtls/include -I../../../../components/mbedtls/esp_crt_bundle/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4/examples/get-started/hello_world=. -fmacro-prefix-map=D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -DIDF_VER=\"v4.4\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_partition.cpp.obj -MF esp-idf\nvs_flash\CMakeFiles\__idf_nvs_flash.dir\src\nvs_partition.cpp.obj.d -o esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_partition.cpp.obj -c D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4/components/nvs_flash/src/nvs_partition.cpp
In file included from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr.h:151,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\ext\atomicity.h:35,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\bits\basic_string.h:39,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\string:52,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\stdexcept:39,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\array:39,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\tuple:39,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\bits\hashtable_policy.h:34,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\bits\hashtable.h:35,
from d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\unordered_map:46,
from D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4/components/nvs_flash/src/intrusive_list.h:18,
from D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4/components/nvs_flash/src/nvs_partition.hpp:19,
from D:/programFile/esp/Espressif/frameworks/esp-idf-v4.4/components/nvs_flash/src/nvs_partition.cpp:16:
d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr-default.h: In function 'int __gthread_yield()':
d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr-default.h:705:10: error: 'sched_yield' was not declared in this scope
return __gthrw_(sched_yield) ();
^~~~~~~~
d:\programfile\esp\espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr-default.h:705:10: note: suggested alternative: 'pthread_yield'
esp-idf安装后编译报错
esp-idf安装后编译报错
- Attachments
-
- 编译报错.txt
- (150.88 KiB) Downloaded 308 times
Re: esp-idf安装后编译报错
他就说这东西,没有声明,既然是return 必定函数里,找找是不是 该变量的确没有声明。
Re: esp-idf安装后编译报错
找到原因了,是因为之前在系统中设置了环境变量 C_INCLUDE_PATH,删掉好了,感谢各位的建议。
Who is online
Users browsing this forum: No registered users and 32 guests