Repository navigation
Description
Summary
#2175 fixed #2156 for ESP32: with LongPathsEnabled = 0 (the Windows default),
fbuild 2.5.55 installs the ESP32 toolchain and framework and builds. The same
check still stops three other board families at package install:
- Raspberry Pi Pico W (
earlephilhower-arduino-pico4.5.3) - Teensy 4.1 (
framework-arduinoteensy1.160.0) - STM32 Black Pill F411 (
Arduino_Core_STM322.9.0)
Their toolchains install. The core package is refused, so nothing compiles.
Only the ESP32 packages opted in to the short install layout that #2175 added.
Thank you for the quick ESP32 fix. Under the same conditions these now build
here on 2.5.55: ESP32, ESP32-S2, S3, C3, C6 and H2, ESP8266, Uno, Nano Every,
Feather M0, nRF52840 DK and UNO R4 WiFi.
Environment
- fbuild 2.5.55 (
fbuild 2.5.55+git.8f5979e1fe0c). The files named below are
unchanged onmainat9d94ad24(2026-11-25). - Windows 11 Home (10.0.26300),
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled = 0 - No
FBUILD_CACHE_DIR. fbuild choseC:\fbuild-cache\8cffdc466966\p\c
(32 characters).
Reproduction
platformio.ini:
[env:rpipicow]
platform = raspberrypi
board = rpipicow
framework = arduino
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
[env:blackpill_f411ce]
platform = ststm32
board = blackpill_f411ce
framework = arduinosrc/main.cpp:
#include <Arduino.h>
void setup() {}
void loop() {}Then, one at a time:
fbuild build -e rpipicow --no-timestamp
fbuild build -e teensy41 --no-timestamp
fbuild build -e blackpill_f411ce --no-timestamp
Output
Each exits with code 1. Download progress lines are left out.
WARNING: Windows long-path support is disabled. Using short-path fallback cache: C:\fbuild-cache\8cffdc466966\p\c. Extraction scratch: C:\fbuild-cache\8cffdc466966\p\t. Requested cache: C:\Users\User\.fbuild\prod\cache. Deep build outputs are redirected under C:\fbuild-cache\8cffdc466966\p\b. Run fbuild --fix-win to enable Windows long paths.
=========================
= BUILDING rpipicow =
=========================
Board: Raspberry Pi Pico W / RP2040 @ 133MHz
Memory: 2.00MB Flash, 256.00KB RAM
Toolchain: arm-none-eabi-gcc 14.2.0
rp2040-core 4.5.3: extracting rp2040-core 4.5.3
build error: package error: Windows short-path fallback cannot safely use extracted path C:\fbuild-cache\8cffdc466966\p\c\platforms\earlephilhower-arduino-pico\3390eb851c5aa882\4.5.3_staging\rp2040-4.5.3\libraries\FreeRTOS\lib\FreeRTOS-Kernel\portable\GCC\RISC-V\chip_specific_extensions\Pulpino_Vega_RV32M1RM\freertos_risc_v_chip_specific_extensions.h. Run fbuild --fix-win or use a shorter package location.
=========================
= BUILDING teensy41 =
=========================
Board: Teensy 4.1 / IMXRT1062 @ 600MHz
Memory: 7.75MB Flash, 512.00KB RAM
Toolchain: arm-none-eabi-gcc 11.3.1
framework-arduinoteensy 1.160.0: extracting framework-arduinoteensy 1.160.0
build error: package error: Windows short-path fallback cannot safely use extracted path C:\fbuild-cache\8cffdc466966\p\c\platforms\dl-framework-arduinoteensy-1.160.0\1b0675c97b0fd8d7\1.160.0_staging\libraries\FlexCAN_T4\examples\isotp_server_multiple_buffers_to_individual_busses_example\isotp_server_multiple_buffers_to_individual_busses_example.ino. Run fbuild --fix-win or use a shorter package location.
=================================
= BUILDING blackpill_f411ce =
=================================
Board: WeAct Studio BlackPill V2.0 (STM32F411CE) / STM32F411CEU6 @ 100MHz
Memory: 512.00KB Flash, 128.00KB RAM
Toolchain: arm-none-eabi-gcc 15.2.1
stm32-core 2.9.0: extracting stm32-core 2.9.0
build error: package error: Windows short-path fallback cannot safely use extracted path C:\fbuild-cache\8cffdc466966\p\c\platforms\stm32duino-Arduino_Core_STM32\189aab1e7ae66a25\2.9.0_staging\Arduino_Core_STM32-2.9.0\variants\STM32MP1xx\MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D). Run fbuild --fix-win or use a shorter package location.
The refused paths are 263, 262 and 252 characters long. The first two are
files; the third is a folder.
Cause
All file and line references are at v2.5.55.
The check. crates/fbuild-packages-fetch/src/extractor.rs, lines 11 to
47: validate_extraction_tree allows legacy_path_units(path) + 1 up to 248
for a folder and 260 for a file (lines 12, 13 and 39). So the longest folder
it accepts is 247 characters and the longest file 259.
Only ESP32 opts in to the short layout.
crates/fbuild-packages-fetch/src/compact_install.rs adds
PackageBase::with_compact_windows_install (line 20). The ESP32 toolchain
calls it (crates/fbuild-toolchain/src/toolchain/esp32.rs, lines 51, 81, 125
and 150) and so does the ESP32 framework
(crates/fbuild-library/src/library/esp32_framework/mod.rs, lines 60, 78,
101 and 125). These three do not:
crates/fbuild-library/src/library/rp2040_core.rs:PackageBase::newat
lines 30 and 49, installed bystaged_installat line 206crates/fbuild-library/src/library/teensy_core.rs: lines 30 and 49,
staged_installat line 175crates/fbuild-library/src/library/stm32_core.rs: lines 29 and 48,
staged_installat line 153
A package that does not opt in is checked in its staging folder.
install_staging_path (compact_install.rs, lines 52 to 59) names the
staging folder <version>_staging for these packages. staged_install_impl
extracts into it (crates/fbuild-packages-fetch/src/lib.rs, lines 536 and
575), and extract_install_archive passes that folder to
extractor::extract (compact_install.rs, lines 66 and 67), which validates
the tree where it sits (extractor.rs, lines 49 to 51 and 66 to 69). The
staging path is 8 characters longer than the installed one.
The reserved space is too small for these packages.
crates/fbuild-paths/src/long_paths.rs, lines 17 and 18: the root limit
"Leaves at least 180 characters for SDK/package paths below a cache root".
These three need 221 to 232.
Measurements
Longest paths in the same three package versions, in a cache installed
earlier with long paths on, so this is the normal installed layout. Lengths
are below the cache root.
| Package | Longest file | Longest folder |
|---|---|---|
platforms\earlephilhower-arduino-pico 4.5.3 |
232 | 205 |
platforms\dl-framework-arduinoteensy-1.160.0 1.160.0 |
221 | 158 |
platforms\stm32duino-Arduino_Core_STM32 2.9.0 |
231 | 211 |
The paths:
platforms\earlephilhower-arduino-pico\3390eb851c5aa882\4.5.3\rp2040-4.5.3\libraries\FreeRTOS\lib\FreeRTOS-Kernel\portable\GCC\RISC-V\chip_specific_extensions\RISCV_MTIME_CLINT_no_extensions\freertos_risc_v_chip_specific_extensions.h
platforms\dl-framework-arduinoteensy-1.160.0\1b0675c97b0fd8d7\1.160.0\libraries\FlexCAN_T4\examples\isotp_server_multiple_buffers_to_individual_busses_example\isotp_server_multiple_buffers_to_individual_busses_example.ino
platforms\stm32duino-Arduino_Core_STM32\189aab1e7ae66a25\2.9.0\Arduino_Core_STM32-2.9.0\variants\STM32MP1xx\MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D)\variant_generic.cpp
Under the automatic root (32 characters plus a separator), against limits of
259 for a file and 247 for a folder:
| Package | Longest file, installed | Longest file, in _staging |
Longest folder, installed | Longest folder, in _staging |
|---|---|---|---|---|
| arduino-pico 4.5.3 | 265, over by 6 | 273 | 238 | 246 |
| Teensy 1.160.0 | 254, fits | 262, over by 3 | 191 | 199 |
| STM32 core 2.9.0 | 264, over by 5 | 272 | 244 | 252, over by 5 |
So there are two separate problems:
- The Teensy framework fits where it ends up. It is refused only because the
check runs on1.160.0_staging. - arduino-pico and the STM32 core are too long where they end up as well.
Possible fix (inference, not tested)
Opting the three cores in to the compact layout would bring them well inside
the limit. With <cache root>\<16 hex>\ and the archive's own top folder
dropped, the longest files come to about:
| Package | Below the archive's top folder | Under the automatic root |
|---|---|---|
arduino-pico 4.5.3 (rp2040-4.5.3\) |
158 | 208 |
Teensy 1.160.0 (no top folder: cores, libraries) |
151 | 201 |
STM32 core 2.9.0 (Arduino_Core_STM32-2.9.0\) |
143 | 193 |
unpack_without_wrapper (compact_install.rs, lines 74 to 93) drops a single
top folder when it holds bin or cores. rp2040-4.5.3 and
Arduino_Core_STM32-2.9.0 each hold cores, so the rule as written would
drop them. The Teensy archive has no top folder to drop.
I have not checked whether each core's own path lookups accept a tree without
its top folder.
Separately, checking a package that does not opt in against its destination
(validate_extraction_at already takes one) or giving it the short staging
name would let the Teensy framework install as it is, with 5 characters to
spare under this root. That margin is small, so the compact layout looks like
the safer fix for all three.
Not tested
- A shorter
FBUILD_CACHE_DIR. By the numbers above, the staging check would
pass for all three with a root of 18 characters or fewer. - fbuild 2.5.55 on these boards with long paths on. Earlier releases
installed these same package versions with long paths on. - Other boards of the same families. They use the same core packages, so I
expect the same result, but only these three were run. - A standard account. These runs used an existing account with its own
fallback cache. - Whether other packages sit close to the limit. The boards listed in the
summary built; their margins were not measured.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
docs(release): note the upstream report for the non-ESP32 long-path f…
docs(release): record the fbuild main retest for the non-ESP32 long-p…
test(compile): fixtures for the review's coverage gaps; qualify min/m…