Skip to content

3.10.7 does not compile my simple sketch in Platformio #4826

Closed

Description

@chemdoc77

Board / MCU

ESP32

LED Chipset

WS2812B / NeoPixel

FastLED Version

3.10.7

Arduino / PlatformIO version

Platformio 6.2.0

Operating System

Windows

Description

New 3.10.7 failed to compile my sketch that compiles with 3.10.3. Here is a link to the sketch:
https://github.com/chemdoc77/CD77_FastLED_2026/tree/main/NEOPIXEL%20Product%20Test
The above sketch is set for 3.10.3 and it compiles. If you change it to use 3.10.7, it fails.

Here is the error message:
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin_d32.html
PLATFORM: Espressif 32 (6.13.0) > WEMOS LOLIN D32
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 @ 3.20017.241212+sha.dcc1105b
  • tool-esptoolpy @ 2.41100.0 (4.11.0)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 34 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- FastLED @ 3.10.7
    Building in release mode
    Compiling .pio\build\lolin_d32\lib434\FastLED\fl\build\fl.fs.sd+.cpp.o
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:10,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/fs_sdcard_arduino.cpp.hpp:162:10: error: looser throw specifier for 'virtual bool fl::SDFileHandle::has_error() const'
    bool has_error() const override { return false; }
    ^~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fstream.h:5,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fs.h:8,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/file_system_sd.cpp.hpp:22,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:9,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/file_handle.h:46:18: note: overridden function is 'virtual bool fl::filebuf::has_error() const noexcept'
    virtual bool has_error() const FL_NO_EXCEPT = 0;
    ^~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:10,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/fs_sdcard_arduino.cpp.hpp:163:10: error: looser throw specifier for 'virtual void fl::SDFileHandle::clear_error()'
    void clear_error() override {}
    ^~~~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fstream.h:5,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fs.h:8,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/file_system_sd.cpp.hpp:22,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:9,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/file_handle.h:47:18: note: overridden function is 'virtual void fl::filebuf::clear_error() noexcept'
    virtual void clear_error() FL_NO_EXCEPT = 0;
    ^~~~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:10,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/fs_sdcard_arduino.cpp.hpp:164:9: error: looser throw specifier for'virtual int fl::SDFileHandle::error_code() const'
    int error_code() const override { return 0; }
    ^~~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fstream.h:5,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fs.h:8,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/file_system_sd.cpp.hpp:22,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:9,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/file_handle.h:50:17: note: overridden function is 'virtual int fl::filebuf::error_code() const noexcept'
    virtual int error_code() const FL_NO_EXCEPT = 0;
    ^~~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:10,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/fs_sdcard_arduino.cpp.hpp:165:17: error: looser throw specifier for 'virtual const char* fl::SDFileHandle::error_message() const'
    const char* error_message() const override { return "No error"; }
    ^~~~~~~~~~~~~
    In file included from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fstream.h:5,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/fs.h:8,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/file_system_sd.cpp.hpp:22,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/fs/sd/_build.cpp.hpp:9,
    from .pio/libdeps/lolin_d32/FastLED/src/fl/build/fl.fs.sd+.cpp:18:
    .pio/libdeps/lolin_d32/FastLED/src/fl/fs/file_handle.h:51:25: note: overridden function is 'virtual const char* fl::filebuf::error_message() const noexcept'
    virtual const char* error_message() const FL_NO_EXCEPT = 0;
    ^~~~~~~~~~~~~
    Compiling .pio\build\lolin_d32\lib434\FastLED\fl\build\platforms.esp.32.net+.cpp.o
    *** [.pio\build\lolin_d32\lib434\FastLED\fl\build\fl.fs.sd+.cpp.o] Error 1
    ========================================= [FAILED]

Steps to reproduce

Ran in Platformio with FastLED 3.10.7 and it failed, Ran in Platformio with FastLED 3.10.3 and it compiled.
I used this sketch:
https://github.com/chemdoc77/CD77_FastLED_2026/tree/main/NEOPIXEL%20Product%20Test

Minimal sketch

Serial / debug output

Checklist

  • I have searched existing issues for duplicates
  • I have tested with the latest FastLED release or git master
  • I can reproduce this with a minimal sketch

Activity

  1. added
    status: triage
    type: bug
    on Oct 11, 2026
  2. YarosMallorca commented on Oct 11, 2026

    @YarosMallorca

    Can reproduce this on my instance too.

  3. MomePP commented on Oct 12, 2026

    @MomePP

    Same failure here with 3.10.7 from the PlatformIO registry, on a newer toolchain. So it isn't specific to GCC 8 / Arduino-ESP32 2.x:

    • ESP32-S3 (N16R8), PlatformIO with pioarduino platform-espressif32 55.03.312 (Arduino-ESP32 3.3.12 / ESP-IDF 5.5.5)
    • xtensa-esp-elf-g++ 14.2.0 (esp-14.2.0_20260121), default LDF mode (chain)

    Root cause:

    • On ESP, fl/stl/noexcept.h defines FL_NO_EXCEPT as noexcept. The pure virtuals in fl/fs/file_handle.h (has_error, clear_error, error_code, error_message) are declared FL_NO_EXCEPT.
    • Their overrides in fl/fs/sd/fs_sdcard_arduino.cpp.hpp don't have it. That's SDFileHandle, lines 162–165, and the same four in SdFatFileHandle (USE_SDFAT), lines 96–99..
    • An override can't have a looser exception specification than the function it overrides. GCC 8 reports "looser throw specifier", GCC 14 "looser exception specification". Master still has the same 8 lines.

    Why a plain sketch hits it:

    • The backend is guarded by FL_HAS_INCLUDE(<SD.h>) && FL_HAS_INCLUDE(<fs.h>) && FL_HAS_INCLUDE(<SPI.h>).
    • PlatformIO's LDF in chain mode follows the #include <SD.h> inside that guard and adds the core's SD library as a FastLED dependency. Our dependency graph shows FastLED -> SD, already on 3.10.6.
    • That puts SD.h on the include path, so the guard is true for sketches that never use SD.

    Fix: add FL_NO_EXCEPT to all 8 overrides:

    bool has_error() const FL_NO_EXCEPT override { return false; }
    void clear_error() FL_NO_EXCEPT override {}
    int error_code() const FL_NO_EXCEPT override { return 0; }
    const char* error_message() const FL_NO_EXCEPT override { return "No error"; }

    With this applied to the downloaded 3.10.7, our firmware builds and runs on hardware.

    Workarounds until a release:

    • pin fastled/FastLED @ 3.10.6, or
    • add -D FL_NO_EXCEPT= to build_flags. noexcept.h only defines the macro #ifndef, so 3.10.7 then compiles.
  4. moved this from Triage to Done in FastLED Trackeron Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: triagetype: bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions