Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIO Core 6.1.14 Issue compiling with EspAsyncWebServer #4885

Closed
1 task done
MicroframeDev1 opened this issue Mar 25, 2024 · 9 comments
Closed
1 task done

PIO Core 6.1.14 Issue compiling with EspAsyncWebServer #4885

MicroframeDev1 opened this issue Mar 25, 2024 · 9 comments

Comments

@MicroframeDev1
Copy link

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/ESPAsyncWebServer-esphome@2.1.0
	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

@MicroframeDev1
Copy link
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.

@ivankravets
Copy link
Member

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

@MicroframeDev1
Copy link
Author

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

@MicroframeDev1
Copy link
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.

@MicroframeDev1
Copy link
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.

@MicroframeDev1
Copy link
Author

MicroframeDev1 commented Mar 25, 2024

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?

@ivankravets
Copy link
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.

@ivankravets
Copy link
Member

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

@MicroframeDev1
Copy link
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants