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>,
但是这个文件就在这个目录下
编译器bug,找不到bits/c++config.h
Re: 编译器bug,找不到bits/c++config.h
可以包括你编译时候的完整build-log吗?
你build的时候有遇到任何CMake warning 吗?
我在idf-v4.2-beta1上编译hello-world没有问题。
你build的时候有遇到任何CMake warning 吗?
我在idf-v4.2-beta1上编译hello-world没有问题。
Re: 编译器bug,找不到bits/c++config.h
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吗?
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吗?
- Attachments
-
- CMakeOutput.log
- (79.79 KiB) Downloaded 609 times
Re: 编译器bug,找不到bits/c++config.h
hi xiagbsj,
感谢反馈。您方便试下 `idf.py fullclean` 么? 我们不需要 CMakeOutput.log,而需要 console 的全部 logging output 来进行 debug,即在运行 `idf.py clean` 后 `idf.py build` 打印的 log。谢谢。
另外,能帮确认下工具链已成功安装么?IDF 中下载安装工具链的脚本。谢谢。
Alvin
感谢反馈。您方便试下 `idf.py fullclean` 么? 我们不需要 CMakeOutput.log,而需要 console 的全部 logging output 来进行 debug,即在运行 `idf.py clean` 后 `idf.py build` 打印的 log。谢谢。
另外,能帮确认下工具链已成功安装么?IDF 中下载安装工具链的脚本。谢谢。
Alvin
Re: 编译器bug,找不到bits/c++config.h
我直接把build文件夹删掉了,所以没用fullclean
- Attachments
-
- installbat log.txt
- (10.83 KiB) Downloaded 595 times
-
- build consol.txt
- (40.75 KiB) Downloaded 565 times
Re: 编译器bug,找不到bits/c++config.h
您能clean ccache吗?
Jakob
Code: Select all
ccache -c
-
- Posts: 21
- Joined: Fri Nov 06, 2020 8:23 am
- Location: Brno
- Contact:
Re: 编译器bug,找不到bits/c++config.h
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:
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/
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/
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems
Senior Embedded Software Engineer at Espressif Systems
-
- Posts: 21
- Joined: Fri Nov 06, 2020 8:23 am
- Location: Brno
- Contact:
Re: 编译器bug,找不到bits/c++config.h
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
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
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems
Senior Embedded Software Engineer at Espressif Systems
Who is online
Users browsing this forum: No registered users and 77 guests