- Notifications
You must be signed in to change notification settings - Fork1.3k
Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+#970
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Compile error on ESP32-C3 for even simplest example [simple_server](https://github.com/me-no-dev/ESPAsyncWebServer/tree/master/examples/simple_server)```/home/kh/Arduino/libraries/ESPAsyncWebServer-master/src/AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()':/home/kh/Arduino/libraries/ESPAsyncWebServer-master/src/AsyncWebSocket.cpp:843:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous return IPAddress(0U); ^```
| IPAddressAsyncWebSocketClient::remoteIP() { | ||
| if(!_client) { | ||
| returnIPAddress(0U); | ||
| returnIPAddress((uint32_t)0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Instead of using a type cast I'd just use a more specific type suffix:
| return IPAddress((uint32_t)0); | |
| return IPAddress(0UL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actually, using0UL breaks ESP32. I think the only proper way to fix this is using a static type cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can we return IPADDR_ANY or IPADDR_NONE here? IPADDR_ANY looks good for this, no?
Fix deprecated functions superseded from mbed TLS v2.7.0- mbedtls_md5_starts()- mbedtls_md5_update() - mbedtls_md5_finish()leading to following compiling error```/home/kh/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: libraries/ESPAsyncWebServer-master/WebAuthentication.cpp.o:(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'/home/kh/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: libraries/ESPAsyncWebServer-master/WebAuthentication.cpp.o: in function `getMD5(unsigned char*, unsigned short, char*)':/home/kh/Arduino/libraries/ESPAsyncWebServer-master/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'collect2: error: ld returned 1 exit statusexit status 1Error compiling for board ESP32S2 Dev Module.```
### Releases v1.9.21. Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+2. Fix AsyncWebServer library compile error with ESP32 core v2.0.0-rc1+. Check [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](me-no-dev/ESPAsyncWebServer#970)3. Verify compatibility with new ESP32 core v2.0.0-rc1+4. Verify compatibility with new ESP8266 core v3.0.2
#### Releases v1.2.41. Fix library compile error with ESP32 core v2.0.0-rc1+. Check [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](me-no-dev/ESPAsyncWebServer#970)2. Verify compatibility with new ESP32 core v2.0.0-rc1+
bluet commentedNov 23, 2021
Hi wanna know if there's any update? I'm experiencing the same issue. |
bluet commentedNov 23, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Got it fixed by manually modify Tested on both ESP32-C3 and ESP32-S2. |
FedericoBusero commentedDec 29, 2021
This little issue breaks compilation on ESP32C3, no idea why it doesn't get merged |
ndastur commentedMay 1, 2022
This does seem like a fairly important fix. Any update or timeline please ? |
maxgerhardt commentedMay 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
People are also running in this bug when using PlatformIO and using the latest Arduino-ESP32 corehere in the forums. This fix PR is valid. |
MikeyMoMo commentedMay 19, 2022
Here is is May 19, 2022 and I just had to fix this, too. Thanks to those who found it. I hope it can be fixed soon in the library for real. Been known for only 1 year. |
still waiting for this PRme-no-dev#970
maxgerhardt commentedJun 30, 2022
Yet another person running into thishere. |
Somebody merge this :) It's very due and fixes the problem. |
miloit commentedNov 6, 2022
Can someone merge this? |
Nailik commentedDec 11, 2022
Issue still exists !! |
ncmreynolds commentedJan 30, 2023
Just had to fix this manually myself after encountering it, seems like a trivial merge that would fix this for a whole load of people. Any chance this can be merged? |
FedericoBusero commentedFeb 12, 2023
The problem with this PR is that most of the code changes are about mbed TLS, but most of the comments and requests are about one little trivial change in one line of the code to fix the compilation error on RISC-V (ESP32-C3). Probably it is better to split the two issues. |
Adminius commentedDec 10, 2023
run also into this issue. |
Compile error on ESP32-C3 for even simplest examplesimple_server