You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LDF misses library-source includes behind #if / __has_include — Teensyduino bundled libs never linked (reopens #1214 class) #1337
Teensyduino bundled framework libraries land on the include path but their sources never reach the link line, so any TU that includes them compiles and then fails with undefined references.
This is the same class as #1214 ("LDF resolves libraries only from sketch includes — library-source #include <SPI.h> never reaches the link line", closed 2026-08-01), but the symptom persists on current releases.
undefined reference to `Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned short, unsigned char, unsigned short)'
undefined reference to `Adafruit_NeoPixel::begin()'
undefined reference to `Adafruit_NeoPixel::show()'
collect2.exe: error: ld returned 1 exit status
All three are omitted the same way, which is why FastLED's teensy41 all sweep reports Audio, Adafruit_NeoPixel and SPI link errors together (FastLED/FastLED#3838). It currently fails all 8 Teensy workflows (teensy30/31/32/35/36/40/41/LC), not just teensy41.
If the LDF scanner skips #if blocks (or cannot evaluate __has_include), it never sees the include — while the compiler's __has_include resolves it, because the header is on the path fbuild provided. The header's presence is what activates the code needing the library, so the two decisions have to agree.
Suggested handling: when a framework libraries/<name> directory is placed on the include path, treat a reference from any compiled TU (sketch or library source, including inside conditionals) as a link dependency — or resolve __has_include consistently between the scanner and the compiler.
Impact
Blocks FastLED master CI: 8 Teensy workflows red. FastLED has no local fix available — per-example include shims and example filters are both explicitly ruled out by FastLED/FastLED#3838's acceptance criteria, and it has no per-example lib_deps mechanism.
Activity
fix(ldf): treat guards on unseen macros as undecidable, and honor #if…
fix(ldf): seed from every compiled TU, and treat __has_include as und…