Description:
When using lib_ldf_mode = off, PlatformIO fails to find some dependencies (specifically symlinked libraries) under Windows. To get it to compile, it frequently requires manually deleting the .pio/libdeps folder. However, using the exact same configuration and project under WSL compiles perfectly without needing to clear the cache.
(Note: This was originally opened by mistake in platform-espressif32 as issue #1690).
Steps to Reproduce:
- Create a project on Windows utilizing symlinked local libraries in
lib_deps.
- Set
lib_ldf_mode = off in platformio.ini.
- Build the project.
Expected Behavior:
The LDF should resolve the symlinked libraries and compile the project successfully, just as it does under WSL.
Actual Behavior:
Under Windows, the compilation sometimes fails because the symlinked libraries are not found by the compiler.
Windows Output (Fails):
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 68 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoEigen @ 0.3.2
|-- OneButton @ 2.6.1
|-- Wire @ 3.3.4
|-- SPI @ 3.3.4
|-- Preferences @ 3.3.4
Building in debug mode
...
src/main.cpp:6:10: fatal error: syl/FreeRtosStats.h: No such file or directory
WSL Output (Succeeds):
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 64 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoEigen @ 0.3.2
|-- OneButton @ 2.6.1
|-- PendulumComponents
|-- NetVarFsm
|-- ImuTools
|-- Wire @ 3.3.4
|-- SPI @ 3.3.4
|-- Preferences @ 3.3.4
...
================================= [SUCCESS] =================================
Workaround:
- Deleting the
libdeps folder is usually enough.
- More rarely, it seems restarting VSCode is required.
platformio.ini Extract:
[platformio]
default_envs = debugNoBle
build_cache_dir = ${platformio.core_dir}/build_cache
[env]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.34/platform-espressif32.zip
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
upload_speed = 1500000
board_build.partitions = huge_app.csv
build_unflags =
-Os
-Werror=all
-std=gnu++2a -std=gnu++2b
-fno-rtti
build_flags =
-std=gnu++23
-I".pio/libdeps/${PIOENV}/Adafruit BusIO" ; Required for lib_ldf_mode = off
-I"${platformio.packages_dir}/framework-arduinoespressif32/libraries/Wire/src" ; Required for lib_ldf_mode = off
-I"${platformio.packages_dir}/framework-arduinoespressif32/libraries/SPI/src" ; Required for lib_ldf_mode = off
-I"${platformio.packages_dir}/framework-arduinoespressif32/libraries/Preferences/src" ; Required for lib_ldf_mode = off
lib_deps =
ArduinoEigen
mathertel/OneButton
symlink://../../PendulumComponents
symlink://../../../AymLibs/NetVarFsm
symlink://../../../AymLibs/ImuTools
Wire ; Required for lib_ldf_mode = off
SPI ; Required for lib_ldf_mode = off
Preferences ; Required for lib_ldf_mode = off
lib_ldf_mode = off
Environment:
- OS: Windows 11 (Fails) vs WSL (Works)
- PlatformIO Core Version: 6.1.19
Description:
When using
lib_ldf_mode = off, PlatformIO fails to find some dependencies (specifically symlinked libraries) under Windows. To get it to compile, it frequently requires manually deleting the.pio/libdepsfolder. However, using the exact same configuration and project under WSL compiles perfectly without needing to clear the cache.(Note: This was originally opened by mistake in
platform-espressif32as issue #1690).Steps to Reproduce:
lib_deps.lib_ldf_mode = offinplatformio.ini.Expected Behavior:
The LDF should resolve the symlinked libraries and compile the project successfully, just as it does under WSL.
Actual Behavior:
Under Windows, the compilation sometimes fails because the symlinked libraries are not found by the compiler.
Windows Output (Fails):
WSL Output (Succeeds):
Workaround:
libdepsfolder is usually enough.platformio.iniExtract:Environment: