I’m running into an issue compiling the sdk as a submodule of my project. It’s specifically unable to find the function mbedtls_ssl_ciphersuite_uses_psk()
. I’m using the ESP IDF v5.2.1 with Golioth SDK versions 0.11.1 (Also tried v0.12.2 during debugging), and this is targeting an esp32s3 device.
We (the firmware team) are able to build it on our various machines, but when I tried cloning it onto a Raspberry Pi, this error came up. I’ve already run git submodule update --init --recursive
, but no luck.
I started taking a look at the sdkconfig
file to see if there were any differences. There are a couple, innocuous looking changes, and I’ll post them when I have a full diff done.
Here’s the error I’m seeing:
[1153/1221] Building C object esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_mbedtls.c.obj
FAILED: esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_mbedtls.c.obj
/home/{company}/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240305/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc -DCHARLIE_VERSION=\"1.3.0\" -DESP_PLATFORM -DIDF_VER=\"v5.4-dev-421-g4523f2d674\" -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 -I/home/{company}/dev/{project}/build/config -I/home/{company}/dev/{project}/components/golioth-firmware-sdk/external/libcoap/include -I/home/{company}/dev/{project}/components/golioth-firmware-sdk/port/esp_idf/libcoap/include -I/home/{company}/esp/esp-idf/components/newlib/platform_include -I/home/{company}/esp/esp-idf/components/freertos/config/include -I/home/{company}/esp/esp-idf/components/freertos/config/include/freertos -I/home/{company}/esp/esp-idf/components/freertos/config/xtensa/include -I/home/{company}/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/{company}/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/{company}/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/{company}/esp/esp-idf/components/freertos/esp_additions/include -I/home/{company}/esp/esp-idf/components/esp_hw_support/include -I/home/{company}/esp/esp-idf/components/esp_hw_support/include/soc -I/home/{company}/esp/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/home/{company}/esp/esp-idf/components/esp_hw_support/dma/include -I/home/{company}/esp/esp-idf/components/esp_hw_support/ldo/include -I/home/{company}/esp/esp-idf/components/esp_hw_support/port/esp32s3/. -I/home/{company}/esp/esp-idf/components/esp_hw_support/port/esp32s3/include -I/home/{company}/esp/esp-idf/components/heap/include -I/home/{company}/esp/esp-idf/components/log/include -I/home/{company}/esp/esp-idf/components/soc/include -I/home/{company}/esp/esp-idf/components/soc/esp32s3 -I/home/{company}/esp/esp-idf/components/soc/esp32s3/include -I/home/{company}/esp/esp-idf/components/hal/platform_port/include -I/home/{company}/esp/esp-idf/components/hal/esp32s3/include -I/home/{company}/esp/esp-idf/components/hal/include -I/home/{company}/esp/esp-idf/components/esp_rom/include -I/home/{company}/esp/esp-idf/components/esp_rom/include/esp32s3 -I/home/{company}/esp/esp-idf/components/esp_rom/esp32s3 -I/home/{company}/esp/esp-idf/components/esp_common/include -I/home/{company}/esp/esp-idf/components/esp_system/include -I/home/{company}/esp/esp-idf/components/esp_system/port/soc -I/home/{company}/esp/esp-idf/components/esp_system/port/include/private -I/home/{company}/esp/esp-idf/components/xtensa/esp32s3/include -I/home/{company}/esp/esp-idf/components/xtensa/include -I/home/{company}/esp/esp-idf/components/xtensa/deprecated_include -I/home/{company}/esp/esp-idf/components/lwip/include -I/home/{company}/esp/esp-idf/components/lwip/include/apps -I/home/{company}/esp/esp-idf/components/lwip/include/apps/sntp -I/home/{company}/esp/esp-idf/components/lwip/lwip/src/include -I/home/{company}/esp/esp-idf/components/lwip/port/include -I/home/{company}/esp/esp-idf/components/lwip/port/freertos/include -I/home/{company}/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/{company}/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/{company}/esp/esp-idf/components/lwip/port/esp32xx/include/sys -I/home/{company}/esp/esp-idf/components/mbedtls/port/include -I/home/{company}/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/{company}/esp/esp-idf/components/mbedtls/mbedtls/library -I/home/{company}/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/{company}/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/{company}/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/{company}/esp/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -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 -Os -freorder-blocks -fmacro-prefix-map=/home/{company}/dev/{project}=. -fmacro-prefix-map=/home/{company}/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_mbedtls.c.obj -MF esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_mbedtls.c.obj.d -o esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_mbedtls.c.obj -c /home/{company}/dev/{project}/components/golioth-firmware-sdk/external/libcoap/src/coap_mbedtls.c
/home/{company}/dev/{project}/components/golioth-firmware-sdk/external/libcoap/src/coap_mbedtls.c: In function 'set_ciphersuites':
/home/{company}/dev/{project}/components/golioth-firmware-sdk/external/libcoap/src/coap_mbedtls.c:1054:18: error: implicit declaration of function 'mbedtls_ssl_ciphersuite_uses_psk'; did you mean 'mbedtls_ssl_ciphersuite_get_id'? [-Werror=implicit-function-declaration]
1054 | else if (mbedtls_ssl_ciphersuite_uses_psk(cur)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_ssl_ciphersuite_get_id
cc1: some warnings being treated as errors
[1158/1221] Building C object esp-idf/coap/CMakeFiles/__idf_coap.dir/__/__/__/__/external/libcoap/src/coap_session.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/{company}/dev/{project}/build/log/idf_py_stderr_output_39824 and /home/{company}/dev/{project}/build/log/idf_py_stdout_output_39824