Build fails for aarch64-alpine-linux-musl
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- operating-systems
Direzione di ricerca
Esegui cargo build --release per il target aarch64-alpine-linux-musl e inizia dagli errori segnalati in src/uu/lsipc/src/semaphore.rs, message_queue.rs e shared_memory.rs. Esamina inoltre i punti di chiamata di ioctl in src/uu/blockdev/src/blockdev.rs e src/uu/fsfreeze/src/fsfreeze.rs. Il lavoro è completato quando gli errori di compilazione relativi a musl segnalati sono risolti e la build release ha esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 221
- Fork
- 60
- Merge medio
- 3g 1h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uutils/util-linux
-
Implement `chrt`Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
uutils/util-linux#641 ·
I maintainer di solito rispondono entro 1 giorno
-
Implement `resizepart`Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
uutils/util-linux#638 ·
I maintainer di solito rispondono entro 1 giorno
-
Implement `rename`Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
uutils/util-linux#629 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
uutils/util-linux#624 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
uutils/util-linux#620 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di uutils/util-linux
Issue simili
-
area: dogs area: lookout bug security
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 2 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
OpenDevicePartnership/ina4230#31 ·
I maintainer di solito rispondono entro 1 giorno
-
area:breg criticality:p3 documentation triage:needs-implementation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
registrystack/registry-stack#1713 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
posit-dev/ggsql#565 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno