I am unsure, why the build is failing. I have try and build it several different times in different environments. It seems the issuse is related with cargo trying to build some dependency using std::os::Unix which is not available on my system.
Exa Version
I am trying to install the released version from Exa on cargo registry using the command cargo install exa.
Rust Compiler and Cargo version
Rustc Version : rustc 1.70.0 (90c541806 2023-05-31)
Cargo Version : cargo 1.70.0 (ec8a8a0ca 2023-04-25)
Operating System and Hardware Platform
OS Details :
Edition Windows 11 Pro
Version 22H2
Installed on 04-06-2023
OS build 22631.1825
Experience Windows Feature Experience Pack 1000.22642.1000.0
Hardware Details :
Processor Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz 2.29 GHz
Installed RAM 8.00 GB (7.89 GB usable)
System type 64-bit operating system, x64-based processor
Updating crates.io index
Installing exa v0.10.1
Updating crates.io index
Compiling libc v0.2.147
Compiling winapi v0.3.9
Compiling jobserver v0.1.26
Compiling pkg-config v0.3.27
Compiling cc v1.0.79
Compiling vcpkg v0.2.15
Compiling tinyvec_macros v0.1.1
Compiling tinyvec v1.6.0
Compiling unicode-width v0.1.10
Compiling pad v0.1.6
Compiling unicode-normalization v0.1.22
Compiling libz-sys v1.1.9
Compiling libgit2-sys v0.12.26+1.3.0
Compiling locale v0.2.2
Compiling percent-encoding v2.3.0
Compiling unicode-bidi v0.3.13
Compiling form_urlencoded v1.2.0
Compiling idna v0.4.0
Compiling datetime v0.5.2
Compiling log v0.4.19
Compiling exa v0.10.1
Compiling url v2.4.0
Compiling bitflags v1.3.2
Compiling byteorder v1.4.3
Compiling zoneinfo_compiled v0.5.1
Compiling users v0.11.0
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:36:14
|
36 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find `unix` in `os`
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\lib.rs:128:16
|
128 | pub use libc::{uid_t, gid_t};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:45:20
|
45 | use libc::{c_char, uid_t, gid_t, c_int};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
|
= help: consider importing this unresolved item instead:
uid_t
= help: consider importing this unresolved item instead:
gid_t
error[E0432]: unresolved import `libc::passwd`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:46:5
|
46 | use libc::passwd as c_passwd;
| ^^^^^^^^^^^^^^^^^^^^^^^^ no `passwd` in the root
error[E0432]: unresolved import `libc::group`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:47:5
|
47 | use libc::group as c_group;
| ^^^^^^^^^^^^^^^^^^^^^^ no `group` in the root
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\cache.rs:87:12
|
87 | use libc::{uid_t, gid_t};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
|
= help: consider importing this unresolved item instead:
uid_t
= help: consider importing this unresolved item instead:
gid_t
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\mock.rs:63:16
|
63 | pub use libc::{uid_t, gid_t};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
|
= help: consider importing this unresolved item instead:
uid_t
= help: consider importing this unresolved item instead:
gid_t
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\switch.rs:4:12
|
4 | use libc::{uid_t, gid_t, c_int};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
|
= help: consider importing this unresolved item instead:
uid_t
= help: consider importing this unresolved item instead:
gid_t
error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\traits.rs:4:12
|
4 | use libc::{uid_t, gid_t};
| ^^^^^ ^^^^^ no `gid_t` in the root
| |
| no `uid_t` in the root
|
= help: consider importing this unresolved item instead:
uid_t
= help: consider importing this unresolved item instead:
gid_t
error[E0433]: failed to resolve: could not find `UserExtras` in `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:78:26
|
78 | let extras = os::UserExtras::default();
| ^^^^^^^^^^ could not find `UserExtras` in `os`
error[E0433]: failed to resolve: could not find `GroupExtras` in `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:192:26
|
192 | let extras = os::GroupExtras::default();
| ^^^^^^^^^^^ could not find `GroupExtras` in `os`
error[E0433]: failed to resolve: could not find `UserExtras` in `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:266:28
|
266 | extras: os::UserExtras::from_passwd(passwd),
| ^^^^^^^^^^ could not find `UserExtras` in `os`
error[E0433]: failed to resolve: could not find `GroupExtras` in `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:280:23
|
280 | extras: os::GroupExtras::from_struct(group),
| ^^^^^^^^^^^ could not find `GroupExtras` in `os`
error[E0412]: cannot find type `UserExtras` in module `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:57:17
|
57 | extras: os::UserExtras,
| ^^^^^^^^^^ not found in `os`
error[E0412]: cannot find type `GroupExtras` in module `os`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:171:17
|
171 | extras: os::GroupExtras,
| ^^^^^^^^^^^ not found in `os`
error[E0425]: cannot find function `getpwuid_r` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:336:19
|
336 | libc::getpwuid_r(uid, &mut passwd, buf.as_mut_ptr(), buf.len(), &mut result)
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `getpwnam_r` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:398:19
|
398 | libc::getpwnam_r(username.as_ptr(), &mut passwd, buf.as_mut_ptr(), buf.len(), &mut result)
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `getgrgid_r` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:451:19
|
451 | libc::getgrgid_r(gid, &mut passwd, buf.as_mut_ptr(), buf.len(), &mut result)
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `getgrnam_r` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:513:19
|
513 | libc::getgrnam_r(groupname.as_ptr(), &mut group, buf.as_mut_ptr(), buf.len(), &mut result)
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `getuid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:556:20
|
556 | unsafe { libc::getuid() }
| ^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `geteuid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:603:20
|
603 | unsafe { libc::geteuid() }
| ^^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `getgid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:647:20
|
647 | unsafe { libc::getgid() }
| ^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `getegid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:691:20
|
691 | unsafe { libc::getegid() }
| ^^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `getgroups` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:745:15
|
745 | libc::getgroups(1024, buff.as_mut_ptr())
| ^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `buff` in this scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:783:21
|
783 | let mut count = buff.len() as c_int;
| ^^^^ not found in this scope
error[E0425]: cannot find value `res` in this scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:799:8
|
799 | if res < 0 {
| ^^^ not found in this scope
error[E0425]: cannot find value `buff` in this scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:803:9
|
803 | buff.dedup();
| ^^^^ not found in this scope
error[E0425]: cannot find value `buff` in this scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:804:9
|
804 | buff.into_iter()
| ^^^^ not found in this scope
error[E0425]: cannot find function `setpwent` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:858:11
|
858 | libc::setpwent();
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `endpwent` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:873:24
|
873 | unsafe { libc::endpwent() };
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `getpwent` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:890:37
|
890 | let result = unsafe { libc::getpwent() };
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `setuid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\switch.rs:41:26
|
41 | match unsafe { libc::setuid(uid) } {
| ^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `setgid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\switch.rs:72:26
|
72 | match unsafe { libc::setgid(gid) } {
| ^^^^^^ help: a function with a similar name exists: `getpid`
|
::: C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libc-0.2.147\src\windows\mod.rs:490:5
|
490 | pub fn getpid() -> ::c_int;
| -------------------------- similarly named function `getpid` defined here
error[E0425]: cannot find function `seteuid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\switch.rs:103:26
|
103 | match unsafe { libc::seteuid(uid) } {
| ^^^^^^^ not found in `libc`
error[E0425]: cannot find function `setegid` in crate `libc`
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\switch.rs:134:26
|
134 | match unsafe { libc::setegid(gid) } {
| ^^^^^^^ not found in `libc`
Compiling ansi_term v0.12.1
error[E0599]: no function or associated item named `from_bytes` found for struct `OsStr` in the current scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:252:20
|
252 | T::from(OsStr::from_bytes(CStr::from_ptr(p).to_bytes()))
| ^^^^^^^^^^ function or associated item not found in `OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:380:57
|
380 | let username = match CString::new(username.as_ref().as_bytes()) {
| ^^^^^^^^ method not found in `&OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:495:59
|
495 | let groupname = match CString::new(groupname.as_ref().as_bytes()) {
| ^^^^^^^^ method not found in `&OsStr`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\users-0.11.0\src\base.rs:782:47
|
782 | let name = CString::new(username.as_ref().as_bytes()).unwrap();
| ^^^^^^^^ method not found in `&OsStr`
Compiling term_size v0.3.2
Compiling term_grid v0.1.7
Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `users` (lib) due to 39 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `exa v0.10.1`, intermediate artifacts can be found at `C:\Users\dev\AppData\Local\Temp\cargo-installC7AZeN`
Cargo unable to build released version of Exa
Exa Version
cargo install exa
.Rust Compiler and Cargo version
rustc 1.70.0 (90c541806 2023-05-31)
cargo 1.70.0 (ec8a8a0ca 2023-04-25)
Operating System and Hardware Platform
Rustc --print cfg
debug_assertions panic="unwind" target_arch="x86_64" target_endian="little" target_env="msvc" target_family="windows" target_feature="fxsr" target_feature="sse" target_feature="sse2" target_has_atomic="16" target_has_atomic="32" target_has_atomic="64" target_has_atomic="8" target_has_atomic="ptr" target_os="windows" target_pointer_width="64" target_vendor="pc" windows
Exact Output Of Build Error