Skip to content

Library dependency / cannot resolve / compile errors #343

@Kybernaut000

Description

@Kybernaut000

Hello!

TLDR:

Cannot get it compiled, errors are similar to

In file included from .pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.cpp:24:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory

Details

I was trying to get things compiled along the readme.md using platformio on ESP32. It says:

lib_deps =
    ESPUI
    ESP Async WebServer
    ESPAsyncTCP # (or AsyncTCP on ESP32)
    LittleFS_esp32 # (ESP32 only)

Got compile errors. Read lots of stuff around lib_deps, strict, chain, chain+, etc. Didn't manage to get it compiled.

I found platformio.ini in ESPUI/pio_examples/gui (Please, reference this in the readme.md, would have saved me 4 hours minimum).
Imported settings, still problem.

Settings:

Right now I'm with the following settings:

[env:egon]
platform = espressif32
board = az-delivery-devkit-v4
framework = arduino

lib_deps =

    bblanchon/ArduinoJson @ ^7.0.4
    https://github.com/bmedici/ESPAsyncWebServer ; Use a fork of the library that has a bugfix for the compile.... https://github.com/esphome/ESPAsyncWebServer/pull/17
    me-no-dev/AsyncTCP
    s00500/ESPUI

lib_ignore =
	ESP Async WebServer	; force the use of the esphome version
	AsyncTCP			; force the use of the esphome version
	LittleFS_esp32		; force the use of the ESP32 built into the core version

;board_build.flash_mode = dout
board_build.filesystem = littlefs

monitor_speed = 115200
monitor_dtr = 1
monitor_rts = 1

build_flags = 
	-DCORE_DEBUG_LEVEL=4
    ;-DDEBUG_ESPUI


;lib_compat_mode=strict
;lib_ldf_mode=chain+

Errors:

Dependency Graph
|-- ArduinoJson @ 7.4.3
|-- ESPAsyncWebServer-esphome @ 3.0.0+sha.de83e7e
|-- ESPUI @ 2.2.4
|-- DNSServer @ 3.2.0
|-- SPI @ 3.2.0
|-- WiFi @ 3.2.0
|-- Wire @ 3.2.0
Building in release mode
Compiling .pio\build\egon\src\main.cpp.o
Compiling .pio\build\egon\lib49d\AsyncTCP-esphome\AsyncTCP.cpp.o
Archiving .pio\build\egon\libc9a\libFS.a
Archiving .pio\build\egon\libe68\libNetwork.a
Compiling .pio\build\egon\libc82\WiFi\WiFi.cpp.o
Compiling .pio\build\egon\libc82\WiFi\WiFiAP.cpp.o
Compiling .pio\build\egon\libc82\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\egon\libc82\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\egon\libc82\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\egon\libc82\WiFi\WiFiScan.cpp.o
Compiling .pio\build\egon\lib22d\ESPAsyncWebServer-esphome\AsyncEventSource.cpp.o
Compiling .pio\build\egon\lib22d\ESPAsyncWebServer-esphome\AsyncWebSocket.cpp.o
Compiling .pio\build\egon\lib22d\ESPAsyncWebServer-esphome\WebAuthentication.cpp.o
Compiling .pio\build\egon\lib22d\ESPAsyncWebServer-esphome\WebHandlers.cpp.o
In file included from .pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.cpp:24:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory

   26 | #include "IPv6Address.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\egon\lib49d\AsyncTCP-esphome\AsyncTCP.cpp.o] Error 1
In file included from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/AsyncWebSocket.h:26,
                 from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/AsyncWebSocket.cpp:22:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory

   26 | #include "IPv6Address.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\egon\lib22d\ESPAsyncWebServer-esphome\AsyncWebSocket.cpp.o] Error 1
In file included from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/AsyncEventSource.h:26,
                 from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/AsyncEventSource.cpp:21:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory


   26 | #include "IPv6Address.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\egon\lib22d\ESPAsyncWebServer-esphome\AsyncEventSource.cpp.o] Error 1
In file included from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/ESPAsyncWebServer.h:33,
                 from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/WebHandlers.cpp:21:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory


   26 | #include "IPv6Address.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\egon\lib22d\ESPAsyncWebServer-esphome\WebHandlers.cpp.o] Error 1
.pio/libdeps/egon/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
.pio/libdeps/egon/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
   74 |   mbedtls_md5_starts_ret(&_ctx);
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   mbedtls_md5_starts
.pio/libdeps/egon/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:75:3: error: 'mbedtls_md5_update_ret' was not declared in this scope; did you mean 'mbedtls_md5_update'?
   75 |   mbedtls_md5_update_ret(&_ctx, data, len);
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   mbedtls_md5_update
In file included from .pio/libdeps/egon/ESPAsyncWebServer-esphome/src/ESPAsyncWebServer.h:33,
                 from .pio/libdeps/egon/ESPUI/src/ESPUI.h:33,
                 from src/main.cpp:10:
.pio/libdeps/egon/AsyncTCP-esphome/src/AsyncTCP.h:26:10: fatal error: IPv6Address.h: No such file or directory

   26 | #include "IPv6Address.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
.pio/libdeps/egon/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:76:3: error: 'mbedtls_md5_finish_ret' was not declared in this scope; did you mean 'mbedtls_md5_finish'?
   76 |   mbedtls_md5_finish_ret(&_ctx, _buf);
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   mbedtls_md5_finish
*** [.pio\build\egon\src\main.cpp.o] Error 1
*** [.pio\build\egon\lib22d\ESPAsyncWebServer-esphome\WebAuthentication.cpp.o] Error 1
================================================= [FAILED] Took 8.23 seconds =================================================

General Questions:

  • Why are you using lib_ignore instead of referencing correct libs in library.json?
  • Why are you using special versions of ESPAsyncWebServer?
  • Why not just referencing all libs with owner/lib@^version, as this is recommended in platform io documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions