[Bug 267529] lang/rust: Cargo crashes on shells/starship on i386

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 02 Nov 2022 17:23:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267529

            Bug ID: 267529
           Summary: lang/rust: Cargo crashes on shells/starship on i386
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: yuri@freebsd.org
                CC: rust@FreeBSD.org
                CC: rust@FreeBSD.org

Compiling systemstat v0.2.1
     Running `CARGO=/usr/local/bin/cargo CARGO_CRATE_NAME=systemstat
CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/systemstat-0.2.1
CARGO_PKG_AUTHORS='Val Packett <val@packett.cool>' CARGO_PKG_DESCRIPTION='Get
system information/statistics in a cross-platform way'
CARGO_PKG_HOMEPAGE='https://github.com/unrelentingtech/systemstat'
CARGO_PKG_LICENSE=Unlicense CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=systemstat
CARGO_PKG_REPOSITORY='https://github.com/unrelentingtech/systemstat'
CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.1 CARGO_PKG_VERSION_MAJOR=0
CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE=''
LD_LIBRARY_PATH='/wrkdirs/usr/ports/shells/starship/work/target/release/deps:/usr/local/lib'
/usr/local/bin/rustc --crate-name systemstat --edition=2018
/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/systemstat-0.2.1/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts,future-inc
 ompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C
linker-plugin-lto -C codegen-units=1 -C metadata=98bf241f56030ed8 -C
extra-filename=-98bf241f56030ed8 --out-dir
/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps
--target i686-unknown-freebsd -C linker=cc -C strip=symbols -L
dependency=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps
-L dependency=/wrkdirs/usr/ports/shells/starship/work/target/release/deps
--extern
bytesize=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/libbytesize-f7e4f2a7af0fdf20.rmeta
--extern
lazy_static=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/liblazy_static-3cc31bec7986e187.rmeta
--extern
libc=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/liblibc-a871152ff4b7dcc3.rmeta
--extern
time=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/libtime-5
 c47fc296facf775.rmeta --cap-lints warn -C li!
 nk-arg=-fstack-protector-strong`
error[E0308]: mismatched types
   -->
/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/systemstat-0.2.1/src/platform/freebsd.rs:114:54
    |
114 | ...   let ts =
OffsetDateTime::from_unix_timestamp(data.tv_sec).expect("unix timestamp should
be within range") + Duration::from_nanos(da...
    |                ----------------------------------- ^^^^^^^^^^^ expected
`i64`, found `i32`
    |                |
    |                arguments to this function are incorrect
    |
note: associated function defined here
   -->
/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/time-0.3.14/src/offset_date_time.rs:208:18
    |
208 |     pub const fn from_unix_timestamp(timestamp: i64) -> Result<Self,
error::ComponentRange> {
    |                  ^^^^^^^^^^^^^^^^^^^
help: you can convert an `i32` to an `i64`
    |
114 |         let ts =
OffsetDateTime::from_unix_timestamp(data.tv_sec.into()).expect("unix timestamp
should be within range") + Duration::from_nanos(data.tv_usec as u64);
    |                                                                 +++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `systemstat` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/usr/local/bin/cargo
CARGO_CRATE_NAME=systemstat
CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/systemstat-0.2.1
CARGO_PKG_AUTHORS='Val Packett <val@packett.cool>' CARGO_PKG_DESCRIPTION='Get
system information/statistics in a cross-platform way'
CARGO_PKG_HOMEPAGE='https://github.com/unrelentingtech/systemstat'
CARGO_PKG_LICENSE=Unlicense CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=systemstat
CARGO_PKG_REPOSITORY='https://github.com/unrelentingtech/systemstat'
CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.1 CARGO_PKG_VERSION_MAJOR=0
CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE=''
LD_LIBRARY_PATH='/wrkdirs/usr/ports/shells/starship/work/target/release/deps:/usr/local/lib'
/usr/local/bin/rustc --crate-name systemstat --edition=2018
/wrkdirs/usr/ports/shells/starship/work/starship-1.11.0/cargo-crates/systemstat-0.2.1/src/lib.rs
--error-format=json --json=diagnostic-rendered-an
 si,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C
opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C
metadata=98bf241f56030ed8 -C extra-filename=-98bf241f56030ed8 --out-dir
/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps
--target i686-unknown-freebsd -C linker=cc -C strip=symbols -L
dependency=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps
-L dependency=/wrkdirs/usr/ports/shells/starship/work/target/release/deps
--extern
bytesize=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/libbytesize-f7e4f2a7af0fdf20.rmeta
--extern
lazy_static=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/liblazy_static-3cc31bec7986e187.rmeta
--extern
libc=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd/release/deps/liblibc-a871152ff4b7dcc3.rmeta
--extern
time=/wrkdirs/usr/ports/shells/starship/work/target/i686-unknown-freebsd
 /release/deps/libtime-5c47fc296facf775.rmeta!
  --cap-lints warn -C link-arg=-fstack-protector-strong` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
*** Error code 101

-- 
You are receiving this mail because:
You are the assignee for the bug.