esp-google-iot not compiling

steeveone
Posts: 10
Joined: Fri Jan 10, 2020 10:17 pm

esp-google-iot not compiling

Postby steeveone » Fri Jan 13, 2023 3:46 pm

Hello, i have added esp-google-iot to my components, but it doesn't build, Is this library not compatible with IDF 5.0?
follows the errors:

Code: Select all

AILED: esp-idf/esp-google-iot/CMakeFiles/__idf_esp-google-iot.dir/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c.obj
ccache C:\Espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DIOTC_FS_MEMORY -DIOTC_MEMORY_LIMITER_APPLICATION_MEMORY_LIMIT=524288 -DIOTC_MEMORY_LIMITER_ENABLED -DIOTC_MEMORY_LIMITER_SYSTEM_MEMORY_LIMIT=2024 -DIOTC_TLS_LIB_MBEDTLS -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -IC:/Users/steeve/Desktop/station/build/config -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/include/bsp -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/include -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/control_topic -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/datastructures -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/debug_extensions/memory_limiter -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/event_dispatcher -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/event_loop -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/io/fs/memory -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/io/fs -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/io/net -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/mqtt/logic -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/mqtt/codec -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/platform/iotc_thread -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/platform/posix/iotc_thread -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/tls -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/tls/certs -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/memory -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc -IC:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/third_party/mqtt-protocol-c -IC:/Users/steeve/Desktop/station/components/esp-google-iot/port/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/newlib/platform_include -IC:/Espressif/frameworks/esp-idf-v5.0/components/freertos/FreeRTOS-Kernel/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/freertos/esp_additions/include/freertos -IC:/Espressif/frameworks/esp-idf-v5.0/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/freertos/esp_additions/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_hw_support/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_hw_support/include/soc -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_hw_support/include/soc/esp32 -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_hw_support/port/esp32/. -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_hw_support/port/esp32/private_include -IC:/Espressif/frameworks/esp-idf-v5.0/components/heap/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/log/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/soc/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/soc/esp32/. -IC:/Espressif/frameworks/esp-idf-v5.0/components/soc/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/hal/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/hal/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/hal/platform_port/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_rom/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_rom/include/esp32 -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_rom/esp32 -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_common/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_system/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_system/port/soc -IC:/Espressif/frameworks/esp-idf-v5.0/components/esp_system/port/include/private -IC:/Espressif/frameworks/esp-idf-v5.0/components/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/xtensa/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/include/apps -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/include/apps/sntp -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/lwip/src/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/port/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/lwip/port/esp32/include/arch -IC:/Espressif/frameworks/esp-idf-v5.0/components/mbedtls/port/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/mbedtls/mbedtls/include -IC:/Espressif/frameworks/esp-idf-v5.0/components/mbedtls/mbedtls/library -IC:/Espressif/frameworks/esp-idf-v5.0/components/mbedtls/esp_crt_bundle/include -mlongcalls -Wno-frame-address  -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 -Og -fmacro-prefix-map=C:/Users/steeve/Desktop/station=. -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.0=/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\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/esp-google-iot/CMakeFiles/__idf_esp-google-iot.dir/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c.obj -MF esp-idf\esp-google-iot\CMakeFiles\__idf_esp-google-iot.dir\iot-device-sdk-embedded-c\src\bsp\crypto\mbedtls\iotc_bsp_crypto_mbedtls.c.obj.d -o esp-idf/esp-google-iot/CMakeFiles/__idf_esp-google-iot.dir/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c.obj -c C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c
In file included from C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:21:
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c: In function 'iotc_bsp_sha256':
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:88:20: error: implicit declaration of function 'mbedtls_sha256_starts_ret'; did you mean 'mbedtls_sha256_starts'? [-Werror=implicit-function-declaration]
   88 |   IOTC_CHECK_STATE(mbedtls_sha256_starts_ret(&sha_ctx, 0));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:45:8: note: in definition of macro 'IOTC_CHECK_STATE'
   45 |   if ((s) != IOTC_STATE_OK) { \
      |        ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:89:20: error: implicit declaration of function 'mbedtls_sha256_update_ret'; did you mean 'mbedtls_sha256_update'? [-Werror=implicit-function-declaration]
   89 |   IOTC_CHECK_STATE(mbedtls_sha256_update_ret(&sha_ctx, src_buf, src_buf_size));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:45:8: note: in definition of macro 'IOTC_CHECK_STATE'
   45 |   if ((s) != IOTC_STATE_OK) { \
      |        ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:90:20: error: implicit declaration of function 'mbedtls_sha256_finish_ret'; did you mean 'mbedtls_sha256_finish'? [-Werror=implicit-function-declaration]
   90 |   IOTC_CHECK_STATE(mbedtls_sha256_finish_ret(&sha_ctx, dst_buf_32_bytes));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:45:8: note: in definition of macro 'IOTC_CHECK_STATE'
   45 |   if ((s) != IOTC_STATE_OK) { \
      |        ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c: In function 'iotc_bsp_ecc':
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:132:12: error: too few arguments to function 'mbedtls_pk_parse_key'
  132 |            mbedtls_pk_parse_key(&pk, (const unsigned char*)private_key_pem,
      |            ^~~~~~~~~~~~~~~~~~~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:53:8: note: in definition of macro 'IOTC_CHECK_CND_DBGMESSAGE'
   53 |   if ((cnd)) {                                           \
      |        ^~~
In file included from C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:29:
C:/Espressif/frameworks/esp-idf-v5.0/components/mbedtls/mbedtls/include/mbedtls/pk.h:793:5: note: declared here
  793 | int mbedtls_pk_parse_key( mbedtls_pk_context *ctx,
      |     ^~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:21:
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:137:64: error: 'mbedtls_pk_context' has no member named 'pk_ctx'
  137 |       (mbedtls_ret = mbedtls_ecdsa_from_keypair(&ecdsa_sign, pk.pk_ctx)) != 0,
      |                                                                ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:53:8: note: in definition of macro 'IOTC_CHECK_CND_DBGMESSAGE'
   53 |   if ((cnd)) {                                           \
      |        ^~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:142:44: error: implicit declaration of function 'mbedtls_ecdsa_sign_det'; did you mean 'mbedtls_ecdsa_sign_det_ext'? [-Werror=implicit-function-declaration]
  142 |   IOTC_CHECK_CND_DBGMESSAGE((mbedtls_ret = mbedtls_ecdsa_sign_det(
      |                                            ^~~~~~~~~~~~~~~~~~~~~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:53:8: note: in definition of macro 'IOTC_CHECK_CND_DBGMESSAGE'
   53 |   if ((cnd)) {                                           \
      |        ^~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:143:45: error: 'mbedtls_ecdsa_context' {aka 'mbedtls_ecp_keypair'} has no member named 'grp'
  143 |                                  &ecdsa_sign.grp, &r, &s, &ecdsa_sign.d,
      |                                             ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:53:8: note: in definition of macro 'IOTC_CHECK_CND_DBGMESSAGE'
   53 |   if ((cnd)) {                                           \
      |        ^~~
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/bsp/crypto/mbedtls/iotc_bsp_crypto_mbedtls.c:143:70: error: 'mbedtls_ecdsa_context' {aka 'mbedtls_ecp_keypair'} has no member named 'd'
  143 |                                  &ecdsa_sign.grp, &r, &s, &ecdsa_sign.d,
      |                                                                      ^
C:/Users/steeve/Desktop/station/components/esp-google-iot/iot-device-sdk-embedded-c/src/libiotc/iotc_macros.h:53:8: note: in definition of macro 'IOTC_CHECK_CND_DBGMESSAGE'
   53 |   if ((cnd)) {                                           \
      |        ^~~
cc1.exe: some warnings being treated as errors
[18/30] Building C object esp-idf/esp-google-iot/CMakeFile...ibiotc/mqtt/logic/iotc_mqtt_logic_layer_task_helpers.c.objninja: build stopped: subcommand failed.
HINT: Please check that the function name is correct. Also it is possible that you've forgot to import mbedtls_sha256_starts_ret library(s) in header file or add the necessary REQURIES component. Try to add missing libraries to your project header file or check idf_component_register(REQUIRES ...) section in your component CmakeList.txt file. For more information run 'idf.py docs -sp api-guides/build-system.html'.
Also, please check if the function has been removed, renamed or replaced by an alternative function - refer to the migration guide for more information.

leopoldo_zz
Posts: 1
Joined: Tue Jul 18, 2023 1:35 pm

Re: esp-google-iot not compiling

Postby leopoldo_zz » Tue Jul 18, 2023 1:39 pm

Hi,

I'm having the same problem.

Could someone solve it?

Thank you

Who is online

Users browsing this forum: No registered users and 55 guests