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
teensy: prefer project-local lib/FastLED over bundled framework FastLED on Teensy 3.x/LC #199
The result is a linker failure with duplicate definitions (CFastLED, FastLED, power-management helpers, noise/palette symbols, etc.).
Downstream breakage is currently tracked in FastLED/FastLED#2398.
Expected behavior
When a project-local lib/FastLED exists, fbuild should not compile the bundled Teensy framework libraries/FastLED copy for that build.
Acceptable outcomes:
prefer the project-local library and ignore the bundled framework copy, or
fail early with a clear unsupported/ambiguous-library error before link time.
The first option is the desired fix so FastLED can keep Teensy 3.x/LC on the fbuild path.
Observed downstream failure
FastLED CI fails on teensy30 after routing those boards through fbuild unconditionally:
downstream regression: FastLED/FastLED#2398
failing board/job args: teensy30 all
Symptoms in the failing link step:
multiple definition of 'CFastLED::CFastLED()'
multiple definition of 'FastLED'
multiple definition of 'set_max_power_in_volts_and_milliamps(...)'
The same log also shows ODR warnings between checked-out FastLED headers and the framework-bundled FastLED headers, which confirms that both copies are being compiled.
Minimal repro shape
A Teensy 3.x fixture or real build with:
board: teensy30 (or another Teensy 3.x / LC board)
a project-local lib/FastLED/ tree
a sketch that includes <FastLED.h>
Follow-up
Regression coverage for this path is already tracked separately in #195. This issue is for the actual library-selection / build-graph fix.
This turned out not to be an SPI.h conflict in FastLED.
Root cause on main was the Teensy framework-library selector in crates/fbuild-build/src/teensy/orchestrator.rs: it scans the project for #includes, maps header basenames to bundled Teensy framework libraries, and was treating #include <FastLED.h> as a reason to compile the bundled framework libraries/FastLED copy even when the project already had lib/FastLED/FastLED.h.
That meant two independent compilation paths were active in the same build:
local library compilation from lib/FastLED/...
framework-library compilation from framework-arduinoteensy/.../libraries/FastLED/...
The compiler include-path order already prefers project-local headers before bundled framework headers, so this was a build-graph selection bug, not a compile-time header-resolution conflict.
SPI.h still appears as a normal transitive dependency from FastLED, and selecting bundled Teensy SPI is expected. The incorrect part was selecting bundled Teensy FastLED at all.
The fix and regression coverage are in PR #198: #198
Activity
zackees commentedon Apr 24, 2026
Downstream tracking is open in \FastLED/FastLED#2403\.
Related follow-up for upstream regression coverage:
This issue is the actual build-graph/library-selection fix; \#195\ is the test hardening follow-up.
zackees commentedon Apr 24, 2026
#195
zackees commentedon Apr 24, 2026
Investigation summary:
This turned out not to be an
SPI.hconflict in FastLED.Root cause on
mainwas the Teensy framework-library selector incrates/fbuild-build/src/teensy/orchestrator.rs: it scans the project for#includes, maps header basenames to bundled Teensy framework libraries, and was treating#include <FastLED.h>as a reason to compile the bundled frameworklibraries/FastLEDcopy even when the project already hadlib/FastLED/FastLED.h.That meant two independent compilation paths were active in the same build:
lib/FastLED/...framework-arduinoteensy/.../libraries/FastLED/...The compiler include-path order already prefers project-local headers before bundled framework headers, so this was a build-graph selection bug, not a compile-time header-resolution conflict.
SPI.hstill appears as a normal transitive dependency from FastLED, and selecting bundled TeensySPIis expected. The incorrect part was selecting bundled TeensyFastLEDat all.The fix and regression coverage are in PR #198:
#198