Repository navigation
Description
Context
FastLED PR #3863 CI exposed a current fbuild Teensy regression. The released fbuild 2.5.14 package fails several Teensy 4.1 examples at link time, including examples/Audio:
undefined reference to `set_audioClock(int, long, unsigned long, bool)`
Other examples fail with missing SPIClass::* and Adafruit_NeoPixel::* symbols. This is not an RP2350W source failure.
The same reproduction fails with local fbuild main at 2976d863 using the local debug executable:
FBUILD_EXECUTABLE=C:\\Users\\niteris\\dev\\fbuild\\target\\x86_64-pc-windows-msvc\\debug\\fbuild.exe FBUILD_DEV_MODE=1 bash compile teensy41 --examples Audio
The build reaches the linker, then fails on set_audioClock. fbuild lib-select .build\\pio\\teensy41 -e teensy41 --explain reports zero selected libraries despite the sketch including Audio.h. The Teensy orchestrator adds all bundled framework include directories, so headers compile, but the matching framework library source files are not selected and linked.
Proposal
Correct Teensy framework-library selection for the generated sketch/project source graph, then compile the selected framework sources into the normal link set. Keep the existing shadowing protections from #284: a nested FastLED header must not suppress a real framework library.
Acceptance criteria
- Add a focused RED regression that models the generated Teensy sketch path and an
#include <Audio.h>dependency; it must select and link the framework Audio sources definingset_audioClock. - Make the regression GREEN through the normal fbuild library-selection and Teensy orchestrator path, with no direct linker-library workaround.
- Verify
bash compile teensy41 --examples Audiosucceeds with fbuildmain. - Verify a representative SPI-dependent and Adafruit_NeoPixel-dependent Teensy example links, preventing regressions for
SPIClass::*andAdafruit_NeoPixel::*. - Preserve Teensy 4.x: SPI framework library compiled but not linked — undefined references to SPIClass::* at link time #284's non-shadowing behavior for nested
fl/channels/spi.h.
Related issues
- Teensy 4.x: SPI framework library compiled but not linked — undefined references to SPIClass::* at link time #284 fixed a distinct Teensy framework-SPI shadowing cause. This issue is the current resolver failure to select framework libraries from the generated sketch graph.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Aug 6, 2026
Narrowing the repro: the
set_audioClockthird is now gone from the FastLED side, so this issue's reproduction reduces toSPIClass::*andAdafruit_NeoPixel::*.FastLED/FastLED#3866 (merged,
ccbdc9de34) removed theset_audioClockfailure by vendoring the routine. That was legitimate there for a reason that does not generalize:src/platforms/arm/teensy/audio/is a FastLED-owned subset of the PJRC Audio implementation whose README already commits to not depending on the Audio library. One file had leaked past that invariant with#include "utility/imxrt_hw.h", so importing the single missing routine restored an invariant FastLED had broken itself.That escape hatch is unavailable for the other two:
SPIandAdafruit_NeoPixelare third-party libraries FastLED should not vendor, and FastLED/FastLED#3838's acceptance criteria explicitly forbid per-example include/link shims to appease the scanner. So those two are squarely this issue (and the LDF root cause in #1214).Current state on FastLED
masteratccbdc9de34with released fbuild 2.5.14:Note the shape matches #1214 exactly: the example's sketch does
#define FASTLED_USE_ADAFRUIT_NEOPIXELthen#include "FastLED.h"— the#include <Adafruit_NeoPixel.h>lives inside FastLED's sources, not the sketch, so the header resolves and compilation succeeds while the library's translation unit never reaches the link line.Separately, and relevant to prioritisation here: FastLED cannot currently consume the Arduino-Pico Bluetooth-menu fix (#1263,
2976d863b) because it is merged but unreleased — PyPI and tags are both stillv2.5.14, published before that merge. FastLED pinsfbuild==2.5.14, soboard_build.ipbtstack = ipv4btcbleis ignored and therp2350wbuild dies at_needsbt.h'sstatic_assert. That blocks all RP2350W hardware validation in FastLED/FastLED#3864. A release containing2976d863bwould unblock it.zackees commentedon Aug 10, 2026
Closing — the fix lives in FastLED's source tree, not in fbuild.
FastLED will vendor the needed Teensy framework libraries (SPI, Adafruit_NeoPixel, etc.) into its local
lib/directory. Because FastLED wraps class instances behind singleton accessor functions, the linker can GC unused symbols at all build levels. The vendored libs become normal project libraries compiled alongside the sketch — no LDF resolver changes needed.See FastLED/FastLED#3863 and FastLED/FastLED#3838 for the consumer-side work.