Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build exa on Windows #677

Closed
mikemadden42 opened this issue May 28, 2020 · 5 comments
Closed

Unable to build exa on Windows #677

mikemadden42 opened this issue May 28, 2020 · 5 comments

Comments

@mikemadden42
Copy link

I'm unable to build exa on Windows 10. I'm seeing these issues. Is exa supported on Windows?

PS C:\Users\jimi\rust\exa> cargo build --release
   Compiling locale v0.2.2
   Compiling users v0.9.1
error[E0433]: failed to resolve: could not find `unix` in `os`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\lib.rs:125:16
    |
125 | 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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:40:20
   |
40 | use libc::{c_char, uid_t, gid_t, c_int};
   |                    ^^^^^  ^^^^^ no `gid_t` in the root
   |                    |
   |                    no `uid_t` in the root

error[E0432]: unresolved import `libc::passwd`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:41:5
   |
41 | use libc::passwd as c_passwd;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ no `passwd` in the root

error[E0432]: unresolved import `libc::group`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:42:5
   |
42 | use libc::group as c_group;
   |     ^^^^^^^^^^^^^^^^^^^^^^ no `group` in the root

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\cache.rs:85:12
   |
85 | 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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\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

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
 --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\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

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
 --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\traits.rs:4:12
  |
4 | use libc::{uid_t, gid_t};
  |            ^^^^^  ^^^^^ no `gid_t` in the root
  |            |
  |            no `uid_t` in the root

error[E0433]: failed to resolve: could not find `UserExtras` in `os`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:73:26
   |
73 |         let extras = os::UserExtras::default();
   |                          ^^^^^^^^^^ could not find `UserExtras` in `os`

error[E0433]: failed to resolve: could not find `GroupExtras` in `os`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:187:26
    |
187 |         let extras = os::GroupExtras::default();
    |                          ^^^^^^^^^^^ could not find `GroupExtras` in `os`

error[E0433]: failed to resolve: could not find `UserExtras` in `os`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:255:32
    |
255 |             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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:270:28
    |
270 |             extras:    os::GroupExtras::from_struct(group),
    |                            ^^^^^^^^^^^ could not find `GroupExtras` in `os`

error[E0412]: cannot find type `UserExtras` in module `os`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:52:17
   |
52 |     extras: os::UserExtras,
   |                 ^^^^^^^^^^ not found in `os`

error[E0412]: cannot find type `GroupExtras` in module `os`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:166:17
    |
166 |     extras: os::GroupExtras,
    |                 ^^^^^^^^^^^ not found in `os`

error[E0425]: cannot find function `getpwuid_r` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:326:15
    |
326 |         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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:375:15
    |
375 |         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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:415:15
    |
415 |         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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:464:15
    |
464 |         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\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:495:20
    |
495 |     unsafe { libc::getuid() }
    |                    ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `geteuid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:537:20
    |
537 |     unsafe { libc::geteuid() }
    |                    ^^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getgid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:576:20
    |
576 |     unsafe { libc::getgid() }
    |                    ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getegid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:615:20
    |
615 |     unsafe { libc::getegid() }
    |                    ^^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getgroups` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:659:15
    |
659 |         libc::getgroups(1024, buff.as_mut_ptr())
    |               ^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `buff` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:697:21
    |
697 |     let mut count = buff.len() as c_int;
    |                     ^^^^ not found in this scope

error[E0425]: cannot find value `res` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:710:8
    |
710 |     if res < 0 {
    |        ^^^ not found in this scope

error[E0425]: cannot find value `buff` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:714:9
    |
714 |         buff.dedup();
    |         ^^^^ not found in this scope

error[E0425]: cannot find value `buff` in this scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:715:9
    |
715 |         buff.into_iter()
    |         ^^^^ not found in this scope

error[E0425]: cannot find function `setpwent` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:766:11
    |
766 |     libc::setpwent();
    |           ^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `endpwent` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:773:24
    |
773 |         unsafe { libc::endpwent() };
    |                        ^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `getpwent` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:786:39
    |
786 |         unsafe { passwd_to_user(libc::getpwent()) }
    |                                       ^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `setuid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\switch.rs:36:26
    |
36  |     match unsafe { libc::setuid(uid) } {
    |                          ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `setgid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\switch.rs:62:26
    |
62  |     match unsafe { libc::setgid(gid) } {
    |                          ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\libc-0.2.60\src\windows\mod.rs:370:5
    |
370 |     pub fn getpid() -> ::c_int;
    |     --------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `seteuid` in crate `libc`
  --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\switch.rs:88:26
   |
88 |     match unsafe { libc::seteuid(uid) } {
   |                          ^^^^^^^ not found in `libc`

error[E0425]: cannot find function `setegid` in crate `libc`
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\switch.rs:114:26
    |
114 |     match unsafe { libc::setegid(gid) } {
    |                          ^^^^^^^ not found in `libc`

error[E0599]: no function or associated item named `from_bytes` found for struct `std::ffi::OsStr` in the current scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:244:12
    |
244 |     OsStr::from_bytes(CStr::from_ptr(p).to_bytes()).to_os_string()
    |            ^^^^^^^^^^ function or associated item not found in `std::ffi::OsStr`

error[E0599]: no method named `as_bytes` found for reference `&std::ffi::OsStr` in the current scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:361:57
    |
361 |     let username = match CString::new(username.as_ref().as_bytes()) {
    |                                                         ^^^^^^^^ method not found in `&std::ffi::OsStr`

error[E0599]: no method named `as_bytes` found for reference `&std::ffi::OsStr` in the current scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:450:59
    |
450 |     let groupname = match CString::new(groupname.as_ref().as_bytes()) {
    |                                                           ^^^^^^^^ method not found in `&std::ffi::OsStr`

error[E0599]: no method named `as_bytes` found for reference `&std::ffi::OsStr` in the current scope
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\base.rs:696:47
    |
696 |     let name = CString::new(username.as_ref().as_bytes()).unwrap();
    |                                               ^^^^^^^^ method not found in `&std::ffi::OsStr`

error[E0282]: type annotations needed
   --> C:\Users\jimi\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\users-0.9.1\src\cache.rs:127:40
    |
127 |                 forward:  RefCell::new(HashMap::new()),
    |                                        ^^^^^^^^^^^^ cannot infer type for type parameter `K`

error: aborting due to 40 previous errors

Some errors have detailed explanations: E0282, E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `users`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
@lespea
Copy link

lespea commented May 28, 2020

Dupe of #32
There is a fork in the comments that sorta works on windows

@slaughtering
Copy link

#32 (comment)
cargo install --git https://github.com/zkat/exa

@mikemadden42
Copy link
Author

Thanks for all the work on exa. Any thoughts when Windows will be officially supported?

@noeRls
Copy link

noeRls commented May 26, 2021

There is a PR for the support of windows #820

@ariasuni
Copy link
Collaborator

Closing this in favor of this older issue: #32 (I added the link to the PR in the first comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants