m1cr0lab-esp32 / remote-control-with-websocket

ESP32 Remote Control with WebSocket
MIT License
38 stars 20 forks source link

Removed function mbedtls_md5_starts in WebAuthentication.cpp results in build error #32

Open Erriez opened 2 years ago

Erriez commented 2 years ago

Thanks for creating this great tutorial! Very well explained and easy to follow.

Line lib_deps = ESP Async WebServer in platform.ini results in a build error:

Linking .pio/build/esp32doit-devkit-v1/firmware.elf
/home/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32doit-devkit-v1/libc09/libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'
/home/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32doit-devkit-v1/libc09/libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)':
/home/user/Documents/PlatformIO/Projects/ESP32-Websocket/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32doit-devkit-v1/firmware.elf] Error 1

This issue has already reported in https://github.com/me-no-dev/ESPAsyncWebServer/issues/1147 and is waiting for a new release.

A temporary workaround until the developer creates an updated library is to change:

-From: lib_deps = ESP Async WebServer
+To: lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git
m1cr0lab commented 2 years ago

Thank you, @Erriez, for noting this incompatibility with the new ESP32 framework.

Let's wait for the update to be done by Hristo (maintainer).

But in the meantime, you are quite right to point to the latest version available on GitHub. This is also mentioned in the ESP Async WebServer library documentation.

This configuration compiles properly with the Espressif 32 v5.0.0 framework:

[env:esp32doit-devkit-v1]
platform      = espressif32
board         = esp32doit-devkit-v1
framework     = arduino
upload_speed  = 921600
monitor_speed = 115200
lib_deps      = # me-no-dev/ESP Async WebServer @ ^1.2.3
                https://github.com/me-no-dev/ESPAsyncWebServer.git
                bblanchon/ArduinoJson @ ^6.19.4

And thanks for your kind feedback.

nilvandomartins commented 1 year ago

tente usar:

[env:esp32doit-devkit-v1] platform = espressif32 board = esp32doit-devkit-v1 framework = arduino upload_speed = 921600 monitor_speed = 115200 lib_deps = esphome/AsyncTCP-esphome@^2.0.0 esphome/ESPAsyncWebServer-esphome@^3.0.0 ArduinoJSON@6.19.4