Xinyuan-LilyGO / LilyGo-Display-IDF

This project is an esp-idf sample repository for the LilyGo display family.
MIT License
25 stars 7 forks source link

Build fails due to mbedtls. #7

Open Omnomios opened 5 months ago

Omnomios commented 5 months ago

Device: T-Display-S3-AMOLED-Touch OS: Fedora 40 IDF Version: v5.3

Following the build instructions in README.md results in a build failure for one of the dependencies.

$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:25:28: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   25 | void mbedtls_gcm_init_soft(mbedtls_gcm_context_soft *ctx);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
      |                            mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:28:29: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   28 | int mbedtls_gcm_setkey_soft(mbedtls_gcm_context_soft *ctx,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
      |                             mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:33:29: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   33 | int mbedtls_gcm_starts_soft(mbedtls_gcm_context_soft *ctx,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
      |                             mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:37:32: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   37 | int mbedtls_gcm_update_ad_soft(mbedtls_gcm_context_soft *ctx,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:40:29: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   40 | int mbedtls_gcm_update_soft(mbedtls_gcm_context_soft *ctx,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
      |                             mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:45:29: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   45 | int mbedtls_gcm_finish_soft(mbedtls_gcm_context_soft *ctx,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
      |                             mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:51:36: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   51 | int mbedtls_gcm_crypt_and_tag_soft(mbedtls_gcm_context_soft *ctx,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                    mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:64:35: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   64 | int mbedtls_gcm_auth_decrypt_soft(mbedtls_gcm_context_soft *ctx,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                   mbedtls_gcm_context
$HOME/esp-idf/components/mbedtls/port/include/mbedtls/gcm.h:75:28: error: unknown type name 'mbedtls_gcm_context_soft'; did you mean 'mbedtls_gcm_context'?
   75 | void mbedtls_gcm_free_soft(mbedtls_gcm_context_soft *ctx);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
      |                            mbedtls_gcm_context

I modified the dependency by changing all instances of mbedtls_gcm_context_soft to mbedtls_gcm_context and the build completed successfully. The files are: port/include/mbedtls/gcm.h and port/aes/esp_aes_gcm.c

Likely be an isolated problem with the mbedtls library but I thought I should mention it here in case someone else comes across the same issue.

I couldn't find any information on mbedtls_gcm_context_soft or why it exists.