-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Running cargo build --release
on the tree results in:
error[E0412]: cannot find type `semid_ds` in crate `libc`
--> src/uu/lsipc/src/semaphore.rs:27:72
|
27 | fn semctl(id: c_int, index: c_int, cmd: c_int) -> Result<(c_int, libc::semid_ds), LsIpcError> {
| ^^^^^^^^ help: a struct with a similar name exists: `shmid_ds`
|
::: /home/user/Devel/distrobox/alpine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.174/src/unix/linux_like/linux/musl/b64/mod.rs:5:1
|
5 | / s! {
6 | | pub struct stack_t {
7 | | pub ss_sp: *mut c_void,
8 | | pub ss_flags: c_int,
... |
78 | | }
| |_- similarly named struct `shmid_ds` defined here
error[E0412]: cannot find type `semid_ds` in crate `libc`
--> src/uu/lsipc/src/semaphore.rs:28:25
|
28 | let mut stat: libc::semid_ds;
| ^^^^^^^^ help: a struct with a similar name exists: `shmid_ds`
|
::: /home/user/Devel/distrobox/alpine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.174/src/unix/linux_like/linux/musl/b64/mod.rs:5:1
|
5 | / s! {
6 | | pub struct stack_t {
7 | | pub ss_sp: *mut c_void,
8 | | pub ss_flags: c_int,
... |
78 | | }
| |_- similarly named struct `shmid_ds` defined here
error[E0412]: cannot find type `semid_ds` in crate `libc`
--> src/uu/lsipc/src/semaphore.rs:75:58
|
75 | let sem_info = unsafe { &*(&stat as *const libc::semid_ds).cast::<libc::seminfo>() };
| ^^^^^^^^ help: a struct with a similar name exists: `shmid_ds`
|
::: /home/user/Devel/distrobox/alpine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.174/src/unix/linux_like/linux/musl/b64/mod.rs:5:1
|
5 | / s! {
6 | | pub struct stack_t {
7 | | pub ss_sp: *mut c_void,
8 | | pub ss_flags: c_int,
... |
78 | | }
| |_- similarly named struct `shmid_ds` defined here
error[E0412]: cannot find type `seminfo` in crate `libc`
--> src/uu/lsipc/src/semaphore.rs:75:81
|
75 | let sem_info = unsafe { &*(&stat as *const libc::semid_ds).cast::<libc::seminfo>() };
| ^^^^^^^ help: a struct with a similar name exists: `sysinfo`
|
::: /home/user/Devel/distrobox/alpine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.174/src/unix/linux_like/linux/musl/mod.rs:417:1
|
417 | / s_no_extra_traits! {
418 | | pub struct sysinfo {
419 | | pub uptime: c_ulong,
420 | | pub loads: [c_ulong; 3],
... |
468 | | }
| |_- similarly named struct `sysinfo` defined here
error[E0412]: cannot find type `semid_ds` in crate `libc`
--> src/uu/lsipc/src/semaphore.rs:173:22
|
173 | stat: &libc::semid_ds,
| ^^^^^^^^ help: a struct with a similar name exists: `shmid_ds`
|
::: /home/user/Devel/distrobox/alpine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.174/src/unix/linux_like/linux/musl/b64/mod.rs:5:1
|
5 | / s! {
6 | | pub struct stack_t {
7 | | pub ss_sp: *mut c_void,
8 | | pub ss_flags: c_int,
... |
78 | | }
| |_- similarly named struct `shmid_ds` defined here
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/display.rs:115:17
|
115 | time: libc::time_t,
| ^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/message_queue.rs:87:18
|
87 | stime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/message_queue.rs:88:18
|
88 | rtime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/message_queue.rs:89:18
|
89 | ctime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/semaphore.rs:165:18
|
165 | otime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/semaphore.rs:166:18
|
166 | ctime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/shared_memory.rs:107:18
|
107 | atime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/shared_memory.rs:108:18
|
108 | dtime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/shared_memory.rs:109:18
|
109 | ctime: libc::time_t,
| ^^^^^^
warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
--> src/uu/lsipc/src/utils.rs:40:38
|
40 | pub(crate) fn local_time(time: libc::time_t) -> Result<libc::tm, LsIpcError> {
| ^^^^^^
Compiling uu_uuidgen v0.0.1 (/run/host/home/user/Devel/pmOS/util-linux/src/uu/uuidgen)
Compiling phf v0.12.1
error[E0609]: no field `__key` on type `ipc_perm`
--> src/uu/lsipc/src/message_queue.rs:95:32
|
95 | key: stat.msg_perm.__key,
| ^^^^^ unknown field
|
= note: available fields are: `__ipc_perm_key`, `uid`, `gid`, `cuid`, `cgid` ... and 2 others
Compiling uu_blockdev v0.0.1 (/run/host/home/user/Devel/pmOS/util-linux/src/uu/blockdev)
error[E0609]: no field `__key` on type `ipc_perm`
--> src/uu/lsipc/src/shared_memory.rs:115:32
|
115 | key: stat.shm_perm.__key,
| ^^^^^ unknown field
|
= note: available fields are: `__ipc_perm_key`, `uid`, `gid`, `cuid`, `cgid` ... and 2 others
error[E0277]: the trait bound `i32: From<u32>` is not satisfied
--> src/uu/blockdev/src/blockdev.rs:202:60
|
202 | if libc::ioctl(device_file.as_raw_fd(), ioctl_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<&fluent_bundle::types::number::FluentNumber>`
`i32` implements `From<bool>`
`i32` implements `From<deranged::RangedI32<MIN, MAX>>`
`i32` implements `From<dns_lookup::types::AddrFamily>`
`i32` implements `From<dns_lookup::types::Protocol>`
`i32` implements `From<dns_lookup::types::SockType>`
`i32` implements `From<fluent_bundle::types::number::FluentNumber>`
`i32` implements `From<i16>`
and 8 others
= note: required for `u32` to implement `Into<i32>`
Compiling uu_fsfreeze v0.0.1 (/run/host/home/user/Devel/pmOS/util-linux/src/uu/fsfreeze)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `uu_blockdev` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
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<&fluent_bundle::types::number::FluentNumber>`
`i32` implements `From<bool>`
`i32` implements `From<deranged::RangedI32<MIN, MAX>>`
`i32` implements `From<dns_lookup::types::AddrFamily>`
`i32` implements `From<dns_lookup::types::Protocol>`
`i32` implements `From<dns_lookup::types::SockType>`
`i32` implements `From<fluent_bundle::types::number::FluentNumber>`
`i32` implements `From<i16>`
and 8 others
= note: required for `u32` to implement `Into<i32>`
error: could not compile `uu_fsfreeze` (lib) due to 1 previous error
Some errors have detailed explanations: E0412, E0609.
For more information about an error, try `rustc --explain E0412`.
warning: `uu_lsipc` (lib) generated 10 warnings
error: could not compile `uu_lsipc` (lib) due to 7 previous errors; 10 warnings emitted
It looks like most of these are differences between glibc and musl breaking the code through the libc crate.
Metadata
Metadata
Assignees
Labels
No labels