Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espressif32 @6.5.0: mbedtls_sha1() fails to compile #2

Open
mhaberler opened this issue May 30, 2024 · 2 comments
Open

espressif32 @6.5.0: mbedtls_sha1() fails to compile #2

mhaberler opened this issue May 30, 2024 · 2 comments

Comments

@mhaberler
Copy link

mhaberler commented May 30, 2024

I need to step back in espressif32 versions to isolate an i2c bug

[env]
platform = espressif32 @6.5.0
framework = arduino

then I get

In file included from lib/PicoWebsocket/src/PicoWebsocket.cpp:7:
/Users/mah/.platformio/packages/framework-arduinoespressif32@3.20014.231204/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/sha1.h:323:25: error: conflicting declaration of C function 'void mbedtls_sha1(const unsigned char*, size_t, unsigned char*)'
 MBEDTLS_DEPRECATED void mbedtls_sha1(const unsigned char *input,
                         ^~~~~~~~~~~~
<command-line>: note: previous declaration 'int mbedtls_sha1(const unsigned char*, size_t, unsigned char*)'
/Users/mah/.platformio/packages/framework-arduinoespressif32@3.20014.231204/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/sha1.h:291:5: note: in expansion of macro 'mbedtls_sha1_ret'
 int mbedtls_sha1_ret(const unsigned char *input,
     ^~~~~~~~~~~~~~~~
lib/PicoWebsocket/src/PicoWebsocket.cpp: In function 'void {anonymous}::sha1(const String&, uint8_t*)':
lib/PicoWebsocket/src/PicoWebsocket.cpp:25:79: error: call of overloaded 'mbedtls_sha1(const unsigned char*, unsigned int, uint8_t*&)' is ambiguous
     mbedtls_sha1_ret((const unsigned char *) text.c_str(), text.length(), hash);
                                                                               ^
<command-line>: note: candidate: 'int mbedtls_sha1(const unsigned char*, size_t, unsigned char*)'
/Users/mah/.platformio/packages/framework-arduinoespressif32@3.20014.231204/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/sha1.h:291:5: note: in expansion of macro 'mbedtls_sha1_ret'
 int mbedtls_sha1_ret(const unsigned char *input,
     ^~~~~~~~~~~~~~~~
In file included from lib/PicoWebsocket/src/PicoWebsocket.cpp:7:
/Users/mah/.platformio/packages/framework-arduinoespressif32@3.20014.231204/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/sha1.h:323:25: note: candidate: 'void mbedtls_sha1(const unsigned char*, size_t, unsigned char*)'
 MBEDTLS_DEPRECATED void mbedtls_sha1(const unsigned char *input,

what would you suggest? maybe bring in https://github.com/esp8266/Arduino/tree/master/libraries/Hash ?

thanks, Michael

edit: might be the old compiler version, looks like c++11 rather than c++17

@mlesniew
Copy link
Owner

Sorry, I can't reproduce this.

I tried building the PicoMQTT websocket_server example for the esp32 pinning the platform version (espressif32 @6.5.0). It compiles fine...

@mhaberler
Copy link
Author

mhaberler commented May 31, 2024

I'll post an example to reproduce, this is too convoluted

same issue: espressif/arduino-esp32#6691

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants