uutils / uutils/coreutils

0.8.0 fail to compile uu_stty (lib) on ppc64le

Open
#11,687 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - stty
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

warning: use of deprecated type alias `uucore::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/uptime/src/uptime.rs:17:19
   |
17 | use uucore::libc::time_t;
   |                   ^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated type alias `uucore::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/uptime/src/uptime.rs:238:54
    |
238 | fn process_utmpx(file: Option<&OsString>) -> (Option<time_t>, usize) {
    |                                                      ^^^^^^

warning: use of deprecated type alias `uucore::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/uptime/src/uptime.rs:253:61
    |
253 |                     boot_time = Some(dt.unix_timestamp() as time_t);
    |                                                             ^^^^^^

warning: use of deprecated type alias `uucore::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/uptime/src/uptime.rs:284:35
    |
284 | fn print_uptime(boot_time: Option<time_t>) -> UResult<()> {
    |                                   ^^^^^^

   Compiling uu_b2sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/b2sum)
   Compiling uu_sha1sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/sha1sum)
   Compiling uu_cksum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/cksum)
   Compiling uu_md5sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/md5sum)
   Compiling uu_sha512sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/sha512sum)
   Compiling uu_sha384sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/sha384sum)
   Compiling uu_sha256sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/sha256sum)
   Compiling uu_sha224sum v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/sha224sum)
error[E0599]: `BaudRate` doesn't implement `std::fmt::Display`
   --> src/uu/stty/src/stty.rs:656:20
    |
656 |       printer.print(&translate!("stty-output-speed", "speed" => speed));
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `BaudRate` due t
o unsatisfied trait bounds
    |
   ::: /builds/alpine/aports/community/uutils/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.31.2/src/mac
ros.rs:131:9
    |
131 | /         $v enum $BitFlags {
132 | |             $($entries)*
133 | |         }
    | |_________- doesn't satisfy `BaudRate: ToString` or `BaudRate: std::fmt::Display`
    |
    = note: the following trait bounds were not satisfied:
            `BaudRate: std::fmt::Display`
            which is required by `BaudRate: ToString`
    = note: this error originates in the macro `translate` (in Nightly builds, run with -Z macro-backtrace for more info
)

   Compiling uu_basenc v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/basenc)
   Compiling uu_base64 v0.8.0 (/builds/alpine/aports/community/uutils/src/coreutils-0.8.0/src/uu/base64)
For more information about this error, try `rustc --explain E0599`.
error: could not compile `uu_stty` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
warning: `uu_uptime` (lib) generated 4 warnings
warning: `uucore` (lib) generated 4 warnings

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/uu/stty/src/stty.rs:656, where the stty output uses the BaudRate value and fails to compile on ppc64le. Reproduce the build for that target, inspect how BaudRate is represented by the nix dependency, and verify that uu_stty compiles successfully without breaking its output behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.