Skip to content

PIO Core 6.1.14 Issue compiling with EspAsyncWebServer #4885

Closed

Description

@MicroframeDev1

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide information below.

Configuration

Operating system: Win 11 Pro 23H2

PlatformIO Version (platformio --version): 6.1.14

Description of problem

Project compiled fine on Friday. I opened the project today and PIO automatically installed a new version without my consent. It appears PIO Core has updated to 6.1.14. Now my code won't compile. I suspect this is related to changes to LDF.

Steps to Reproduce

  1. Unsure how to provide a minimal example. Our code is quite complex.

Actual Results

Compile fails with:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/AsyncEventSource.h:26:10: fatal error: AsyncTCP.h: No such file or directory
AsyncTCP library is installed.

Expected Results

Linker finds installed libraries and compiles correctly.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env]
board = featheresp32
monitor_speed = 115200
;platform = espressif32
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.02.00/platform-espressif32.zip
framework = arduino
check_skip_packages = yes
monitor_filters = time, colorize, esp32_exception_decoder
lib_deps = 
    ;https://docs.platformio.org/en/latest/projectconf/sections/env/options/library/lib_deps.html
    https://github.com/MicroframeDev1/ESPAsyncWebServer.git#v3.1.0                  ;Was esphome/[email protected]
	bblanchon/ArduinoJson@^6.19.3                                                   ;Allows 6.x.x
board_build.partitions = partitions_custom.csv

[env:MFSB-Release]
build_flags = 
	-D CORE_DEBUG_LEVEL=1

[env:MFSB-DB]
build_type = debug
build_flags =
	-D CORE_DEBUG_LEVEL=3
	-D APPDEBUG=1
	-Wl,--print-memory-usage

Compile fails with both MFSB-DB and MFSB-Release.
Doing a Full Clean and then Build results in the same failure.

Source file to reproduce issue:

Unable to share proprietary code.

Additional info

Build log:
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32.html
PLATFORM: Espressif 32 (2023.2.0) > Adafruit ESP32 Feather
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 @ 2.0.7
  • tool-esptoolpy @ 1.40501.0 (4.5.1)
  • tool-mklittlefs @ 1.203.210628 (2.3)
  • tool-mkspiffs @ 2.230.0 (2.30)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 61 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- ESPAsyncWebServer-Microframe @ 3.1.0+sha.7451931
    |-- ArduinoJson @ 6.21.3
    |-- FSUtils
    |-- iNet
    |-- Microframe
    |-- SB
    |-- SysTicks
    |-- WDT
    Building in debug mode
    Compiling .pio\build\MFSB-DB\src\main.cpp.o
    Building .pio\build\MFSB-DB\bootloader.bin
    Generating partitions .pio\build\MFSB-DB\partitions.bin
    esptool.py v4.6-dev
    Creating esp32 image...
    Merged 1 ELF section
    Successfully created esp32 image.
    Compiling .pio\build\MFSB-DB\lib060\FS\FS.cpp.o
    Compiling .pio\build\MFSB-DB\lib060\FS\vfs_api.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFi.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiAP.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiClient.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiGeneric.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiMulti.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiSTA.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiScan.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiServer.cpp.o
    Compiling .pio\build\MFSB-DB\lib20c\WiFi\WiFiUdp.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\AsyncEventSource.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\AsyncWebSocket.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebAuthentication.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebHandlers.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebRequest.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebResponses.cpp.o
    Compiling .pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebServer.cpp.o
    Compiling .pio\build\MFSB-DB\libfc9\TimeUtils\TimeUtils.cpp.o
    Compiling .pio\build\MFSB-DB\lib5aa\WDT\WDT.cpp.o
    Compiling .pio\build\MFSB-DB\lib57e\SPIFFS\SPIFFS.cpp.o
    Archiving .pio\build\MFSB-DB\lib060\libFS.a
    Compiling .pio\build\MFSB-DB\libb9b\FSUtils\FSUtils.cpp.o
    Archiving .pio\build\MFSB-DB\lib5aa\libWDT.a
    Compiling .pio\build\MFSB-DB\lib10c\Buttons\Buttons.cpp.o
    Compiling .pio\build\MFSB-DB\liba39\MacAddress\MacAddress.cpp.o
    In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/AsyncEventSource.cpp:21:
    .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/AsyncEventSource.h:26:10: fatal error: AsyncTCP.h: No such file or directory


