Skip to content
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

fatal error: bits/error_constants.h: No such file or directory (VSC-1344) #1182

Open
1 task done
mukymuk opened this issue Apr 18, 2024 · 3 comments
Open
1 task done
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@mukymuk
Copy link

mukymuk commented Apr 18, 2024

OS

Windows

Operating System version

Windows 11

Visual Studio Code version

1.88.1

ESP-IDF version

5.2.1

Python version

3.11.2

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.22631
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\MATLAB\R2024a\bin;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Local\Programs\Microsoft VS Code\bin
System environment variable PYTHON
undefined
Visual Studio Code version 1.88.1
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.7.1
Workspace folder c:\project\bh\asv\fw\asv\tcp
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\project\tools\esp\v5.2.1\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${env:HOMEKIT_PATH}
Custom extra paths (idf.customExtraPaths) C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin;C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin;C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin;C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin;C:\project\tools\esp\esp_tools\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:\project\tools\esp\esp_tools\tools\cmake\3.24.0\bin;C:\project\tools\esp\esp_tools\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin;C:\project\tools\esp\esp_tools\tools\ninja\1.11.1;C:\project\tools\esp\esp_tools\tools\idf-exe\1.0.3;C:\project\tools\esp\esp_tools\tools\ccache\4.8\ccache-4.8-windows-x86_64;C:\project\tools\esp\esp_tools\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\project\tools\esp\esp_tools\tools\esp-rom-elfs\20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: C:\project\tools\esp\esp_tools\tools\openocd-esp32\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:\project\tools\esp\esp_tools\tools\esp-rom-elfs\20230320/
Virtual env Python Path (idf.pythonBinPath) C:\project\tools\esp\esp_tools\python_env\idf5.2_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM5
OpenOCD Configs (idf.openOcdConfigs) board/esp32c2-ftdi.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\project\tools\esp\esp_tools
Git Path (idf.gitPath) C:\project\tools\esp\esp_tools\tools\idf-git\2.39.2\cmd\git.exe
Notification Mode (idf.notificationMode) All
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-HomeKit Path (idf.espHomeKitSdkPath) false
Access to ESP-IDF Custom extra paths
Access to C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin: true
Access to C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin: true
Access to C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin: true
Access to C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin: true
Access to C:\project\tools\esp\esp_tools\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to C:\project\tools\esp\esp_tools\tools\cmake\3.24.0\bin: true
Access to C:\project\tools\esp\esp_tools\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: true
Access to C:\project\tools\esp\esp_tools\tools\ninja\1.11.1: true
Access to C:\project\tools\esp\esp_tools\tools\idf-exe\1.0.3: true
Access to C:\project\tools\esp\esp_tools\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to C:\project\tools\esp\esp_tools\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:\project\tools\esp\esp_tools\tools\esp-rom-elfs\20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path true
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\cmake\3.24.0\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: false
Spaces in C:\project\tools\esp\esp_tools\tools\ninja\1.11.1: false
Spaces in C:\project\tools\esp\esp_tools\tools\idf-exe\1.0.3: false
Spaces in C:\project\tools\esp\esp_tools\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in C:\project\tools\esp\esp_tools\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:\project\tools\esp\esp_tools\tools\esp-rom-elfs\20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.39.2.windows.1
ESP-IDF version 5.2.1
Python version 3.11.2
Python's pip version 24.0
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.1.4
CacheControl version: 0.14.0
certifi version: 2024.2.2
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.70
contextlib2 version: 21.6.0
cryptography version: 41.0.7
ecdsa version: 0.19.0
esp-coredump version: 1.10.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.4.2
esp-idf-monitor version: 1.4.0
esp-idf-panic-decoder version: 1.0.1
esp-idf-size version: 1.2.0
esptool version: 4.7.0
filelock version: 3.13.4
freertos-gdb version: 1.0.3
idf-component-manager version: 1.5.2
idna version: 3.7
intelhex version: 2.3.0
kconfiglib version: 14.1.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
msgpack version: 1.0.8
packaging version: 24.0
pip version: 24.0
pyclang version: 0.4.2
pycparser version: 2.22
pyelftools version: 0.31
pygdbmi version: 0.9.0.2
Pygments version: 2.17.2
pyparsing version: 3.1.2
pyserial version: 3.5
pywin32 version: 306
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.1
schema version: 0.7.5
setuptools version: 69.5.0
six version: 1.16.0
tqdm version: 4.66.2
urllib3 version: 1.26.18
windows-curses version: 2.3.2
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/
",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/
",
"${workspaceFolder}/"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/
",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}


