Replies: 2 comments 3 replies
-
|
@edg2411 : Hi, please open a support ticket next time or search ;-) 99% of time user think there is an issue in the lib, there is actually a problem in user code. In that case, yes this is known. Happens when you are compiling a program with Or add WiFi.h (or something adding NetworkServer.h). Also, maybe try to work on a reproductible use case because looking at the compile steps: it does not even reach the ESP32Async libs.... It seems more linked to the use of some Arduino includes in files that are compiled but not included in main.cpp maybe ? FYI, ESP32Async libs do not import NetworkServer.h directly. It comes transitively through others. |
Beta Was this translation helpful? Give feedback.
-
|
You can also include ‘WebServer‘ in platformio's ‘lib_ignore‘, it is a platformio's ldf issue |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Platform
ESP32
IDE / Tooling
pioarduino
What happened?
I found a strange behavior when trying to compile a project using this library.
If I include it but don’t include the header in the program, it gives a compilation error — but if I do include it, it compiles fine, even without actually using it. It was tested with different platform versions and with different LDF modes.
Stack Trace
including the header:
Compiling .pio/build/esp32dev/lib452/WebServer/Parsing.cpp.o
Compiling .pio/build/esp32dev/lib452/WebServer/WebServer.cpp.o
Linking .pio/build/esp32dev/firmware.elf
Retrieving maximum program size .pio/build/esp32dev/firmware.elf
Checking size .pio/build/esp32dev/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 6.2% (used 20328 bytes from 327680 bytes)
Flash: [== ] 22.7% (used 297765 bytes from 1310720 bytes)
Building .pio/build/esp32dev/firmware.bin
esptool.py v4.8.1.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
without including the header:
Processing esp32dev (platform: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip; board: esp32doit-devkit-v1; framework: arduino)
Verbose mode can be enabled via
-v, --verboseoptionCONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (51.3.6) > DOIT ESP32 DEVKIT V1
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:
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Found 42 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AsyncTCP @ 3.4.9
|-- ESPAsyncWebServer @ 3.8.1
Building in release mode
Compiling .pio/build/esp32dev/src/main.cpp.o
Compiling .pio/build/esp32dev/lib452/WebServer/Parsing.cpp.o
Compiling .pio/build/esp32dev/lib452/WebServer/WebServer.cpp.o
/home/ezedg/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/Parsing.cpp:24:10: fatal error: NetworkServer.h: No such file or directory
24 | #include "NetworkServer.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
/home/ezedg/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.cpp:28:10: fatal error: NetworkServer.h: No such file or directory
28 | #include "NetworkServer.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/esp32dev/lib452/WebServer/Parsing.cpp.o] Error 1
*** [.pio/build/esp32dev/lib452/WebServer/WebServer.cpp.o] Error 1
Minimal Reproductible Example (MRE)
main.cpp (with and without the line commented)
#include <Arduino.h>
// #include <ESPAsyncWebServer.h>
void setup() {
Serial.begin(9600);
Serial.println("Hello, Arduino!");
}
void loop() {
// Your main code would go here
}
[env:esp32dev]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
board_build.filesystem = littlefs
; build_flags = -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
lib_compat_mode = strict
lib_ldf_mode = chain
lib_deps =
ESP32Async/AsyncTCP
ESP32Async/ESPAsyncWebServer
I confirm that:
Beta Was this translation helpful? Give feedback.
All reactions