Page 1 of 1
编译器bug,找不到bits/c++config.h
Posted: Thu Nov 19, 2020 9:18 am
by xiagbsj
espidf 为 v4.2 beta1,工具链也是用这个idf里的脚本装的
编译helloword,目标为esp32,报
.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\bits\stl_algobase.h:59:10: fatal error: bits/c++config.h: No such file or directory #include <bits/c++config.h>错误,
把...\8.2.0\xtensa-esp32-elf\bits下的所有文件都复制到...\8.2.0\bits下解决了
但这个问题不应该存在,因为编译器有问题会导致编译任何工程一定会报错
然后clean,把目标切换为esp32s2,报同样的错误,只是路径变成了.espressif\tools\xtensa-esp32s2-elf...,但是esp32s2按照上面的方法则不行,还会报其它错误,
报.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\xtensa-esp32s2-elf\include\c++\8.2.0\bits\stl_algobase.h:65:10: fatal error: bits/stl_iterator_base_types.h: No such file or directory #include <bits/stl_iterator_base_types.h>,
但是这个文件就在这个目录下
Re: 编译器bug,找不到bits/c++config.h
Posted: Fri Nov 20, 2020 4:31 am
by ESP_jakob
可以包括你编译时候的完整build-log吗?
你build的时候有遇到任何CMake warning 吗?
我在idf-v4.2-beta1上编译hello-world没有问题。
Re: 编译器bug,找不到bits/c++config.h
Posted: Fri Nov 20, 2020 6:06 am
by xiagbsj
In file included from c:\users\xiagbsj\xiagbsj\other\data\softwareanddata\ordinary\embedded\esp32\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\xtensa-esp32s2-elf\include\c++\8.2.0\memory:62,
from C:/Users/xiagbsj/xiagbsj/other/data/softwareAndData/ordinary/embedded/esp32/idf/components/nvs_flash/src/nvs.hpp:18,
from C:/Users/xiagbsj/xiagbsj/other/data/softwareAndData/ordinary/embedded/esp32/idf/components/nvs_flash/src/nvs_api.cpp:14:
c:\users\xiagbsj\xiagbsj\other\data\softwareanddata\ordinary\embedded\esp32\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\xtensa-esp32s2-elf\include\c++\8.2.0\bits\stl_algobase.h:59:10: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
[318/921] Building C object esp-idf/wpa_supplicant/CMakeFiles/__idf_wpa_supplicant.dir/src/wps/wps_validate.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
编译过程没有警告
build log 指的是 build/CMakefile/CMakeOutput.log吗?
Re: 编译器bug,找不到bits/c++config.h
Posted: Fri Nov 20, 2020 7:47 am
by ESP_Alvin
hi xiagbsj,
感谢反馈。您方便试下 `idf.py fullclean` 么? 我们不需要 CMakeOutput.log,而需要 console 的全部 logging output 来进行 debug,即在运行 `idf.py clean` 后 `idf.py build` 打印的 log。谢谢。
另外,能帮确认下工具链已成功安装么?IDF 中下载安装工具链的脚本。谢谢。
Alvin
Re: 编译器bug,找不到bits/c++config.h
Posted: Fri Nov 20, 2020 8:36 am
by xiagbsj
我直接把build文件夹删掉了,所以没用fullclean
Re: 编译器bug,找不到bits/c++config.h
Posted: Mon Nov 23, 2020 2:13 am
by ESP_jakob
Re: 编译器bug,找不到bits/c++config.h
Posted: Fri Apr 16, 2021 8:51 am
by ESP_georgik
The problem seems to be caused by ccache.
Please run the build without ccache to verify whether it's not the source of the problem:
idf.py fullclean
set IDF_CCACHE_ENABLE=
idf.py build
The other issue might be too long path to .espressif: C:\Users\xiagb\xiagb\other\data\softwareAndData\ordinary\embedded\esp32\.espressif
Please make sure, that your Windows have enabled Long Paths. This can be verified by running Windows Installer. On the second screen of the installer you'll see result of the check and button 'Apply fixes' if the correction is necessary. After this screen you can cancel the installer. You can find Windows installer here:
https://dl.espressif.com/dl/esp-idf/
Re: 编译器bug,找不到bits/c++config.h
Posted: Thu May 06, 2021 4:50 pm
by ESP_georgik
We confirm the issue. ESP-IDF and Tools path should be shorter than 90 characters. Longer paths are causing problems with some versions of CCache and related tools.
The problem is solved by introducing check of path length.
Please, install ESP-IDF and Tools on path that is shorter.
Solved by:
https://github.com/espressif/idf-installer/pull/16
You can test installer:
https://github.com/espressif/idf-instal ... .9-beta-02