Extension

esp_idf_vsc_ext.log

Description

fresh install on a new pc. attempting to build example project.

Debug Message

*  Executing task: ninja  

[1/469] Building CXX object esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_types.cpp.obj
FAILED: esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_types.cpp.obj 
C:\Users\mukym\project\tools\esp\esp_tools\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -DESP_PLATFORM -DIDF_VER=\"v5.2.1\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -IC:/Users/mukym/project/bh/asv/fw/asv/tcp/build/config -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/spi_flash/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/private_include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/newlib/platform_include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/config/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/config/include/freertos -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/config/riscv/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/freertos/esp_additions/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_hw_support/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_hw_support/include/soc -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_hw_support/include/soc/esp32c2 -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/heap/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/log/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/soc/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/soc/esp32c2 -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/soc/esp32c2/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/hal/platform_port/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/hal/esp32c2/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/hal/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_rom/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_rom/include/esp32c2 -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_rom/esp32c2 -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_common/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_system/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_system/port/soc -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_system/port/include/riscv -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_system/port/include/private -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/riscv/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/include/apps -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/include/apps/sntp -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/lwip/src/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/port/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/port/freertos/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/port/esp32xx/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/lwip/port/esp32xx/include/sys -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/esp_partition/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/port/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/mbedtls/library -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/esp_crt_bundle/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -IC:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -march=rv32imc_zicsr_zifencei  -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 -nostartfiles -Og -fno-shrink-wrap -fmacro-prefix-map=C:/Users/mukym/project/bh/asv/fw/asv/tcp=. -fmacro-prefix-map=C:/Users/mukym/project/tools/esp/v5.2.1/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu++2b -fno-exceptions -fno-rtti -MD -MT esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_types.cpp.obj -MF esp-idf\nvs_flash\CMakeFiles\__idf_nvs_flash.dir\src\nvs_types.cpp.obj.d -o esp-idf/nvs_flash/CMakeFiles/__idf_nvs_flash.dir/src/nvs_types.cpp.obj -c C:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/src/nvs_types.cpp
In file included from C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/bits/ios_base.h:46,
                 from C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/ios:44,
                 from C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/ostream:40,
                 from C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/bits/unique_ptr.h:42,
                 from C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/memory:78,
                 from C:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/include/nvs_handle.hpp:5,
                 from C:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/src/nvs_types.hpp:14,
                 from C:/Users/mukym/project/tools/esp/v5.2.1/esp-idf/components/nvs_flash/src/nvs_types.cpp:14:
C:/Users/mukym/project/tools/esp/esp_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/system_error:41:10: fatal error: bits/error_constants.h: No such file or directory
   41 | #include <bits/error_constants.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@mukymuk mukymuk added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Apr 18, 2024
@github-actions github-actions bot changed the title fatal error: bits/error_constants.h: No such file or directory fatal error: bits/error_constants.h: No such file or directory (VSC-1344) Apr 18, 2024
@brianignacio5
Copy link
Collaborator

I don't think this is the right repository for this issue. As long as the extension is configured properly the issue might lie in a different part of the project. Make sure that the ESP-IDF example does match the current ESP-IDF (some examples work with older esp-idf versions and other with newer)

@mukymuk
Copy link
Author

mukymuk commented Apr 22, 2024

Well, I'm not going try to guess about the right place to report the problem. I'll leave that to you if you're so inclined. I installed the extension and configured it using the express option. It downloaded the ESP-IDF and tools from somewhere and then I tried to build one of the simple examples. My reasonable expectation is that it should just work and that Espressif would be most interested in ensuring that it does work.

@brianignacio5
Copy link
Collaborator

The issue could be related to Windows long path issue,

Could you please try a shorter path for IDF_PATH and IDF_TOOLS_PATH ?

Something like "idf.espIdfPathWin": "C:\esp\esp-idf" and "idf.toolsPathWin": "C:\espressif"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
Development

No branches or pull requests

2 participants