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

binsider does not compile on windows. #125

Closed
g-berthiaume opened this issue Mar 4, 2025 · 6 comments
Closed

binsider does not compile on windows. #125

g-berthiaume opened this issue Mar 4, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@g-berthiaume
Copy link

Describe the bug

binsider does not compile on Windows.
I'm on main because this issue was fixed.

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` (lib) due to 41 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `binsider v0.2.1`, intermediate artifacts can be found at `C:\Users\gabriel\AppData\Local\Temp\cargo-installxp7tmg`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Let me know if you want more info!

To reproduce

 cargo install binsider

Expected behavior

no error

Software information

  • Operating system: Microsoft Windows 11 Pro
  • Rust version: rustc 1.85.0 (4d91de4e4 2025-02-17)
  • Project version: main (d3b90ad)
@g-berthiaume g-berthiaume added the bug Something isn't working label Mar 4, 2025
@orhun
Copy link
Owner

orhun commented Mar 4, 2025

Can you post the full error log? Those logs seem like they have been stripped.

@g-berthiaume
Copy link
Author

Yes. I should've included them from the start.

λ  cargo install binsider
    Updating crates.io index
  Installing binsider v0.2.1
    Updating crates.io index
     Locking 286 packages to latest compatible versions
      Adding ansi-to-tui v6.0.1 (available: v7.0.0)
      Adding bytesize v1.3.2 (available: v2.0.1)
      Adding itertools v0.13.0 (available: v0.14.0)
      Adding ratatui v0.28.1 (available: v0.29.0)
      Adding sysinfo v0.32.1 (available: v0.33.1)
      Adding termbg v0.5.2 (available: v0.6.2)
      Adding thiserror v1.0.69 (available: v2.0.12)
      Adding tui-big-text v0.6.1 (available: v0.7.1)
      Adding tui-input v0.10.1 (available: v0.11.1)
      Adding tui-popup v0.5.1 (available: v0.6.0)
      Adding which v6.0.3 (available: v7.0.2)
   Compiling proc-macro2 v1.0.94
   Compiling unicode-ident v1.0.18
   Compiling windows_x86_64_msvc v0.52.6
   Compiling autocfg v1.4.0
   Compiling crossbeam-utils v0.8.21
   Compiling cfg-if v1.0.0
   Compiling smallvec v1.14.0
   Compiling bitflags v2.9.0
   Compiling strsim v0.11.1
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling stable_deref_trait v1.2.0
   Compiling winapi v0.3.9
   Compiling parking_lot_core v0.9.10
   Compiling pin-project-lite v0.2.16
   Compiling scopeguard v1.2.0
   Compiling rustversion v1.0.20
   Compiling parking v2.2.1
   Compiling heck v0.5.0
   Compiling once_cell v1.20.3
   Compiling value-bag v1.10.0
   Compiling writeable v0.5.5
   Compiling futures-core v0.3.31
   Compiling libc v0.2.170
   Compiling itoa v1.0.15
   Compiling either v1.14.0
   Compiling unicode-segmentation v1.12.0
   Compiling windows-targets v0.52.6
   Compiling log v0.4.26
   Compiling ryu v1.0.20
   Compiling litemap v0.7.5
   Compiling memchr v2.7.4
   Compiling futures-io v0.3.31
   Compiling windows-sys v0.59.0
   Compiling lock_api v0.4.12
   Compiling foldhash v0.1.4
   Compiling allocator-api2 v0.2.21
   Compiling paste v1.0.15
   Compiling fastrand v2.3.0
   Compiling equivalent v1.0.2
   Compiling slab v0.4.9
   Compiling itertools v0.13.0
   Compiling static_assertions v1.1.0
   Compiling quote v1.0.39
   Compiling icu_locid_transform_data v1.5.0
   Compiling concurrent-queue v2.5.0
   Compiling hashbrown v0.15.2
   Compiling indoc v2.0.6
   Compiling unicode-width v0.1.14
   Compiling futures-lite v2.6.0
   Compiling syn v2.0.99
   Compiling parking_lot v0.12.3
   Compiling event-listener v5.4.0
   Compiling rustix v0.38.44
   Compiling icu_properties_data v1.5.0
   Compiling cassowary v0.3.0
   Compiling castaway v0.2.3
   Compiling tracing-core v0.1.33
   Compiling event-listener-strategy v0.5.3
   Compiling compact_str v0.8.1
   Compiling anstyle v1.0.10
   Compiling utf8parse v0.2.2
   Compiling anstyle-parse v0.2.6
   Compiling lru v0.12.5
   Compiling tracing v0.1.41
   Compiling utf16_iter v1.0.5
   Compiling async-task v4.7.1
   Compiling is_terminal_polyfill v1.70.1
   Compiling write16 v1.0.0
   Compiling icu_normalizer_data v1.5.0
   Compiling unicode-width v0.2.0
   Compiling atomic-waker v1.1.2
   Compiling serde v1.0.218
   Compiling colorchoice v1.0.3
   Compiling utf8_iter v1.0.4
   Compiling async-lock v3.4.0
   Compiling piper v0.2.4
   Compiling async-channel v2.3.1
   Compiling cfg_aliases v0.2.1
   Compiling clap_lex v0.7.4
   Compiling thiserror v1.0.69
   Compiling nix v0.29.0
   Compiling async-executor v1.13.1
   Compiling blocking v1.6.1
   Compiling aho-corasick v1.1.3
   Compiling crossbeam-epoch v0.9.18
   Compiling fs-err v3.1.0
   Compiling num-traits v0.2.19
   Compiling windows-result v0.1.2
   Compiling event-listener v2.5.3
   Compiling unicode-truncate v1.1.0
   Compiling crossterm_winapi v0.9.1
   Compiling anyhow v1.0.97
   Compiling regex-syntax v0.8.5
   Compiling serde_json v1.0.140
   Compiling error-code v3.3.1
   Compiling percent-encoding v2.3.1
   Compiling encode_unicode v1.0.0
   Compiling syscalls v0.6.18
   Compiling async-channel v1.9.0
   Compiling crossbeam-deque v0.8.6
   Compiling form_urlencoded v1.2.1
   Compiling crossterm v0.28.1
   Compiling clipboard-win v5.4.0
   Compiling crossbeam-channel v0.5.14
   Compiling crossbeam-queue v0.3.12
   Compiling kv-log-macro v1.0.7
   Compiling rustc-demangle v0.1.24
   Compiling litrs v0.4.1
   Compiling minimal-lexical v0.2.1
   Compiling pin-utils v0.1.0
   Compiling plain v0.2.3
   Compiling arboard v3.4.1
   Compiling users v0.11.0
   Compiling nom v7.1.3
error[E0433]: failed to resolve: could not find `unix` in `os`
  --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:36:14
   |
36 | use std::os::unix::ffi::OsStrExt;
   |              ^^^^ could not find `unix` in `os`
   |
note: found an item that was configured out
  --> C:\Users\gabriel\scoop\persist\rustup\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:36:9
   |
36 | pub mod unix {}
   |         ^^^^
note: the item is gated here
  --> C:\Users\gabriel\scoop\persist\rustup\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:28:1
   |
28 | / #[cfg(all(
29 | |     doc,
30 | |     any(
31 | |         all(target_arch = "wasm32", not(target_os = "wasi")),
...  |
34 | | ))]
   | |___^
note: found an item that was configured out
  --> C:\Users\gabriel\scoop\persist\rustup\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:85:9
   |
85 | pub mod unix;
   |         ^^^^
note: the item is gated here
  --> C:\Users\gabriel\scoop\persist\rustup\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:84:1
   |
84 | #[cfg(all(not(target_os = "hermit"), any(unix, doc)))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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 through its public re-export instead:
           uid_t
   = help: consider importing this unresolved item through its public re-export instead:
           gid_t

error[E0432]: unresolved import `libc::passwd`
  --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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 through its public re-export instead:
           uid_t
   = help: consider importing this unresolved item through its public re-export instead:
           gid_t

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
  --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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 through its public re-export instead:
           uid_t
   = help: consider importing this unresolved item through its public re-export instead:
           gid_t

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
 --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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 through its public re-export instead:
          uid_t
  = help: consider importing this unresolved item through its public re-export instead:
          gid_t

error[E0432]: unresolved imports `libc::uid_t`, `libc::gid_t`
 --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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 through its public re-export instead:
          uid_t
  = help: consider importing this unresolved item through its public re-export instead:
          gid_t

error[E0433]: failed to resolve: could not find `UserExtras` in `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:78:26
     |
