Repository navigation
fix(esp32): drop dangling -specs paths baked into an SDK's ld_flags (red ESP32-C2 main) - #2102
Merged
Merged
Conversation
pioarduino's ESP32-C2 skeleton ships flags/ld_flags generated on the lib-builder host, so it carries that host's absolute path: --specs=/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/build/specs/nano.specs GCC then fails every ESP32-C2 link with "cannot read spec file" and the Build ESP32-C2 workflow is red (run 44512457992 on 3199f00). The flag is stale in two ways: the path cannot exist outside the builder, and the paired SDK is ESP-IDF 6.1, whose default libc is picolibc - newlib-nano specs do not apply. The sibling targets (esp32c3/esp32c6) carry no specs entry at all in the same libs release. effective_sdk_ld_flags now drops a -specs=/--specs= entry only when it names an absolute path that does not exist, so a relative spec name or a real local absolute path is passed through untouched.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Build ESP32-C2is red onmain(run 44512457992 on3199f00c), and the cause is a flag in the shipped SDK:pioarduino's
c2-skeletonpackage shipsesp32c2/flags/ld_flagswith that lib-builder absolute path baked in, so no consumer machine can link. The sameesp32-arduino-libs4.0.0 release carries no-specsentry foresp32c3/esp32c6, and the paired SDK is ESP-IDF 6.1 whose default libc is picolibc — newlib-nano specs do not apply there anyway.Change
fixups::effective_sdk_ld_flagsdrops a-specs=/--specs=entry only when it names an absolute path that does not exist on this machine. Relative spec names and real local absolute paths pass through untouched. Both call sites inorchestrator/build.rsalready go through this function.Verification
soldr cargo test -p fbuild-build-esp --lib esp32::fixups— 15 passed / 0 failed, incl. two new tests (dangling_absolute_specs_are_dropped,existing_absolute_specs_and_relative_specs_survive).soldr cargo clippy -p fbuild-build-esp --all-targets --no-deps -- -D warnings— clean;cargo fmt --checkclean.fbuild build tests/platform/esp32c2 -e esp32c2 --quickwithplatform-espressif32@stable→[email protected],ESP-IDF SDK=6.1.0. Before the fix the same command reproduced the CI error verbatim; after it:build succeeded in 3.6s (flash: 244337 bytes, ram: 12952 bytes), zeronano.specsmentions in the log. A 3.3.12 build (no baked flag) still succeeds, so the 3.x path is untouched.No issue is closed by this PR.