ESP32 PlatformIO Compilation Failure LwIP.h: No such file or directory
pprakash opened this issue · comments
Describe the bug
Trying to compile AsyncMqtt_Generic library on ESP32 using PlatformIO.
Steps to Reproduce
Used FullyFeaturedSSL_ESP32.ino and tried compiling the same.
Expected behavior
Successful compile of the sketch.
Actual behavior
Getting error during compiliation.
Debug and AT-command log (if applicable)
` * Executing task in folder ESP32 Testings: C:\Users\lenovo.platformio\penv\Scripts\platformio.exe run
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Library Manager: Installing khoih-prog/AsyncMQTT_Generic @ ^1.6.1
Unpacking [####################################] 100%
Library Manager: AsyncMQTT_Generic@1.7.0 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing me-no-dev/AsyncTCP @ >=1.1.1
Unpacking [####################################] 100%
Library Manager: AsyncTCP@1.1.1 has been installed!
Library Manager: Installing git+https://github.com/khoih-prog/ESPAsyncTCP
git version 2.37.1.windows.1
Cloning into 'C:\Users\lenovo.platformio.cache\tmp\pkg-installing-30z7lx_o'...
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (46/46), done.
Receiving objects: 100% (51/51)sed 23 (delta 1), pack-reused 0
Receiving objects: 100% (51/51), 51.97 KiB | 403.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
Library Manager: ESPAsyncTCP@1.3.0+sha.7cbee24 has been installed!
Library Manager: Installing khoih-prog/AsyncTCP_SSL @ >=1.3.0
Unpacking [####################################] 100%
Library Manager: AsyncTCP_SSL@1.3.1 has been installed!
Library Manager: Installing khoih-prog/ESPAsync_WiFiManager @ >=1.14.0
Unpacking [####################################] 100%
Library Manager: ESPAsync_WiFiManager@1.14.1 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing me-no-dev/ESP Async WebServer @ >=1.2.3
Unpacking [####################################] 100%
Library Manager: ESP Async WebServer@1.2.3 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing khoih-prog/ESP_DoubleResetDetector @ >=1.3.2
Unpacking [####################################] 100%
Library Manager: ESP_DoubleResetDetector@1.3.2 has been installed!
Library Manager: Installing khoih-prog/WebServer_WT32_ETH01 @ >=1.5.1
Unpacking [####################################] 100%
Library Manager: WebServer_WT32_ETH01@1.5.1 has been installed!
Library Manager: Installing git+https://github.com/khoih-prog/STM32AsyncTCP
git version 2.37.1.windows.1
Cloning into 'C:\Users\lenovo.platformio.cache\tmp\pkg-installing-rapgaval'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 61 (delta 9), reused 53 (delta 9), pack-reused 0
Receiving objects: 100% (61/61), 52.72 KiB | 228.00 KiB/s, done.
Resolving deltas: 100% (9/9), done.
Library Manager: STM32AsyncTCP@1.0.1+sha.e88a8bc has been installed!
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.1.1) > Espressif ESP32 Dev Module
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 @ 3.20004.220825 (2.0.4)
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AsyncMQTT_Generic @ 1.7.0
| |-- AsyncTCP @ 1.1.1
| |-- AsyncTCP_SSL @ 1.3.1
| | |-- WiFiClientSecure @ 2.0.0
| | | |-- WiFi @ 2.0.0
| | | | |-- STM32AsyncTCP @ 1.0.1+sha.e88a8bc
| |-- ESPAsync_WiFiManager @ 1.14.1
| | |-- AsyncTCP @ 1.1.1
| | |-- ESP Async WebServer @ 1.2.3
| | | |-- AsyncTCP @ 1.1.1
| | | |-- STM32AsyncTCP @ 1.0.1+sha.e88a8bc
| | | |-- WiFi @ 2.0.0
| | | | |-- STM32AsyncTCP @ 1.0.1+sha.e88a8bc
| | |-- ESP_DoubleResetDetector @ 1.3.2
| |-- WebServer_WT32_ETH01 @ 1.5.1
| |-- STM32AsyncTCP @ 1.0.1+sha.e88a8bc
|-- WiFi @ 2.0.0
| |-- STM32AsyncTCP @ 1.0.1+sha.e88a8bc
Building in debug mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Updating bootloader headers
Generating partitions .pio\build\esp32dev\partitions.bin
esptool.py v3.3
Flash params set to 0x0220
Wrote 0x4400 bytes to file .pio\build\esp32dev\patched_bootloader.bin, ready to flash to offset 0x1000
Compiling .pio\build\esp32dev\libff3\AsyncTCP\AsyncTCP.cpp.o
Compiling .pio\build\esp32dev\lib154\STM32AsyncTCP\AsyncPrinter.cpp.o
Compiling .pio\build\esp32dev\lib154\STM32AsyncTCP\STM32AsyncTCP.cpp.o
In file included from .pio/libdeps/esp32dev/AsyncMQTT_Generic/src/AsyncMqtt_Generic.h:34,
from src/main.cpp:33:
.pio/libdeps/esp32dev/AsyncMQTT_Generic/src/AsyncMqttClient_Generic.hpp:79:6: warning: #warning ESP32 ASYNC_TCP_SSL_ENABLED [-Wcpp]
#warning ESP32 ASYNC_TCP_SSL_ENABLED
^~~~~~~
In file included from .pio/libdeps/esp32dev/STM32AsyncTCP/src/AsyncPrinter.h:26,
from .pio/libdeps/esp32dev/STM32AsyncTCP/src/AsyncPrinter.cpp:22:
.pio/libdeps/esp32dev/STM32AsyncTCP/src/STM32AsyncTCP.h:29:10: fatal error: LwIP.h: No such file or directory
- Looking for LwIP.h dependency? Check our library registry!
- CLI > platformio lib search "header:LwIP.h"
- Web > https://registry.platformio.org/search?q=header:LwIP.h
#include <LwIP.h>
^~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib154\STM32AsyncTCP\AsyncPrinter.cpp.o] Error 1
In file included from .pio/libdeps/esp32dev/STM32AsyncTCP/src/STM32AsyncTCP.cpp:75:
.pio/libdeps/esp32dev/STM32AsyncTCP/src/STM32AsyncTCP.h:29:10: fatal error: LwIP.h: No such file or directory
- Looking for LwIP.h dependency? Check our library registry!
- CLI > platformio lib search "header:LwIP.h"
- Web > https://registry.platformio.org/search?q=header:LwIP.h
#include <LwIP.h>
^~~~~~~~
compilation terminated.
*** [.pio\build\esp32dev\lib154\STM32AsyncTCP\STM32AsyncTCP.cpp.o] Error 1
======================================================================================= [FAILED] Took 64.87 seconds =======================================================================================`
Information
Please ensure to specify the following:
- Platform IO 6.1.4
ESP32
2.0.4- Compile FullyFeaturedSSL_ESP32 sketch
- Add these entries to platformio.ini and compile the sketch
monitor_speed = 115200 monitor_filters = esp32_exception_decoder ; For Debugging crashes build_type = debug ; For Debugging crashes board_build.filesystem = littlefs lib_deps = khoih-prog/AsyncMQTT_Generic @ ^1.6.1
- Running on Windows 10
Again and again, do some research before posting the similar issue many people already posted.
Try using Arduino IDE first, until everything is OK, use PIO, which requires much more knowledge, skills and manual settings.
Post your issue in PIO, unless Arduino IDE has problem. Continue wasting other people's time will get you blocked from accessing the library.
@khoih-prog .. Thanks for looking into this. I couldn't find a direct solution towards this problem during my search.
For people like me.. below is what made this wonderful library work with PlatformIO + Visual Studio combination.
Added below two lines to platformio.ini.
lib_ldf_mode = deep+ lib_compat_mode = strict
They are aready in
AsyncMQTT_Generic/platformio/platformio.ini
Lines 41 to 44 in e61c24e
You have to be familiar with PIO and to modify with try-and-error
. PIO is not just as easy to use and sophisticated as Arduino IDE
yet.