78   |         let extras = os::UserExtras::default();
     |                          ^^^^^^^^^^ could not find `UserExtras` in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1176:14
     |
1176 |     pub type UserExtras = bsd::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1175:5
     |
1175 |     #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1180:14
     |
1180 |     pub type UserExtras = unix::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1179:5
     |
1179 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: could not find `GroupExtras` in `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:192:26
     |
192  |         let extras = os::GroupExtras::default();
     |                          ^^^^^^^^^^^ could not find `GroupExtras` in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1184:14
     |
1184 |     pub type GroupExtras = unix::GroupExtras;
     |              ^^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1183:5
     |
1183 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: could not find `UserExtras` in `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:266:28
     |
266  |         extras:        os::UserExtras::from_passwd(passwd),
     |                            ^^^^^^^^^^ could not find `UserExtras` in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1176:14
     |
1176 |     pub type UserExtras = bsd::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1175:5
     |
1175 |     #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1180:14
     |
1180 |     pub type UserExtras = unix::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1179:5
     |
1179 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: could not find `GroupExtras` in `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:280:23
     |
280  |         extras:   os::GroupExtras::from_struct(group),
     |                       ^^^^^^^^^^^ could not find `GroupExtras` in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1184:14
     |
1184 |     pub type GroupExtras = unix::GroupExtras;
     |              ^^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1183:5
     |
1183 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0412]: cannot find type `UserExtras` in module `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:57:17
     |
