PlatformIO Community

PIO 4.2.0 - complile error for AsyncTCP_ID1826

Hi, I’m getting this error when compiling and was hoping someone could shed some light on this.
This project compiled fine with 4.1.0 but after upgrading to 4.2.0 … this fails to compile

C:\Users\Mark.platformio\lib\AsyncTCP_ID1826\src\AsyncTCP.h:26:23: fatal error: sdkconfig.h: No such file or directory



#include “sdkconfig.h”
^
compilation terminated.

Platformio.ini is:
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino

monitor_speed = 115200

lib_deps = MFRC522, ESP Async WebServer, ESP8266TrueRandom


No problems compiling the project on 4.10

Any help would be appreciated.
Mark

As you see in https://github.com/me-no-dev/AsyncTCP, this is a library for the ESP32, not the ESP8266. Thus it’s searching for the sdkconfig.h but fails on your ESP8266.

Use lib_ignore = AsynTCP in the platformio.ini and / or uninstall the AsyncTCP library from the global PlatformIO library storage, and prefer declaring dependencies per-project instead.

1 Like

Thank you! that did the trick. Added the lib_ignore and I removed all the global libraries, in fact I removed all the libraries and cleaned the build directory. Compiled no errors.

Just wondering why the dependency graph shows the AsyncTCP file with the 8266 project? Is that just a configuration err and why 4.1.0 never complained about the missing SDKconfig file. The graph below was before the lib_ignore setting, now it doesn’t show the file as a dependency.

Edit: tried to show the graph here but it didn’t display… It showed the AsyncTCP as a dependency of ESP Async WebServer

Thanks again, you saved me many hours of trial and error.
Mark

Since you have installed AsyncTCP in the global library storage, it may have been included by the library dependency finder (LDF) when it saw the include for #include <AsyncTCP.h> (ESP Async WebServer has code to include both the ESP32 and ESP8266 libraries), even though it was enclosed in #ifdefs for the ESP32. If you want this behavior to be correct but slower, you need to set lib_ldf_mode = chain+ (docs) which respect the surrounding macros.

1 Like

Sorry, this is our bug and has been fixed in https://github.com/platformio/platformio-core/commit/5cc9a328ab4d64c42f3cda714f65e150eca31128

We plan to publish bug fix release of PIO Core 4.2.1 next week, A temporary solution is to use lib_ignore = AsynTCP or lib_compat_mode = strict in platformio.ini.

[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
monitor_speed = 115200
lib_deps = MFRC522, ESP Async WebServer, ESP8266TrueRandom

lib_compat_mode = strict

You can also switch to PIO Core development version via pio upgrade --dev command.

1 Like

Thanks Ivan…I’ll use the lib_ignore for now, I tried chain+ as Max suggested and even deep+ but it didn’t make a difference. Now I know why, thanks for fixing it so quickly. I’ve only been using platformio for 3 or 4 months now and I have to say a bit of a learning curve but well worth it!

1 Like