`xtensa-*-espidf` target docs are insufficient for a working build
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 42/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
The failure comes from the esp-idf-sys crate's checks/libc.rs assertions, which fail unless --cfg espidf_picolibc is passed in the rustflags, and the payload does not name the docs page to update. Read the error output and the nine comments to see whether maintainers have already agreed on the wording. Done means the xtensa-*-espidf target docs state the required rustflags for a working -Zbuild-std build.
由索引模型根据 Issue 内容生成。
描述
rustc 1.102.0-nightly (20fe935d5 2026-11-23)
build with -Zbuild-std
targets: xtensa-*-espidf
error[: evaluation panicked: The ESP-IDF is built with picolibc, but the `libc` crate is not: add `--cfg espidf_picolibc` to the rustflags
╭▸ index.crates.io-1949cf8c6b5b557f/esp-idf-sys-0.39.0/src/checks/libc.rs:407:15
│
407 │ const _: () = assert!(
│ ┏━━━━━━━━━━━━━━━┛
408 │ ┃ sys::O_CREAT as i64 == libc::O_CREAT as i64,
409 │ ┃ "The ESP-IDF is built with picolibc, but the `libc` crate is not: add `--cfg espidf_picolibc` to the rustflags"
410 │ ┃ );
╰╴┗━┛ evaluation of `checks::libc::_` failed here
error[: evaluation panicked: libc/esp-idf-sys constant mismatch for `O_APPEND`: esp-idf=1024 libc=8
╭▸ index.crates.io-1949cf8c6b5b557f/esp-idf-sys-0.39.0/src/checks/libc.rs:21:13
│
21 │ ┏ compile_assert!(
22 │ ┃ sys::$ident as i64 == libc::$ident as i64,
23 │ ┃ "libc/esp-idf-sys constant mismatch for `", stringify!($ident), "`: esp-idf=",
24 │ ┃ sys::$ident as i64 => fmt::<i64>(),
25 │ ┃ " libc=", libc::$ident as i64 => fmt::<i64>()
26 │ ┃ );
│ ┗━━━━━━━━━━━━━┛ evaluation of `checks::libc::_` failed here
│
⸬ /cargo/build-dir/xtensa-esp32s3-espidf/src/build/esp-idf-sys/2eaf1980334d8c59/out/libc_checks.rs:265:1
│
265 │ check_constants!(O_APPEND);
│ ────────────────────────── in this macro invocation
│
╰ note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `check_constants` (in Nightly builds, run with -Z macro-backtrace for more info)
error[: evaluation panicked: libc/esp-idf-sys constant mismatch for `O_CREAT`: esp-idf=64 libc=512
╭▸ index.crates.io-1949cf8c6b5b557f/esp-idf-sys-0.39.0/src/checks/libc.rs:21:13
│
21 │ ┏ compile_assert!(
22 │ ┃ sys::$ident as i64 == libc::$ident as i64,
23 │ ┃ "libc/esp-idf-sys constant mismatch for `", stringify!($ident), "`: esp-idf=",
24 │ ┃ sys::$ident as i64 => fmt::<i64>(),
25 │ ┃ " libc=", libc::$ident as i64 => fmt::<i64>()
26 │ ┃ );
│ ┗━━━━━━━━━━━━━┛ evaluation of `checks::libc::_` failed here
│
⸬ /cargo/build-dir/xtensa-esp32s3-espidf/src/build/esp-idf-sys/2eaf1980334d8c59/out/libc_checks.rs:267:1
│
267 │ check_constants!(O_CREAT);
│ ───────────────────────── in this macro invocation
│
╰ note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `check_constants` (in Nightly builds, run with -Z macro-backtrace for more info)
error[: evaluation panicked: libc/esp-idf-sys constant mismatch for `O_TRUNC`: esp-idf=512 libc=1024
╭▸ index.crates.io-1949cf8c6b5b557f/esp-idf-sys-0.39.0/src/checks/libc.rs:21:13
│
21 │ ┏ compile_assert!(
22 │ ┃ sys::$ident as i64 == libc::$ident as i64,
23 │ ┃ "libc/esp-idf-sys constant mismatch for `", stringify!($ident), "`: esp-idf=",
24 │ ┃ sys::$ident as i64 => fmt::<i64>(),
25 │ ┃ " libc=", libc::$ident as i64 => fmt::<i64>()
26 │ ┃ );
│ ┗━━━━━━━━━━━━━┛ evaluation of `checks::libc::_` failed here
│
⸬ /cargo/build-dir/xtensa-esp32s3-espidf/src/build/esp-idf-sys/2eaf1980334d8c59/out/libc_checks.rs:273:1
│
273 │ check_constants!(O_TRUNC);
│ ───────────────────────── in this macro invocation
│
╰ note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `check_constants` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0080`.
error: could not compile `esp-idf-sys` (lib) due to 4 previous errors
- 主要语言
- Rust
- 星标
- 123k
- 派生
- 16.6k
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 532
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/rust 的其他 Issue
-
C-bug needs-triage
难度 2/5 1-3 小时 新手友好度 88/100
rust-lang/rust#166722 · 1 个 reaction ·
维护者通常 1 天内回复
-
A-attributes relnotes relnotes-needs-review relnotes-tracking-issue T-compiler T-lang
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
A-run-make C-bug T-bootstrap
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
relnotes relnotes-tracking-issue T-libs
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
A-str A-Unicode relnotes relnotes-tracking-issue T-libs
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
tamatebako/tebako#1155 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 79/100
swc-project/swc-next-issues#1148 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#2828 ·
维护者通常 1 天内回复
-
agent:triaged arch-audit bug priority:p1
难度 2/5 1-3 小时 新手友好度 68/100
SocketDev/socket-patch#2364 · 1 条评论 ·
维护者通常 1 天内回复
-
bug P2
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复