57   |     extras: os::UserExtras,
     |                 ^^^^^^^^^^ not found in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1176:14
     |
1176 |     pub type UserExtras = bsd::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1175:5
     |
1175 |     #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1180:14
     |
1180 |     pub type UserExtras = unix::UserExtras;
     |              ^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1179:5
     |
1179 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0412]: cannot find type `GroupExtras` in module `os`
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:171:17
     |
171  |     extras: os::GroupExtras,
     |                 ^^^^^^^^^^^ not found in `os`
     |
note: found an item that was configured out
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1184:14
     |
1184 |     pub type GroupExtras = unix::GroupExtras;
     |              ^^^^^^^^^^^
note: the item is gated here
    --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:1183:5
     |
1183 |     #[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "solaris"))]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: cannot find function `getpwuid_r` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:556:20
    |
556 |     unsafe { libc::getuid() }
    |                    ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `geteuid` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:603:20
    |
603 |     unsafe { libc::geteuid() }
    |                    ^^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getgid` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:647:20
    |
647 |     unsafe { libc::getgid() }
    |                    ^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getegid` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:691:20
    |
691 |     unsafe { libc::getegid() }
    |                    ^^^^^^^ help: a function with a similar name exists: `getpid`
    |
   ::: C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `getgroups` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `setgid` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libc-0.2.170\src\windows\mod.rs:484:5
    |
484 |     pub fn getpid() -> c_int;
    |     ------------------------- similarly named function `getpid` defined here

error[E0425]: cannot find function `seteuid` in crate `libc`
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\switch.rs:134:26
    |
134 |     match unsafe { libc::setegid(gid) } {
    |                          ^^^^^^^ not found in `libc`

   Compiling anstyle-query v1.1.2
   Compiling errno v0.3.10
error[E0599]: no function or associated item named `from_bytes` found for struct `OsStr` in the current scope
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\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\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:380:57
    |
380 |     let username = match CString::new(username.as_ref().as_bytes()) {
    |                                                         ^^^^^^^^
    |
help: there is a method `as_encoded_bytes` with a similar name
    |
380 |     let username = match CString::new(username.as_ref().as_encoded_bytes()) {
    |                                                         ~~~~~~~~~~~~~~~~

error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:495:59
    |
495 |     let groupname = match CString::new(groupname.as_ref().as_bytes()) {
    |                                                           ^^^^^^^^
    |
help: there is a method `as_encoded_bytes` with a similar name
    |
495 |     let groupname = match CString::new(groupname.as_ref().as_encoded_bytes()) {
    |                                                           ~~~~~~~~~~~~~~~~

error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\base.rs:782:47
    |
782 |     let name = CString::new(username.as_ref().as_bytes()).unwrap();
    |                                               ^^^^^^^^
    |
help: there is a method `as_encoded_bytes` with a similar name
    |
782 |     let name = CString::new(username.as_ref().as_encoded_bytes()).unwrap();
    |                                               ~~~~~~~~~~~~~~~~

error[E0282]: type annotations needed
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\cache.rs:207:43
    |
207 |             Occupied(e) => return e.get().as_ref().map(Arc::clone),
    |                                           ^^^^^^ cannot infer type for type parameter `V` declared on the enum `Entry`

   Compiling anstyle-wincon v3.0.7
error[E0282]: type annotations needed
   --> C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\users-0.11.0\src\cache.rs:288:43
    |
288 |             Occupied(e) => return e.get().as_ref().map(Arc::clone),
    |                                           ^^^^^^ cannot infer type for type parameter `V` declared on the enum `Entry`

   Compiling terminal_size v0.4.1
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` (lib) due to 41 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `binsider v0.2.1`, intermediate artifacts can be found at `C:\Users\gabriel\AppData\Local\Temp\cargo-installdhrgVW`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

@orhun
Copy link
Owner

orhun commented Mar 4, 2025

Try disabling the feature flags.

cargo install binsider --no-default-features

@g-berthiaume
Copy link
Author

Hi @orhun,

I ran the command you suggested, and I was able to install binsider.

That said, the program now has a runtime panic.

$ binsider .\build\raddbg.exe
thread 'main' panicked at C:\Users\gabriel\scoop\persist\rustup\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\binsider-0.2.1\src\file.rs:157:9:
not implemented
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@orhun
Copy link
Owner

orhun commented Mar 21, 2025

Yeah that should be fixed in main branch.

Try cargo install binsider --no-default-features --git https://github.com/orhun/binsider

@g-berthiaume
Copy link
Author

It appears to be working! (no crash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants