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: mbedtls/mbedtls_config.h: No such file or directory for esp32/esp32c3 in IDF-4.4 #2726

Closed
pljakobs opened this issue Mar 8, 2024 · 5 comments

Comments

@pljakobs
Copy link
Contributor

pljakobs commented Mar 8, 2024

In file included from /opt/esp-idf-4.4/components/mbedtls/mbedtls/library/common.h:27,
                 from /opt/esp-idf-4.4/components/mbedtls/mbedtls/library/aes.c:26:
/opt/esp-idf-4.4/components/mbedtls/port/include/mbedtls/esp_config.h:29:10: fatal error: mbedtls/mbedtls_config.h: No such file or directory

as far as I saw from a similiar issue on the IDF github repo, this should not happen with the build parameters supplied:

[67/855] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj
FAILED: esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj 
/opt/esp-idf/tools/tools/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -I/opt/sming/Sming/out/Esp32/esp32/debug/build/esp32/sdk/config -I/opt/esp-idf-4.4/components/mbedtls/port/include -I/opt/esp-idf-4.4/components/mbedtls/mbedtls/include -I/opt/esp-idf-4.4/components/mbedtls/mbedtls/library -I/opt/esp-idf-4.4/components/newlib/platform_include -I/opt/esp-idf-4.4/components/freertos/FreeRTOS-Kernel/include -I/opt/esp-idf-4.4/components/freertos/esp_additions/include/freertos -I/opt/esp-idf-4.4/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/opt/esp-idf-4.4/components/freertos/esp_additions/include -I/opt/esp-idf-4.4/components/esp_hw_support/include -I/opt/esp-idf-4.4/components/esp_hw_support/include/soc -I/opt/esp-idf-4.4/components/esp_hw_support/include/soc/esp32 -I/opt/esp-idf-4.4/components/esp_hw_support/port/esp32/. -I/opt/esp-idf-4.4/components/esp_hw_support/port/esp32/private_include -I/opt/esp-idf-4.4/components/heap/include -I/opt/esp-idf-4.4/components/log/include -I/opt/esp-idf-4.4/components/soc/include -I/opt/esp-idf-4.4/components/soc/esp32/. -I/opt/esp-idf-4.4/components/soc/esp32/include -I/opt/esp-idf-4.4/components/hal/esp32/include -I/opt/esp-idf-4.4/components/hal/include -I/opt/esp-idf-4.4/components/hal/platform_port/include -I/opt/esp-idf-4.4/components/esp_rom/include -I/opt/esp-idf-4.4/components/esp_rom/include/esp32 -I/opt/esp-idf-4.4/components/esp_rom/esp32 -I/opt/esp-idf-4.4/components/esp_common/include -I/opt/esp-idf-4.4/components/esp_system/include -I/opt/esp-idf-4.4/components/esp_system/port/soc -I/opt/esp-idf-4.4/components/esp_system/port/include/private -I/opt/esp-idf-4.4/components/xtensa/include -I/opt/esp-idf-4.4/components/xtensa/esp32/include -I/opt/esp-idf-4.4/components/esp_timer/include -I/opt/esp-idf-4.4/components/lwip/include -I/opt/esp-idf-4.4/components/lwip/include/apps -I/opt/esp-idf-4.4/components/lwip/include/apps/sntp -I/opt/esp-idf-4.4/components/lwip/lwip/src/include -I/opt/esp-idf-4.4/components/lwip/port/esp32/include -I/opt/esp-idf-4.4/components/lwip/port/esp32/include/arch -mlongcalls -Wno-frame-address  -Wall -Wextra -Wwrite-strings -Wformat=2 -Wno-format-nonliteral -Wvla -Wlogical-op -Wshadow -Wformat-signedness -Wformat-overflow=2 -Wformat-truncation -Werror -Wmissing-declarations -Wmissing-prototypes -fdiagnostics-color=always -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 -Wno-enum-conversion -gdwarf-4 -ggdb -Os -freorder-blocks -fmacro-prefix-map=/opt/sming/Sming/Arch/Esp32/Components/esp32/project/esp32/debug=. -fmacro-prefix-map=/opt/esp-idf-4.4=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0-547-g20e8e86c80-dirty\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj -MF esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj.d -o esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj -c /opt/esp-idf-4.4/components/mbedtls/mbedtls/library/aesni.c

-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" should override the default - but clearly, somehow it still looks for the default config file.

@mikee47
Copy link
Contributor

mikee47 commented Mar 8, 2024

Please provide a sample application demonstrating this problem. For example, Basic_Ssl builds without issue using IDF 4.4 and esp32c3.

@pljakobs
Copy link
Contributor Author

pljakobs commented Mar 8, 2024

ok, in that case, let me re-install IDF, as I get the same error. I re-ran the sming/tools/install.sh for esp32 but there might be something wrong that did not fix.

@pljakobs
Copy link
Contributor Author

pljakobs commented Mar 8, 2024

fixed it. I seem to have another issue

/home/pjakobs/devel/esp_rgbww_firmware/Sming/Sming/Arch/Esp32/Components/esp32/src/startup.cpp:33:26: error: 'CONFIG_ESP_TASK_WDT_TIMEOUT_S' was not declared in this scope
  err = esp_task_wdt_init(CONFIG_ESP_TASK_WDT_TIMEOUT_S, true);

but if the Basic_Ssl compiles ok for you, that's probably a local thing, too. (using sming develop)

@mikee47
Copy link
Contributor

mikee47 commented Mar 8, 2024

If switching or updating IDF best to run make sdk-config-clean https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp32/README.html#sdk

@pljakobs
Copy link
Contributor Author

pljakobs commented Mar 8, 2024

I usually do, along with a make dist-clean

@pljakobs pljakobs closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants