Skip to content

fix(esp32): per-chip libs slices install only mcu, so ESP32-P4 ES boards have no esp32p4_es SDK tree #1897

Closed

Description

@zackees

Symptom

ESP32-P4 / build fails on every fresh cache:

build error: build failed: compilation failed for .../cores/esp32/HardwareSerial.cpp:
  .../variants/esp32p4/pins_arduino.h:5:10: fatal error: soc/soc_caps.h: No such file or directory

All other board jobs pass. Failing run: https://github.com/FastLED/fbuild/actions/runs/41863325814/job/126692350332 (PR #1896, head on 08f137df).

Root cause

The per-chip libs slices (#1890/#1895) fetch a slice keyed on build.mcu (esp32p4) and extract exactly ONE
tools/esp32-arduino-libs/<mcu>/ tree. But an ESP32-P4 ES board
(tests/platform/esp32p4, esp32-p4-evboard, esp32-p4, m5stack-tab5-p4) declares
build.chip_variant = esp32p4_es, and the build takes every SDK include/lib/linker-script path
from board.sdk_variant() — i.e. tools/esp32-arduino-libs/esp32p4_es/, which the slice never installs.

With the whole 3 GB bundle both directories are present, so the bug was invisible locally and in CI
until the slice path went live; sdk_libs_installed(mcu) compounded it by reporting "present" for the
esp32p4 tree alone.

Evidence

Fresh isolated cache (FBUILD_CACHE_DIR, manifest on) at 08f137df:

tools/.libs-archives/.../[email protected]+esp32p4/
tools/esp32-arduino-libs/esp32p4/          <- only this one
# build then dies on soc/soc_caps.h

Fix

required_sdk_variants(mcu, sdk_variant) installs/completes BOTH trees; ensure_libs fetches the
esp32p4 slice and (when the tree is still missing) the esp32p4_es slice, re-checking between
fetches so a whole-bundle archive still costs one download. sdk_libs_installed now takes the chip
variant and requires every required tree, so fbuild install --check stops claiming present.

Verified on a fresh isolated cache: both slices land (+esp32p4, +esp32p4_es) and the core
compiles 60/60 → build succeeded in 7.8s.

Scope

Only boards whose chip_variant differs from mcu are affected (the four P4 ES boards); every other
MCU has sdk_variant() == mcu, where the old single-variant logic was already correct.

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

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions