pioarduino/platform-espressif32

error while compile, no such file or directory with build-in header-files

Closed this issue · 3 comments

PROBLEM DESCRIPTION

Compiling error - unable to find header-files,but them are in the framework

TO REPRODUCE

one of the error-Messages:

Compiling .pio/build/esp32-c6-devkitm-1/lib0a9/WebServer/middleware/CorsMiddleware.cpp.o
/home/.../.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.
*** [.pio/build/esp32-c6-devkitm-1/lib0a9/WebServer/Parsing.cpp.o] Error 1

EXPECTED BEHAVIOUR

My platformio.ini is:

`[env:esp32-c6-devkitm-1]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

lib_compat_mode = strict
lib_ldf_mode = chain
board = esp32-c6-devkitm-1
framework = arduino
build_flags =
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
-D CONFIG_ASYNC_TCP_PRIORITY=10
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
-D CONFIG_ASYNC_TCP_RUNNING_CORE=1
-D CONFIG_ASYNC_TCP_STACK_SIZE=4096

lib_deps =
adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
ESP32Async/ESPAsyncWebServer
ESP32Async/AsyncTCP
bblanchon/ArduinoJson@^7.4.2
monitor_speed = 115200
`

SCREENSHOTS

ADDITIONAL CONTEXT

I looked for the files, they are in the framework directrory.

Not a pioarduino issue, probably caused by one of the lib_deps. Try to find out which one causes the problem and open and issue in the repo of the maintainer of the lib.

One mandantory thing there has to be a space before every listed dependency!
Correct is:

[env:esp32-c6-devkitm-1]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

lib_compat_mode = strict
lib_ldf_mode = chain
board = esp32-c6-devkitm-1
framework = arduino
build_flags =
  -D ARDUINO_USB_MODE=1
  -D ARDUINO_USB_CDC_ON_BOOT=1
  -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
  -D CONFIG_ASYNC_TCP_PRIORITY=10
  -D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
  -D CONFIG_ASYNC_TCP_RUNNING_CORE=1
  -D CONFIG_ASYNC_TCP_STACK_SIZE=4096

lib_deps =
  adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
  ESP32Async/ESPAsyncWebServer
  ESP32Async/AsyncTCP
  bblanchon/ArduinoJson@^7.4.2
  monitor_speed = 115200

Thx for your answer. The spaces were lost by copy+paste.

But the not found header files for me are not a library problem. The compiler don't parse all the directories per default and couldn't find the neccessary header files.

my solution:
changed the platformio.ini to

lib_ldf_mode = deep

->https://docs.platformio.org/en/latest/librarymanager/ldf.html#dependency-finder-mode

Well there is something off in one of the 3rd party libs. deep should not be needed at all. There are missing dependencies declarations in one of the libs. deep more or less "heals" this faulty configuration of the lib.
The arduino core does compile successfully with chain. The need for deep is caused by one of the libs!

I maintain the Platformio setup for project Tasmota (which uses maaany libs), the project compiles with chain. The solution to achieve this was "just" to fix all lib dependencies.
And if one of the libs is faulty, the issues happens during compile not! where the real bug is!

My experience deep does more harm than it solves!