Build failed for target x86_64-unknown-linux-musl
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
使用 cargo build --release --target x86_64-unknown-linux-musl 重现失败,然后检查 src/uu/last/src/platform/unix.rs、src/uu/dmesg/src/time_formatter.rs、src/uu/fsfreeze/src/fsfreeze.rs 和 src/uu/blockdev/src/blockdev.rs 中报告的位置。检查 libmount-sys 和 smartcols-sys 的构建输出,查找缺失的头文件;目标构建在没有这些错误的情况下完成即表示完成。
由索引模型根据 Issue 内容生成。
描述
cargo build --release --target x86_64-unknown-linux-musl
Compiling smartcols-sys v0.1.2
Compiling libmount-sys v0.1.1
Compiling uu_last v0.0.1 (/home/user/util-linux/src/uu/last)
Compiling uu_blockdev v0.0.1 (/home/user/util-linux/src/uu/blockdev)
Compiling uu_dmesg v0.0.1 (/home/user/util-linux/src/uu/dmesg)
Compiling uu_fsfreeze v0.0.1 (/home/user/util-linux/src/uu/fsfreeze)
error[E0433]: failed to resolve: could not find utmpx in uucore
--> src/uu/last/src/platform/unix.rs:13:13
|
13 | use uucore::utmpx::time::OffsetDateTime;
| ^^^^^ could not find utmpx in uucore
|
note: found an item that was configured out
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:98:26
|
98 | pub use crate::features::utmpx;
| ^^^^^
note: the item is gated here
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:89:1
|
89 | / #[cfg(all(
90 | | unix,
91 | | not(target_os = "android"),
92 | | not(target_os = "fuchsia"),
... |
96 | | feature = "utmpx"
97 | | ))]
| |___^
error[E0432]: unresolved import uucore::utmpx
--> src/uu/last/src/platform/unix.rs:14:13
|
14 | use uucore::utmpx::{time, Utmpx};
| ^^^^^ could not find utmpx in uucore
|
note: found an item that was configured out
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:98:26
|
98 | pub use crate::features::utmpx;
| ^^^^^
note: the item is gated here
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:89:1
|
89 | / #[cfg(all(
90 | | unix,
91 | | not(target_os = "android"),
92 | | not(target_os = "fuchsia"),
... |
96 | | feature = "utmpx"
97 | | ))]
| |___^
error[E0277]: the trait bound i32: From<u32> is not satisfied
--> src/uu/fsfreeze/src/fsfreeze.rs:33:55
|
33 | if unsafe { libc::ioctl(file.as_raw_fd(), op_code.into(), 0) } < 0 {
| ^^^^ the trait From<u32> is not implemented for i32
|
= help: the following other types implement trait From<T>:
i32 implements From<bool>
i32 implements From<i16>
i32 implements From<i8>
i32 implements From<nix::sys::socket::Backlog>
i32 implements From<nix::unistd::Pid>
i32 implements From<u16>
i32 implements From<u8>
= note: required for u32 to implement Into<i32>
error[E0433]: failed to resolve: could not find utmpx in uucore
--> src/uu/dmesg/src/time_formatter.rs:170:27
|
170 | for record in uucore::utmpx::Utmpx::iter_all_records() {
| ^^^^^ could not find utmpx in uucore
|
note: found an item that was configured out
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:98:26
|
98 | pub use crate::features::utmpx;
| ^^^^^
note: the item is gated here
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:89:1
|
89 | / #[cfg(all(
90 | | unix,
91 | | not(target_os = "android"),
92 | | not(target_os = "fuchsia"),
... |
96 | | feature = "utmpx"
97 | | ))]
| |___^
error[E0433]: failed to resolve: could not find utmpx in uucore
--> src/uu/dmesg/src/time_formatter.rs:171:44
|
171 | if record.record_type() == uucore::utmpx::BOOT_TIME {
| ^^^^^ could not find utmpx in uucore
|
note: found an item that was configured out
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:98:26
|
98 | pub use crate::features::utmpx;
| ^^^^^
note: the item is gated here
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uucore-0.0.30/src/lib/lib.rs:89:1
|
89 | / #[cfg(all(
90 | | unix,
91 | | not(target_os = "android"),
92 | | not(target_os = "fuchsia"),
... |
96 | | feature = "utmpx"
97 | | ))]
| |___^
help: consider importing this struct
|
6 + use crate::libc::utmpx;
|
help: if you import utmpx, refer to it directly
|
171 - if record.record_type() == uucore::utmpx::BOOT_TIME {
171 + if record.record_type() == utmpx::BOOT_TIME {
|
error[E0277]: the trait bound i32: From<u32> is not satisfied
--> src/uu/blockdev/src/blockdev.rs:202:60
|
202 | ...l_code.into(), input) < 0 {
| ^^^^ the trait From<u32> is not implemented for i32
|
= help: the following other types implement trait From<T>:
i32 implements From<bool>
i32 implements From<i16>
i32 implements From<i8>
i32 implements From<nix::sys::socket::Backlog>
i32 implements From<nix::unistd::Pid>
i32 implements From<u16>
i32 implements From<u8>
= note: required for u32 to implement Into<i32>
For more information about this error, try rustc --explain E0277.
error: could not compile uu_fsfreeze (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for libmount-sys v0.1.1
Caused by:
process didn't exit successfully: /home/user/util-linux/target/release/build/libmount-sys-4146f3ae2dc8d19e/build-script-build (exit status: 101)
--- stdout
cargo:root=/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/libmount-sys-077a051538977eaa/out
cargo:rerun-if-env-changed=SYSROOT_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SYSROOT_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SYSROOT
cargo:rerun-if-env-changed=SYSROOT
cargo:rerun-if-env-changed=LIBMOUNT_STATIC_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=LIBMOUNT_STATIC_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_LIBMOUNT_STATIC
cargo:rerun-if-env-changed=LIBMOUNT_STATIC
cargo:rerun-if-env-changed=LIBMOUNT_PATH_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=LIBMOUNT_PATH_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_LIBMOUNT_PATH
cargo:rerun-if-env-changed=LIBMOUNT_PATH
cargo:rerun-if-env-changed=LIBMOUNT_INCLUDE_DIR_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=LIBMOUNT_INCLUDE_DIR_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_LIBMOUNT_INCLUDE_DIR
cargo:rerun-if-env-changed=LIBMOUNT_INCLUDE_DIR
cargo:rerun-if-env-changed=LIBMOUNT_LIB_DIR_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=LIBMOUNT_LIB_DIR_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_LIBMOUNT_LIB_DIR
cargo:rerun-if-env-changed=LIBMOUNT_LIB_DIR
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_CC
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_CFLAGS
cargo:rerun-if-env-changed=CFLAGS
OPT_LEVEL = Some(3)
OUT_DIR = Some(/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/libmount-sys-077a051538977eaa/out)
TARGET = Some(x86_64-unknown-linux-musl)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
CC_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
CC_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
RUSTC_LINKER = None
PATH = Some(/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
CFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
CFLAGS_x86_64-unknown-linux-musl = None
CARGO_ENCODED_RUSTFLAGS = Some()
OPT_LEVEL = Some(3)
OUT_DIR = Some(/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/libmount-sys-077a051538977eaa/out)
TARGET = Some(x86_64-unknown-linux-musl)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
CC_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
CC_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
RUSTC_LINKER = None
PATH = Some(/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
CFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
CFLAGS_x86_64-unknown-linux-musl = None
CARGO_ENCODED_RUSTFLAGS = Some()
--- stderr
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libmount-sys-0.1.1/build.rs:260:37:
libmount-sys: Failed to find 'libmount/libmount.h'. Please make sure the C header files of libmount are installed and accessible: Kind(NotFound)
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: failed to run custom build command for smartcols-sys v0.1.2
Caused by:
process didn't exit successfully: /home/user/util-linux/target/release/build/smartcols-sys-c01c93fc07ac1944/build-script-build (exit status: 101)
--- stdout
cargo:root=/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/smartcols-sys-ecc585ab5f6738d6/out
cargo:rerun-if-env-changed=SYSROOT_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SYSROOT_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SYSROOT
cargo:rerun-if-env-changed=SYSROOT
cargo:rerun-if-env-changed=SMARTCOLS_STATIC_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SMARTCOLS_STATIC_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SMARTCOLS_STATIC
cargo:rerun-if-env-changed=SMARTCOLS_STATIC
cargo:rerun-if-env-changed=SMARTCOLS_PATH_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SMARTCOLS_PATH_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SMARTCOLS_PATH
cargo:rerun-if-env-changed=SMARTCOLS_PATH
cargo:rerun-if-env-changed=SMARTCOLS_INCLUDE_DIR_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SMARTCOLS_INCLUDE_DIR_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SMARTCOLS_INCLUDE_DIR
cargo:rerun-if-env-changed=SMARTCOLS_INCLUDE_DIR
cargo:rerun-if-env-changed=SMARTCOLS_LIB_DIR_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=SMARTCOLS_LIB_DIR_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_SMARTCOLS_LIB_DIR
cargo:rerun-if-env-changed=SMARTCOLS_LIB_DIR
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_CC
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=TARGET_CFLAGS
cargo:rerun-if-env-changed=CFLAGS
OPT_LEVEL = Some(3)
OUT_DIR = Some(/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/smartcols-sys-ecc585ab5f6738d6/out)
TARGET = Some(x86_64-unknown-linux-musl)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
CC_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
CC_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
RUSTC_LINKER = None
PATH = Some(/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
CFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
CFLAGS_x86_64-unknown-linux-musl = None
CARGO_ENCODED_RUSTFLAGS = Some()
OPT_LEVEL = Some(3)
OUT_DIR = Some(/home/user/util-linux/target/x86_64-unknown-linux-musl/release/build/smartcols-sys-ecc585ab5f6738d6/out)
TARGET = Some(x86_64-unknown-linux-musl)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-musl
CC_x86_64-unknown-linux-musl = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_musl
CC_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
RUSTC_LINKER = None
PATH = Some(/home/user/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_musl
CFLAGS_x86_64_unknown_linux_musl = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-musl
CFLAGS_x86_64-unknown-linux-musl = None
CARGO_ENCODED_RUSTFLAGS = Some()
--- stderr
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smartcols-sys-0.1.2/build.rs:289:22:
smartcols-sys: Failed to find 'libsmartcols/libsmartcols.h'. Please make sure the C header files of libsmartcols are installed and accessible: Kind(NotFound)
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
error: could not compile uu_last (lib) due to 2 previous errors
error: could not compile uu_blockdev (lib) due to 1 previous error
For more information about this error, try rustc --explain E0433.
error: could not compile uu_dmesg (lib) due to 2 previous errors
- 主要语言
- Rust
- 星标
- 223
- 派生
- 61
- 平均合并
- 8 小时 5 分钟
- 30 天内合并 PR
- 16
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uutils/util-linux 的其他 Issue
-
rev: multibyte characters are reversed byte by byte in UTF-8 locales可能已有人在做 @SichenLiang 于 8 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
uutils/util-linux#656 ·
维护者通常 1 天内回复
-
Implement `chrt`未关闭
难度 4/5 3-5 天 新手友好度 48/100
uutils/util-linux#641 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
uutils/util-linux#638 ·
维护者通常 1 天内回复
-
ionice: should the port enforce the documented ranges for -c and -n?可能已有人在做 @mmclinton 于 45 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
uutils/util-linux#624 ·
维护者通常 1 天内回复
-
chcpu: a large cpu-list range runs for hours可能已有人在做 @mmclinton 于 50 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 42/100
uutils/util-linux#620 · 1 条评论 ·
维护者通常 1 天内回复
查看 uutils/util-linux 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
bytecodealliance/rustix#1703 ·
维护者通常 3 天内回复
-
bug discussion
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
farion1231/cc-switch#8298 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ajeetdsouza/zoxide#1323 ·
维护者通常 1 天内回复