espressif / esp-idf

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

Compilation fails with OpenThread "Enable Joiner" config enabled (IDFGH-11177) #12345

Closed baylf2000 closed 11 months ago

baylf2000 commented 1 year ago

Answers checklist.

IDF version.

v5.1.1-439-gcb174b0fe1

Operating System used.

Linux - Ubuntu

How did you build your project?

Command line within VSCode with idf.py build

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

None

What is the expected behavior?

Expect successful compilation with this option enabled.

What is the actual behavior?

Compilation of "Light-Switch" example from esp-matter fails with the errors below involving various mbedtls_ssl components.

Steps to reproduce.

With esp32c6 selected as the device:

  1. Create a new project from the "Light-Switch" example from esp-matter.
  2. Run idf.py menuconfig and go to Component Config - OpenThread and select Enable Joiner.
  3. Run idf.y build

Build or installation Logs.

lf@lf-virtual-machine:~/Documents/esp_projects/light_switch$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/lf/Documents/esp_projects/light_switch/build
Executing "ninja all"...
[0/1] Re-running CMake...-- Component directory /home/lf/esp/esp-matter/examples/common/blemesh_platform does not contain a CMakeLists.txt file. No component will be added
-- Component directory /home/lf/esp/esp-matter/examples/common/external_platform does not contain a CMakeLists.txt file. No component will be added
-- Component directory /home/lf/esp/esp-matter/examples/common/relinker does not contain a CMakeLists.txt file. No component will be added
-- ccache will be used for faster recompilation
-- Building ESP-IDF components for target esp32c6
Skipping optional dependency: espressif/cmake_utilities
Processing 13 dependencies:
[13/13] idf (5.1.1)-- Found Python3: /home/lf/esp/esp-tools/python_env/idf5.1_py3.11_env/bin/python3 (found version "3.11.4") found components: Interpreter 
Skipping optional dependency: espressif/cmake_utilities
-- Project sdkconfig file /home/lf/Documents/esp_projects/light_switch/sdkconfig
warning: default on the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/lf/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:795, /home/lf/esp/esp-matter/components/esp_matter/Kconfig:41) will have no effect, as defaults do not affect choice symbols
warning: the choice symbol SEC_CERT_DAC_PROVIDER (defined at /home/lf/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:795, /home/lf/esp/esp-matter/components/esp_matter/Kconfig:41) is defined with a prompt outside the choice
Loading defaults file /home/lf/Documents/esp_projects/light_switch/sdkconfig.defaults...
Loading defaults file /home/lf/Documents/esp_projects/light_switch/sdkconfig.defaults.esp32c6...
/home/lf/Documents/esp_projects/light_switch/sdkconfig.defaults.esp32c6:10 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE was replaced with CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE
-- App "light_switch" version: 1.0
-- Adding linker script /home/lf/Documents/esp_projects/light_switch/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_system/ld/esp32c6/sections.ld.in
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib-normal.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.heap.ld
-- Adding linker script /home/lf/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
ESP Insights Project commit: HEAD-HASH-NOTFOUND
-- Components: app_bridge app_reset app_trace app_update bootloader bootloader_support bt chip cmock console cxx device driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_matter esp_matter_bridge esp_matter_console esp_matter_controller esp_matter_rainmaker esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__button espressif__cbor espressif__esp_diag_data_store espressif__esp_diagnostics espressif__esp_encrypted_img espressif__esp_insights espressif__esp_secure_cert_mgr espressif__json_generator espressif__json_parser espressif__led_strip espressif__mdns espressif__rmaker_common esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 iot_button json led_driver log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table protobuf-c protocomm pthread riscv sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant
-- Component paths: /home/lf/esp/esp-matter/examples/common/app_bridge /home/lf/esp/esp-matter/examples/common/app_reset /home/lf/esp/esp-idf/components/app_trace /home/lf/esp/esp-idf/components/app_update /home/lf/esp/esp-idf/components/bootloader /home/lf/esp/esp-idf/components/bootloader_support /home/lf/esp/esp-idf/components/bt /home/lf/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip /home/lf/esp/esp-idf/components/cmock /home/lf/esp/esp-idf/components/console /home/lf/esp/esp-idf/components/cxx /home/lf/esp/esp-matter/device_hal/device /home/lf/esp/esp-idf/components/driver /home/lf/esp/esp-idf/components/efuse /home/lf/esp/esp-idf/components/esp-tls /home/lf/esp/esp-idf/components/esp_adc /home/lf/esp/esp-idf/components/esp_app_format /home/lf/esp/esp-idf/components/esp_coex /home/lf/esp/esp-idf/components/esp_common /home/lf/esp/esp-idf/components/esp_eth /home/lf/esp/esp-idf/components/esp_event /home/lf/esp/esp-idf/components/esp_gdbstub /home/lf/esp/esp-idf/components/esp_hid /home/lf/esp/esp-idf/components/esp_http_client /home/lf/esp/esp-idf/components/esp_http_server /home/lf/esp/esp-idf/components/esp_https_ota /home/lf/esp/esp-idf/components/esp_https_server /home/lf/esp/esp-idf/components/esp_hw_support /home/lf/esp/esp-idf/components/esp_lcd /home/lf/esp/esp-idf/components/esp_local_ctrl /home/lf/esp/esp-matter/components/esp_matter /home/lf/esp/esp-matter/components/esp_matter_bridge /home/lf/esp/esp-matter/components/esp_matter_console /home/lf/esp/esp-matter/components/esp_matter_controller /home/lf/esp/esp-matter/components/esp_matter_rainmaker /home/lf/esp/esp-idf/components/esp_mm /home/lf/esp/esp-idf/components/esp_netif /home/lf/esp/esp-idf/components/esp_netif_stack /home/lf/esp/esp-idf/components/esp_partition /home/lf/esp/esp-idf/components/esp_phy /home/lf/esp/esp-idf/components/esp_pm /home/lf/esp/esp-idf/components/esp_psram /home/lf/esp/esp-idf/components/esp_ringbuf /home/lf/esp/esp-idf/components/esp_rom /home/lf/esp/esp-idf/components/esp_system /home/lf/esp/esp-idf/components/esp_timer /home/lf/esp/esp-idf/components/esp_wifi /home/lf/esp/esp-idf/components/espcoredump /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__button /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__cbor /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__esp_diag_data_store /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__esp_diagnostics /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__esp_encrypted_img /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__esp_insights /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__esp_secure_cert_mgr /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__json_generator /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__json_parser /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__led_strip /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__mdns /home/lf/Documents/esp_projects/light_switch/managed_components/espressif__rmaker_common /home/lf/esp/esp-idf/components/esptool_py /home/lf/esp/esp-idf/components/fatfs /home/lf/esp/esp-idf/components/freertos /home/lf/esp/esp-idf/components/hal /home/lf/esp/esp-idf/components/heap /home/lf/esp/esp-idf/components/http_parser /home/lf/esp/esp-idf/components/idf_test /home/lf/esp/esp-idf/components/ieee802154 /home/lf/esp/esp-matter/device_hal/button_driver/iot_button /home/lf/esp/esp-idf/components/json /home/lf/esp/esp-matter/device_hal/led_driver /home/lf/esp/esp-idf/components/log /home/lf/esp/esp-idf/components/lwip /home/lf/Documents/esp_projects/light_switch/main /home/lf/esp/esp-idf/components/mbedtls /home/lf/esp/esp-idf/components/mqtt /home/lf/esp/esp-idf/components/newlib /home/lf/esp/esp-idf/components/nvs_flash /home/lf/esp/esp-idf/components/openthread /home/lf/esp/esp-idf/components/partition_table /home/lf/esp/esp-idf/components/protobuf-c /home/lf/esp/esp-idf/components/protocomm /home/lf/esp/esp-idf/components/pthread /home/lf/esp/esp-idf/components/riscv /home/lf/esp/esp-idf/components/sdmmc /home/lf/esp/esp-idf/components/soc /home/lf/esp/esp-idf/components/spi_flash /home/lf/esp/esp-idf/components/spiffs /home/lf/esp/esp-idf/components/tcp_transport /home/lf/esp/esp-idf/components/ulp /home/lf/esp/esp-idf/components/unity /home/lf/esp/esp-idf/components/usb /home/lf/esp/esp-idf/components/vfs /home/lf/esp/esp-idf/components/wear_levelling /home/lf/esp/esp-idf/components/wifi_provisioning /home/lf/esp/esp-idf/components/wpa_supplicant
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lf/Documents/esp_projects/light_switch/build
[0/1] Re-running CMake...-- Building ESP-IDF components for target esp32c6
-- Project sdkconfig file /home/lf/Documents/esp_projects/light_switch/sdkconfig
-- Adding linker script /home/lf/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
-- App "bootloader" version: v5.1.1-439-gcb174b0fe1
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
-- Adding linker script /home/lf/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
-- Adding linker script /home/lf/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.ld
-- Adding linker script /home/lf/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table riscv soc spi_flash
-- Component paths: /home/lf/esp/esp-idf/components/bootloader /home/lf/esp/esp-idf/components/bootloader_support /home/lf/esp/esp-idf/components/efuse /home/lf/esp/esp-idf/components/esp_app_format /home/lf/esp/esp-idf/components/esp_common /home/lf/esp/esp-idf/components/esp_hw_support /home/lf/esp/esp-idf/components/esp_rom /home/lf/esp/esp-idf/components/esp_system /home/lf/esp/esp-idf/components/esptool_py /home/lf/esp/esp-idf/components/freertos /home/lf/esp/esp-idf/components/hal /home/lf/esp/esp-idf/components/log /home/lf/esp/esp-idf/components/bootloader/subproject/main /home/lf/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/lf/esp/esp-idf/components/newlib /home/lf/esp/esp-idf/components/partition_table /home/lf/esp/esp-idf/components/riscv /home/lf/esp/esp-idf/components/soc /home/lf/esp/esp-idf/components/spi_flash
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lf/Documents/esp_projects/light_switch/build/bootloader
[1/1] cd /home/lf/Documents/esp_projects/light_switch/build/bootlo...lan/Documents/esp_projects/light_switch/build/bootloader/bootloader.binBootloader binary size 0x5310 bytes. 0x6cf0 bytes (57%) free.
[233/823] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/meshcop/dtls.cpp.objFAILED: esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/meshcop/dtls.cpp.obj 
ccache /home/lf/esp/esp-tools/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-g++ -DESP_PLATFORM -DIDF_VER=\"v5.1.1-439-gcb174b0fe1\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DOPENTHREAD_BUILD_DATETIME="\" 2023-10-03 11:08:46 UTC\"" -DOPENTHREAD_CONFIG_FILE=\"openthread-core-esp32x-ftd-config.h\" -DOPENTHREAD_FTD=1 -DPACKAGE_VERSION=\"cb174b0fe1-4ae691476\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/lf/Documents/esp_projects/light_switch/build/config -I/home/lf/esp/esp-idf/components/openthread/include -I/home/lf/esp/esp-idf/components/openthread/openthread/include -I/home/lf/esp/esp-idf/components/openthread/openthread/examples/platforms -I/home/lf/esp/esp-idf/components/openthread/openthread/include/openthread -I/home/lf/esp/esp-idf/components/openthread/openthread/src -I/home/lf/esp/esp-idf/components/openthread/openthread/src/core -I/home/lf/esp/esp-idf/components/openthread/openthread/src/lib/hdlc -I/home/lf/esp/esp-idf/components/openthread/openthread/src/lib/spinel -I/home/lf/esp/esp-idf/components/openthread/openthread/src/ncp -I/home/lf/esp/esp-idf/components/openthread/private_include -I/home/lf/esp/esp-idf/components/newlib/platform_include -I/home/lf/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/lf/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -I/home/lf/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/home/lf/esp/esp-idf/components/freertos/esp_additions/include -I/home/lf/esp/esp-idf/components/freertos/esp_additions/arch/riscv/include -I/home/lf/esp/esp-idf/components/esp_hw_support/include -I/home/lf/esp/esp-idf/components/esp_hw_support/include/soc -I/home/lf/esp/esp-idf/components/esp_hw_support/include/soc/esp32c6 -I/home/lf/esp/esp-idf/components/esp_hw_support/port/esp32c6/. -I/home/lf/esp/esp-idf/components/esp_hw_support/port/esp32c6/private_include -I/home/lf/esp/esp-idf/components/heap/include -I/home/lf/esp/esp-idf/components/log/include -I/home/lf/esp/esp-idf/components/soc/include -I/home/lf/esp/esp-idf/components/soc/esp32c6 -I/home/lf/esp/esp-idf/components/soc/esp32c6/include -I/home/lf/esp/esp-idf/components/hal/esp32c6/include -I/home/lf/esp/esp-idf/components/hal/include -I/home/lf/esp/esp-idf/components/hal/platform_port/include -I/home/lf/esp/esp-idf/components/esp_rom/include -I/home/lf/esp/esp-idf/components/esp_rom/include/esp32c6 -I/home/lf/esp/esp-idf/components/esp_rom/esp32c6 -I/home/lf/esp/esp-idf/components/esp_common/include -I/home/lf/esp/esp-idf/components/esp_system/include -I/home/lf/esp/esp-idf/components/esp_system/port/soc -I/home/lf/esp/esp-idf/components/esp_system/port/include/riscv -I/home/lf/esp/esp-idf/components/esp_system/port/include/private -I/home/lf/esp/esp-idf/components/riscv/include -I/home/lf/esp/esp-idf/components/lwip/include -I/home/lf/esp/esp-idf/components/lwip/include/apps -I/home/lf/esp/esp-idf/components/lwip/include/apps/sntp -I/home/lf/esp/esp-idf/components/lwip/lwip/src/include -I/home/lf/esp/esp-idf/components/lwip/port/include -I/home/lf/esp/esp-idf/components/lwip/port/freertos/include -I/home/lf/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/lf/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/lf/esp/esp-idf/components/esp_netif/include -I/home/lf/esp/esp-idf/components/esp_event/include -I/home/lf/esp/esp-idf/components/driver/include -I/home/lf/esp/esp-idf/components/driver/deprecated -I/home/lf/esp/esp-idf/components/driver/analog_comparator/include -I/home/lf/esp/esp-idf/components/driver/dac/include -I/home/lf/esp/esp-idf/components/driver/gpio/include -I/home/lf/esp/esp-idf/components/driver/gptimer/include -I/home/lf/esp/esp-idf/components/driver/i2c/include -I/home/lf/esp/esp-idf/components/driver/i2s/include -I/home/lf/esp/esp-idf/components/driver/ledc/include -I/home/lf/esp/esp-idf/components/driver/mcpwm/include -I/home/lf/esp/esp-idf/components/driver/parlio/include -I/home/lf/esp/esp-idf/components/driver/pcnt/include -I/home/lf/esp/esp-idf/components/driver/rmt/include -I/home/lf/esp/esp-idf/components/driver/sdio_slave/include -I/home/lf/esp/esp-idf/components/driver/sdmmc/include -I/home/lf/esp/esp-idf/components/driver/sigma_delta/include -I/home/lf/esp/esp-idf/components/driver/spi/include -I/home/lf/esp/esp-idf/components/driver/temperature_sensor/include -I/home/lf/esp/esp-idf/components/driver/touch_sensor/include -I/home/lf/esp/esp-idf/components/driver/twai/include -I/home/lf/esp/esp-idf/components/driver/uart/include -I/home/lf/esp/esp-idf/components/driver/usb_serial_jtag/include -I/home/lf/esp/esp-idf/components/esp_pm/include -I/home/lf/esp/esp-idf/components/esp_ringbuf/include -I/home/lf/esp/esp-idf/components/console -I/home/lf/esp/esp-idf/components/vfs/include -I/home/lf/esp/esp-idf/components/esp_partition/include -I/home/lf/esp/esp-idf/components/esp_timer/include -I/home/lf/esp/esp-idf/components/ieee802154/include -I/home/lf/esp/esp-idf/components/mbedtls/port/include -I/home/lf/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/lf/esp/esp-idf/components/mbedtls/mbedtls/library -I/home/lf/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/lf/esp/esp-idf/components/nvs_flash/include -I/home/lf/esp/esp-idf/components/spi_flash/include -march=rv32imac_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 -fmacro-prefix-map=/home/lf/Documents/esp_projects/light_switch=. -fmacro-prefix-map=/home/lf/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 -std=gnu++2b -fno-exceptions -fno-rtti -std=gnu++17 -Os -DCHIP_HAVE_CONFIG_H -MD -MT esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/meshcop/dtls.cpp.obj -MF esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/meshcop/dtls.cpp.obj.d -o esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/meshcop/dtls.cpp.obj -c /home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp: In member function 'ot::Error ot::MeshCoP::Dtls::Setup(bool)':
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp:312:5: error: 'mbedtls_ssl_conf_handshake_timeout' was not declared in this scope; did you mean 'mbedtls_ssl_conf_read_timeout'?
  312 |     mbedtls_ssl_conf_handshake_timeout(&mConf, 8000, 60000);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     mbedtls_ssl_conf_read_timeout
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp:321:9: error: 'mbedtls_ssl_conf_dtls_cookies' was not declared in this scope; did you mean 'mbedtls_ssl_conf_dn_hints'?
  321 |         mbedtls_ssl_conf_dtls_cookies(&mConf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &mCookieCtx);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         mbedtls_ssl_conf_dn_hints
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp:333:16: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
  333 |         rval = mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp: In member function 'ot::Error ot::MeshCoP::Dtls::SetClientId(const uint8_t*, uint8_t)':
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp:558:16: error: 'mbedtls_ssl_set_client_transport_id' was not declared in this scope; did you mean 'mbedtls_ssl_conf_transport'?
  558 |     int rval = mbedtls_ssl_set_client_transport_id(&mSsl, aClientId, aLength);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                mbedtls_ssl_conf_transport
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp: In member function 'void ot::MeshCoP::Dtls::Process()':
/home/lf/esp/esp-idf/components/openthread/openthread/src/core/meshcop/dtls.cpp:927:17: error: 'mbedtls_ssl_set_hs_ecjpake_password' was not declared in this scope
  927 |                 mbedtls_ssl_set_hs_ecjpake_password(&mSsl, mPsk, mPskLength);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[242/823] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/net/netif.cpp.objninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/lf/Documents/esp_projects/light_switch/build/log/idf_py_stderr_output_105569 and /home/lf/Documents/esp_projects/light_switch/build/log/idf_py_stdout_output_105569
