From 39b2ccf51592db2c70e25c330426e8a968ba0cfa Mon Sep 17 00:00:00 2001 From: David Montero Crespo Date: Wed, 19 Aug 2026 19:41:23 +0200 Subject: [PATCH] fix(espidf): keep dirs shipping an Arduino.h shadow header off the merged -I path FastLED ships a host-test stub src/platforms/stub/Arduino.h. When another merged library (e.g. U8g2) does #include , the stub resolved first and broke the build: 'yield' was not declared in U8g2lib.cpp and fl::string polluted String overload resolution inside the core WString.h. Reuse the _SHADOW_STD_HEADERS mechanism so the stub's directory stays off the global include path; FastLED reaches it via a file-relative include. --- backend/app/services/espidf_compiler.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/app/services/espidf_compiler.py b/backend/app/services/espidf_compiler.py index ab920a20..73b0f311 100644 --- a/backend/app/services/espidf_compiler.py +++ b/backend/app/services/espidf_compiler.py @@ -1259,6 +1259,15 @@ class ESPIDFCompiler: 'ctype.h', 'errno.h', 'time.h', 'stddef.h', 'stdint.h', 'setjmp.h', 'signal.h', 'locale.h', 'wchar.h', 'stdbool.h', 'stdarg.h', 'float.h', 'algorithm.h', 'memory.h', 'alloca.h', 'new.h', + # Not a C standard header, but the same shadowing mechanism: FastLED + # ships a host-test stub `src/platforms/stub/Arduino.h`. With that dir + # on the global -I, any OTHER merged library's `#include ` + # (e.g. U8g2lib.cpp) resolves to the stub instead of the arduino-esp32 + # core — 'yield' undeclared, and fl::string pollutes String overload + # resolution inside the core's WString.h. FastLED itself only reaches + # the stub via the file-relative "platforms/stub/Arduino.h", which + # still resolves with the directory off -I. + 'arduino.h', }) # arduino-esp32 uses a single library architecture id ("esp32") across