espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.63k stars 7.28k forks source link

Error: No mbedtls_ms_time available (IDFGH-11632) #12746

Closed Tim4497 closed 9 months ago

Tim4497 commented 10 months ago

Answers checklist.

IDF version.

v5.1.1-577-g6b1f40b9bf

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

Build correctly

What is the actual behavior?

Build failed on C Object [49/1166] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.objFAILED: esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj

Steps to reproduce.

Installing ESP-Matter on main, ESP-IDF on v5.1.1-577-g6b1f40b9bf

Build or installation Logs.

[5/1285] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
esp_secure_cert,63,6,0xd000,8K,encrypted
nvs,data,nvs,0x10000,24K,
nvs_keys,data,nvs_keys,0x16000,4K,encrypted
otadata,data,ota,0x17000,8K,
phy_init,data,phy,0x19000,4K,
ota_0,app,ota_0,0x20000,1920K,
ota_1,app,ota_1,0x200000,1920K,
fctry,data,nvs,0x3e0000,24K,
fs_0,data,spiffs,0x3e6000,104K,
*******************************************************************************
[6/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj
[7/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesce.c.obj
[8/1285] Building C object esp-idf/mbedtls/mbedtls/3rdparty/everest/CMakeFiles/everest.dir/library/x25519.c.obj
[9/1285] Generating args.gn
[10/1285] Building C object esp-idf/mbedtls/mbedtls/3rdparty/everest/CMakeFiles/everest.dir/library/Hacl_Curve25519_joined.c.obj
[11/1285] Building C object esp-idf/mbedtls/mbedtls/3rdparty/everest/CMakeFiles/everest.dir/library/everest.c.obj
[12/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum_mod.c.obj
[13/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum_mod_raw.c.obj
[14/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/camellia.c.obj
[15/1285] Building C object esp-idf/mbedtls/mbedtls/3rdparty/p256-m/CMakeFiles/p256m.dir/p256-m/p256-m.c.obj
[16/1285] Building C object esp-idf/mbedtls/mbedtls/3rdparty/p256-m/CMakeFiles/p256m.dir/p256-m_driver_entrypoints.c.obj
[17/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/chacha20.c.obj
[18/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/chachapoly.c.obj
[19/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/asn1write.c.obj
[20/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/asn1parse.c.obj
[21/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/base64.c.obj
[22/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aes.c.obj
[23/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/des.c.obj
[24/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/constant_time.c.obj
[25/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/dhm.c.obj
[26/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecjpake.c.obj
[27/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aria.c.obj
[28/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/cipher_wrap.c.obj
[29/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecp_curves_new.c.obj
[30/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ccm.c.obj
[31/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecdh.c.obj
[32/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/cmac.c.obj
[33/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ctr_drbg.c.obj
[34/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/entropy_poll.c.obj
[35/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/hkdf.c.obj
[36/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum_core.c.obj
[37/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/gcm.c.obj
[38/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/entropy.c.obj
[39/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/cipher.c.obj
[40/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecdsa.c.obj
[41/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/memory_buffer_alloc.c.obj
[42/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/md5.c.obj
[43/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/nist_kw.c.obj
[44/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/padlock.c.obj
[45/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/hmac_drbg.c.obj
[46/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/lms.c.obj
[47/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/lmots.c.obj
[48/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/error.c.obj
[49/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/md.c.obj
[50/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pem.c.obj
[51/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj
FAILED: esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj 
/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/idf-tools/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.1.1-577-g6b1f40b9bf-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/build/config -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/port/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/library -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/build/esp-idf/mbedtls/mbedtls/library -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/newlib/platform_include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/freertos/esp_additions/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_hw_support/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_hw_support/include/soc -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/heap/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/log/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/soc/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/soc/esp32 -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/soc/esp32/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/hal/esp32/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/hal/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/hal/platform_port/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_rom/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_rom/include/esp32 -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_rom/esp32 -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_common/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_system/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_system/port/soc -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/esp_system/port/include/private -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/xtensa/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/xtensa/esp32/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/include/apps -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/include/apps/sntp -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/lwip/src/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/port/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/port/freertos/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/port/esp32xx/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -I/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -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=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer=. -fmacro-prefix-map=/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -Wno-error=uninitialized -Wno-error=maybe-uninitialized -Wno-missing-field-initializers -Wno-error=array-bounds -Wno-write-strings -Wno-format-nonliteral -Wno-format-security -Wformat=0 -std=gnu17 -Wno-old-style-declaration -Os -MD -MT esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj -MF esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj.d -o esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform_util.c.obj -c /Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/library/platform_util.c
/Users/t.winkler/Documents/REPLY/Schulthess_MATTER/laundry-washer/esp/esp-idf/components/mbedtls/mbedtls/library/platform_util.c:295:2: error: #error "No mbedtls_ms_time available"
  295 | #error "No mbedtls_ms_time available"
      |  ^~~~~
[52/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/platform.c.obj
[53/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/poly1305.c.obj
[54/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum.c.obj
[55/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pk.c.obj
[56/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pkcs12.c.obj
[57/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pkcs5.c.obj
[58/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pk_wrap.c.obj
[59/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/oid.c.obj
[60/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pkwrite.c.obj
[61/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecp_curves.c.obj
[62/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/pkparse.c.obj
[63/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/ecp.c.obj
[64/1285] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/psa_crypto.c.obj
ninja: build stopped: subcommand failed.

More Information.

No response

Tim4497 commented 10 months ago

Only happening after switching IDF Version, not on new project.

mahavirj commented 10 months ago

@Tim4497 You have CONFIG_MBEDTLS_HAVE_TIME set in your sdkconfig? If not, please try enabling it once.

Tim4497 commented 10 months ago

I have it enabled and still same error!

Harshal5 commented 10 months ago

Hello @Tim4497,

This issue would arise if your mbedtls version is not up-to-date or the sdkconfig that you are using has been generated for a different ESP-IDF version. The ESP-IDF version that you are using (v5.1.1-577-g6b1f40b9bf), is not a release tag and looks like some between the above v5.1.1 and v5.1.2.

I think you should first clean building the project (removing the existing sdkconfig and the build folder). I would also suggest you to try using a newer release of ESP-IDF, v5.1.2 which contains the updated version (v3.5.0) of mbedtls (https://github.com/espressif/esp-idf/commit/9ca8f3d45bbeca2983ede0cb2e1c95548517d4a5) once and let me know does this solves your issue?

Thanks!

mahavirj commented 9 months ago

Closing due to lack of response, feel free to reopen if you are still facing the problem