dalance / procs

A modern replacement for ps written in Rust
MIT License
5.09k stars 114 forks source link

[OpenBSD 7.5] procs fails to build #681

Closed neelchakrabrty closed 1 month ago

neelchakrabrty commented 1 month ago

Hello,

I am trying to install procs-0.14.6 but I am facing this error currently

error[E0432]: unresolved import `crate::process::ProcessInfo`
 --> src/column.rs:2:5
  |
2 | use crate::process::ProcessInfo;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ProcessInfo` in `process`

error[E0432]: unresolved import `crate::columns::ConfigColumnKind`
 --> src/config.rs:2:5
  |
2 | use crate::columns::ConfigColumnKind;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ConfigColumnKind` in `columns`

error[E0432]: unresolved imports `crate::columns::ConfigColumnKind`, `crate::columns::KIND_LIST`
 --> src/util.rs:2:22
  |
2 | use crate::columns::{ConfigColumnKind, KIND_LIST};
  |                      ^^^^^^^^^^^^^^^^  ^^^^^^^^^ no `KIND_LIST` in `columns`
  |                      |
  |                      no `ConfigColumnKind` in `columns`

error[E0432]: unresolved import `crate::process::collect_proc`
 --> src/view.rs:4:5
  |
4 | use crate::process::collect_proc;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `collect_proc` in `process`

error[E0432]: unresolved import `uzers`
  --> src/util.rs:14:5
   |
14 | use uzers::UsersCache;
   |     ^^^^^ use of undeclared crate or module `uzers`

error[E0432]: unresolved import `pager`
  --> src/view.rs:14:5
   |
14 | use pager::Pager;
   |     ^^^^^ use of undeclared crate or module `pager`

error[E0425]: cannot find value `KIND_LIST` in this scope
   --> src/view.rs:118:37
    |
118 |                     let kind_name = KIND_LIST[&kind].0.to_lowercase();
    |                                     ^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `KIND_LIST` in this scope
   --> src/view.rs:563:37
    |
563 |                     let (kind, _) = KIND_LIST[&c.kind];
    |                                     ^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `CONFIG_DEFAULT` in this scope
   --> src/main.rs:219:24
    |
219 |         toml::from_str(CONFIG_DEFAULT).unwrap()
    |                        ^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `CONFIG_DEFAULT` in this scope
   --> src/main.rs:223:59
    |
223 |         Some(BuiltinConfig::Default) => Ok(toml::from_str(CONFIG_DEFAULT).unwrap()),
    |                                                           ^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `CONFIG_LARGE` in this scope
   --> src/main.rs:224:57
    |
224 |         Some(BuiltinConfig::Large) => Ok(toml::from_str(CONFIG_LARGE).unwrap()),
    |                                                         ^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `CONFIG_DEFAULT` in this scope
   --> src/main.rs:307:41
    |
307 |     let config: Config = toml::from_str(CONFIG_DEFAULT).unwrap();
    |                                         ^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `KIND_LIST` in this scope
   --> src/main.rs:317:24
    |
317 |     for (_, (v, d)) in KIND_LIST.iter() {
    |                        ^^^^^^^^^ not found in this scope

warning: unused import: `crate::columns::*`
 --> src/view.rs:2:5
  |
2 | use crate::columns::*;
  |     ^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `crate::column::Column`
  --> src/main.rs:11:5
   |
11 | use crate::column::Column;
   |     ^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `crate::columns::*`
  --> src/main.rs:12:5
   |
12 | use crate::columns::*;
   |     ^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
  --> src/view.rs:41:19
   |
41 |             kind: ConfigColumnKind::TreeSlot,
   |                   ^^^^^^^^^^^^^^^^
   |                   |
   |                   use of undeclared type `ConfigColumnKind`
   |                   help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
  --> src/view.rs:65:32
   |
65 |             .all(|x| x.kind != ConfigColumnKind::TreeSlot)
   |                                ^^^^^^^^^^^^^^^^
   |                                |
   |                                use of undeclared type `ConfigColumnKind`
   |                                help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
  --> src/view.rs:76:34
   |
76 |                     if x.kind == ConfigColumnKind::TreeSlot {
   |                                  ^^^^^^^^^^^^^^^^
   |                                  |
   |                                  use of undeclared type `ConfigColumnKind`
   |                                  help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
  --> src/view.rs:87:17
   |
87 |                 ConfigColumnKind::Slot => {
   |                 ^^^^^^^^^^^^^^^^
   |                 |
   |                 use of undeclared type `ConfigColumnKind`
   |                 help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
  --> src/view.rs:96:17
   |
96 |                 ConfigColumnKind::MultiSlot => {
   |                 ^^^^^^^^^^^^^^^^
   |                 |
   |                 use of undeclared type `ConfigColumnKind`
   |                 help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
   --> src/view.rs:106:17
    |
106 |                 ConfigColumnKind::TreeSlot => {
    |                 ^^^^^^^^^^^^^^^^
    |                 |
    |                 use of undeclared type `ConfigColumnKind`
    |                 help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
   --> src/view.rs:108:30
    |
108 |                         vec![ConfigColumnKind::Tree]
    |                              ^^^^^^^^^^^^^^^^
    |                              |
    |                              use of undeclared type `ConfigColumnKind`
    |                              help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared type `ConfigColumnKind`
   --> src/view.rs:582:41
    |
582 |                 .position(|x| x.kind == ConfigColumnKind::Tree)
    |                                         ^^^^^^^^^^^^^^^^
    |                                         |
    |                                         use of undeclared type `ConfigColumnKind`
    |                                         help: a struct with a similar name exists: `ConfigColumn`

error[E0433]: failed to resolve: use of undeclared crate or module `which`
   --> src/view.rs:645:19
    |
645 |         } else if which::which("less").is_ok() {
    |                   ^^^^^ use of undeclared crate or module `which`

error[E0425]: cannot find function `gen_column` in this scope
   --> src/view.rs:129:30
    |
129 |                 let column = gen_column(
    |                              ^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
warning: `procs` (bin "procs") generated 3 warnings
error: could not compile `procs` (bin "procs") due to 23 previous errors; 3 warnings emitted

How can I resolve this issue?

dalance commented 1 month ago

OpenBSD is not supported yet because it has the different API to get process information.