#include <AsyncTCP.h>
^~~~~~~~~~~~
compilation terminated.
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\AsyncEventSource.cpp.o] Error 1
In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/AsyncWebSocket.cpp:22:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/AsyncWebSocket.h:26:10: fatal error: AsyncTCP.h: No such file or directory



#include <AsyncTCP.h>
^~~~~~~~~~~~
compilation terminated.
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\AsyncWebSocket.cpp.o] Error 1
In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/WebHandlers.cpp:21:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/ESPAsyncWebServer.h:33:10: fatal error: AsyncTCP.h: No such file or directory



#include <AsyncTCP.h>
^~~~~~~~~~~~
compilation terminated.
In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/WebResponses.cpp:21:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/ESPAsyncWebServer.h:33:10: fatal error: AsyncTCP.h: No such file or directory



#include <AsyncTCP.h>
^~~~~~~~~~~~
In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/WebRequest.cpp:21:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/ESPAsyncWebServer.h:33:10: fatal error: AsyncTCP.h: No such file or directory



#include <AsyncTCP.h>
^~~~~~~~~~~~
In file included from .pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/WebServer.cpp:21:
.pio/libdeps/MFSB-DB/ESPAsyncWebServer-Microframe/src/ESPAsyncWebServer.h:33:10: fatal error: AsyncTCP.h: No such file or directory



#include <AsyncTCP.h>
^~~~~~~~~~~~
compilation terminated.
compilation terminated.
compilation terminated.
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebHandlers.cpp.o] Error 1
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebRequest.cpp.o] Error 1
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebResponses.cpp.o] Error 1
*** [.pio\build\MFSB-DB\libd7c\ESPAsyncWebServer-Microframe\WebServer.cpp.o] Error 1
============================================================================================================== [FAILED] Took 6.95 seconds ==============================================================================================================

Environment Status Duration


MFSB-DB FAILED 00:00:06.953

Activity

  1. MicroframeDev1 commented on Mar 25, 2024

    @MicroframeDev1
    Author

    Note we branched ESPAsyncWebServer and AsyncTCP to our own repository to workaround a bad update in AsyncTCP.cpp released by ESPHome. We've been using our branched/patched version for 2 months without issues.

  2. ivankravets commented on Mar 25, 2024

    @ivankravets
    Member

    Could you provide a simple project (ZIP archive attached to this issue as a comment) to reproduce the problem?

  3. added this to the 6.1.15 milestone on Mar 25, 2024
  4. MicroframeDev1 commented on Mar 25, 2024

    @MicroframeDev1
    Author

    Adding lib_ldf_mode = deep+ to build flags makes no difference. It still can't find AsyncTCP.h.

  5. MicroframeDev1 commented on Mar 25, 2024

    @MicroframeDev1
    Author

    Could you provide a simple project (ZIP archive attached to this issue as a comment) to reproduce the problem?

    I'll attempt to strip the project down.

  6. MicroframeDev1 commented on Mar 25, 2024

    @MicroframeDev1
    Author

    Update: it appears the failing project references a library in platformio.ini but doesn't call it in code yet. I have a similar project that does use #include <ESPAsyncWebServer.h> and it compiles properly.

  7. MicroframeDev1 commented on Mar 25, 2024

    @MicroframeDev1
    Author

    MFSB2.zip

    Note the project references a custom branch of ESPAsyncWebServer but doesn't actually call the include header. This project will fail to build.

    Edit: is this an Uno Reverse card? The build system tries to link a library that isn't used?

  8. ivankravets commented on Mar 26, 2024

    @ivankravets
    Member

    Thanks for the provided project. The issue was linked with the nested dependency declared via VCS repository. See https://github.com/MicroframeDev1/ESPAsyncWebServer/blob/v3.1.0/library.json#L28

    The solution is to avoid using VCS declarations, especially for nested dependencies. You can try a direct branch https://github.com/MicroframeDev1/ESPAsyncWebServer , it contains valid dependencies declared via semantic versioning.

  9. ivankravets commented on Mar 26, 2024

    @ivankravets
    Member

    You can also re-test this issue via pio upgrade --dev.

  10. MicroframeDev1 commented on Mar 26, 2024

    @MicroframeDev1
    Author

    pio upgrade --dev failed but gave instructions on how to upgrade from command line. Success. Now running PIO Core 6.1.15a1. Project compiles correctly when referencing our branch of ESPAsyncWebServer. Thank you for the quick fix!

  11. added a commit that references this issue on Mar 26, 2024
    c475578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions