ayushsharma82 / ESP-DASH

Blazing fast library to create a functional dashboard for ESP8266 / ESP32
https://espdash.pro
GNU General Public License v3.0
976 stars 200 forks source link

[BUG] Example does not compile with PlatformIO #164

Closed BorisBrock closed 3 months ago

BorisBrock commented 1 year ago

I just created a new project using the provided example code. This is my platformio.ini:

[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
lib_ldf_mode=deep

lib_deps =
  ayushsharma82/ESP-DASH @ ^4.0.2

When compiling the project, it all ends in sadness:

/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to `SHA1Init'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x1c): undefined reference to `SHA1Update'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x20): undefined reference to `SHA1Final'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(AsyncWebSocket.cpp.o): in function `AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)':
/home/username/git/embedded_projects/Arduino/EspUiTest/.pio/libdeps/lolin32/ESP Async WebServer/src/AsyncWebSocket.cpp:1269: undefined reference to `SHA1Init'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/username/git/embedded_projects/Arduino/EspUiTest/.pio/libdeps/lolin32/ESP Async WebServer/src/AsyncWebSocket.cpp:1270: undefined reference to `SHA1Update'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/username/git/embedded_projects/Arduino/EspUiTest/.pio/libdeps/lolin32/ESP Async WebServer/src/AsyncWebSocket.cpp:1271: undefined reference to `SHA1Final'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'
/home/username/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/lolin32/lib259/libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)':
/home/username/git/embedded_projects/Arduino/EspUiTest/.pio/libdeps/lolin32/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'
collect2: error: ld returned 1 exit status

How can ESP-DASH be used from PlatformIO?

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you are still facing the problem, please tag the author of repository and state your concern.

mhummels commented 8 months ago

Seems to be also an issue with the ESP Async WebServer dependency. Please see #195. I think the selection of the dependencies should be mentioned in the documentation, so people new to this project know how to fix it. Best would be, if the recommended dependencies could be listed there as well

mathieucarbou commented 8 months ago
  bblanchon/ArduinoJson @ 7.0.4
  esphome/AsyncTCP-esphome @ 2.1.3
  mathieucarbou/ESP Async WebServer @ 2.8.1
  ayushsharma82/ESP-DASH @ 4.0.4

https://docs.espdash.pro/installation/

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

ayushsharma82 commented 3 months ago

Installation docs were updated to pin dependencies.