lf@lf-virtual-machine:~/Documents/esp_projects/light_switch$

More Information.

No response

mozzbozz commented 1 year ago

Can confirm. Same hardware (esp32-c6), basically same IDF version (ESP-IDF v5.1.1-dirty). Coming from a clean config from the in my case light-example (not light switch like above), activating OpenThread and following to that the "Enable Joiner" lets the build process fail with the error messages above. Disabling that "Enable Joiner" option again, leads to the build process successfully working again.

mozzbozz commented 1 year ago

I tried a bit of stuff. Couldn't get it working, however activating the following CONFIG flags seems to be getting us one step further?

Seems to clear the errors from, just to break down at the linker with tons of messages like the following:

meshcop/dtls.cpp:875: undefined reference to `mbedtls_ssl_read'

No idea if the CONFIG flags from above are doing the right things or if it just leads in a wrong direction. Yikes.

EDIT: Turns out for what I want to do, I don't even need to activate the Joiner option (simply build a Thread end device, that can join a network). Must have misunderstood what the option is meant for. Anyways, it should still compile as expected, if activated.

baylf2000 commented 11 months ago

Bump. Any update from Espressif on this bug, or if there are any workarounds?

baylf2000 commented 11 months ago

Seems this issue has been fixed since this was logged. I see there has been a few updates pushed. It would have been nice for the maintainers to acknowledge something in this ticket. Maybe the already knew of the issue and just fixed it.

chshu commented 11 months ago

@mozzbozz @baylf2000 The Thread Matter device utilizes the Matter commissioning process to join to the Thread network, doesn't need the Thread Joiner feature. We didn't fix anything recently, the default configurations in the esp-matter examples should work as is.

If you want to try out the Thread Joiner feature, it's necessary to enable specific mbedtls options. You can refer to the configuration in the ot_cli example, available at this link: https://github.com/espressif/esp-idf/blob/master/examples/openthread/ot_cli/sdkconfig.defaults#L18, which could support the Joiner feature.

BartJozwicki commented 2 months ago

Enabling joiner causes the same issue, I am trying to use openThread and join network ESP-IDF v5.2.2 but cannot build project:

Screenshot 2024-07-11 at 12 46 02

platini76 commented 2 weeks ago

I did not activate joiner but I had the same result