Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+#970

Open
khoih-prog wants to merge7 commits intome-no-dev:master
base:master
Choose a base branch
Loading
fromkhoih-prog:master

Conversation

@khoih-prog
Copy link

Compile error on ESP32-C3 for even simplest examplesimple_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);                            ^

misery, agners, FedericoBusero, blenderfreaky, bluet, beachmiles, and Nailik reacted with thumbs up emoji
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);
Copy link

@agnersagnersJul 21, 2021
edited
Loading

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:

Suggested change
return IPAddress((uint32_t)0);
return IPAddress(0UL);

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.

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.```
@khoih-progkhoih-prog changed the titleFix compiler error for ESP32-C3Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+Aug 2, 2021
khoih-prog added a commit to khoih-prog/ESPAsync_WiFiManager that referenced this pull requestAug 2, 2021
### 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
khoih-prog added a commit to khoih-prog/AsyncWebServer_WT32_ETH01 that referenced this pull requestAug 3, 2021
#### 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
Copy link

Hi wanna know if there's any update?

I'm experiencing the same issue.

Arduino: 1.8.16 (Linux), Board: "ESP32C3 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 160MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 115200, None"/home/bluet/Arduino/libraries/ESPAsyncWebServer-master/src/AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()':/home/bluet/Arduino/libraries/ESPAsyncWebServer-master/src/AsyncWebSocket.cpp:832:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous         return IPAddress(0U);                            ^In file included from /home/bluet/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/Arduino.h:163,                 from /home/bluet/Arduino/libraries/ESPAsyncWebServer-master/src/AsyncWebSocket.cpp:21:/home/bluet/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/IPAddress.h:51:5: note: candidate: 'IPAddress::IPAddress(const uint8_t*)'     IPAddress(const uint8_t *address);     ^~~~~~~~~/home/bluet/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/IPAddress.h:50:5: note: candidate: 'IPAddress::IPAddress(uint32_t)'     IPAddress(uint32_t address);     ^~~~~~~~~/home/bluet/.arduino15/packages/esp32/hardware/esp32/2.0.1/cores/esp32/IPAddress.h:29:7: note: candidate: 'constexpr IPAddress::IPAddress(const IPAddress&)' class IPAddress: public Printable       ^~~~~~~~~Multiple libraries were found for "WiFi.h" Used: /home/bluet/.arduino15/packages/esp32/hardware/esp32/2.0.1/libraries/WiFi Not used: /home/bluet/local/arduino-1.8.16/libraries/WiFiexit status 1Error compiling for board ESP32C3 Dev Module.This report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences.

@bluet
Copy link

bluet commentedNov 23, 2021
edited
Loading

Got it fixed by manually modifyAsyncWebSocket.cpp:832,
fromreturn IPAddress(0U); toreturn IPAddress((uint32_t) 0u);.

Tested on both ESP32-C3 and ESP32-S2.

pkramersx, AsareKofi, walter-c, Adminius, and SpartanJRU reacted with thumbs up emojibeachmiles and AsareKofi reacted with heart emoji

@FedericoBusero
Copy link

This little issue breaks compilation on ESP32C3, no idea why it doesn't get merged

ndastur, beachmiles, Nailik, and lacssa reacted with thumbs up emoji

@ndastur
Copy link

This does seem like a fairly important fix. Any update or timeline please ?

slaesh and XXDoMi77 reacted with eyes emoji

@maxgerhardt
Copy link

maxgerhardt commentedMay 17, 2022
edited
Loading

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
Copy link

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.

beachmiles reacted with heart emoji

vortigont added a commit to vortigont/ESPAsyncWebServer that referenced this pull requestMay 28, 2022
@maxgerhardt
Copy link

Yet another person running into thishere.

beachmiles, oryjkov, and FedericoBusero reacted with thumbs up emoji

@ayushsharma82
Copy link
Contributor

Somebody merge this :) It's very due and fixes the problem.

@miloit
Copy link

Can someone merge this?

@Nailik
Copy link

Issue still exists !!

karthage-spartacus and FedericoBusero reacted with thumbs up emojikarthage-spartacus reacted with confused emoji

@ncmreynolds
Copy link

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
Copy link

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.
Remark that there is another PR with only this one line of code:#1142

@bluetbluet mentioned this pull requestFeb 12, 2023
@Adminius
Copy link

run also into this issue.
return IPAddress((uint32_t)0); fixes the problem.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

2 more reviewers

@agnersagnersagners left review comments

@vladkozlov69vladkozlov69vladkozlov69 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

13 participants

@khoih-prog@bluet@FedericoBusero@ndastur@maxgerhardt@MikeyMoMo@ayushsharma82@miloit@Nailik@ncmreynolds@Adminius@agners@vladkozlov69

[8]ページ先頭

©2009-2025 Movatter.jp