pkolaczk / fclones

Efficient Duplicate File Finder
MIT License
1.87k stars 70 forks source link

Build issue on FreeBsd due to sysinfo #116

Closed up2geek closed 2 years ago

up2geek commented 2 years ago

Not sure if it's just me...

error[E0432]: unresolved import `ComponentExt`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/component.rs:7:5
  |
7 | use ComponentExt;
  |     ^^^^^^^^^^^^ no external crate `ComponentExt`

error[E0432]: unresolved import `DiskExt`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/disk.rs:7:5
  |
7 | use DiskExt;
  |     ^^^^^^^ no external crate `DiskExt`

error[E0432]: unresolved import `DiskType`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/disk.rs:8:5
  |
8 | use DiskType;
  |     ^^^^^^^^ no external crate `DiskType`

error[E0432]: unresolved import `NetworkExt`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/network.rs:9:5
  |
9 | use NetworkExt;
  |     ^^^^^^^^^^ no external crate `NetworkExt`

error[E0432]: unresolved import `NetworksExt`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/network.rs:10:5
   |
10 | use NetworksExt;
   |     ^^^^^^^^^^^ no external crate `NetworksExt`

error[E0432]: unresolved import `NetworksIter`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/network.rs:11:5
   |
11 | use NetworksIter;
   |     ^^^^^^^^^^^^ no external crate `NetworksIter`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:7:5
  |
7 | use sys::component::Component;
  |     ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:8:5
  |
8 | use sys::process::*;
  |     ^^^ use of undeclared crate or module `sys`

error[E0433]: failed to resolve: use of undeclared crate or module `sys`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:9:5
  |
9 | use sys::processor::*;
  |     ^^^ use of undeclared crate or module `sys`

error[E0432]: unresolved imports `ProcessorExt`, `sys::component::Component`, `sys::process::*`, `sys::processor::*`
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/processor.rs:7:5
  |
7 | use ProcessorExt;
  |     ^^^^^^^^^^^^ no external crate `ProcessorExt`
  |
 ::: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:7:5
  |
7 | use sys::component::Component;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
8 | use sys::process::*;
  |     ^^^^^^^^^^^^^^^
9 | use sys::processor::*;
  |     ^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `sys`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:10:5
   |
10 | use sys::Disk;
   |     ^^^ help: a similar path exists: `crate::sys`
   |
   = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>

error[E0432]: unresolved import `sys`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:11:5
   |
11 | use sys::Networks;
   |     ^^^ help: a similar path exists: `crate::sys`
   |
   = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>

error[E0432]: unresolved import `LoadAvg`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:12:5
   |
12 | use LoadAvg;
   |     ^^^^^^^ no external crate `LoadAvg`

error[E0432]: unresolved import `Pid`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:13:5
   |
13 | use Pid;
   |     ^^^ no external crate `Pid`

error[E0432]: unresolved import `User`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:14:5
   |
14 | use User;
   |     ^^^^ no external crate `User`

error[E0432]: unresolved imports `RefreshKind`, `SystemExt`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:15:6
   |
15 | use {RefreshKind, SystemExt};
   |      ^^^^^^^^^^^  ^^^^^^^^^ no external crate `SystemExt`
   |      |
   |      no external crate `RefreshKind`

error[E0412]: cannot find type `Process` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:21:34
   |
21 |     processes_list: HashMap<Pid, Process>,
   |                                  ^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Process;
   |

error[E0412]: cannot find type `Processor` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:23:23
   |
23 |     global_processor: Processor,
   |                       ^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Processor;
   |

error[E0433]: failed to resolve: use of undeclared type `Processor`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:31:31
   |
31 |             global_processor: Processor::new(),
   |                               ^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Processor;
   |

error[E0412]: cannot find type `Process` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:55:46
   |
55 |     fn get_processes(&self) -> &HashMap<Pid, Process> {
   |                                              ^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Process;
   |

error[E0412]: cannot find type `Process` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:59:49
   |
59 |     fn get_process(&self, _pid: Pid) -> Option<&Process> {
   |                                                 ^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Process;
   |

error[E0412]: cannot find type `Processor` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:71:45
   |
71 |     fn get_global_processor_info(&self) -> &Processor {
   |                                             ^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Processor;
   |

error[E0412]: cannot find type `Processor` in this scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:75:35
   |
75 |     fn get_processors(&self) -> &[Processor] {
   |                                   ^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
7  | use crate::Processor;
   |

error[E0412]: cannot find type `Component` in this scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:111:35
    |
111 |     fn get_components(&self) -> &[Component] {
    |                                   ^^^^^^^^^ not found in this scope
    |
help: consider importing one of these items
    |
7   | use crate::Component;
    |
7   | use std::path::Component;
    |

error[E0412]: cannot find type `Component` in this scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.16.5/src/unknown/system.rs:115:47
    |
115 |     fn get_components_mut(&mut self) -> &mut [Component] {
    |                                               ^^^^^^^^^ not found in this scope
    |
help: consider importing one of these items
    |
7   | use crate::Component;
    |
7   | use std::path::Component;
    |

Some errors have detailed explanations: E0412, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `sysinfo` due to 25 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `fclones v0.20.1`, intermediate artifacts can be found at `/tmp/cargo-installpQjFRg`
up2geek commented 2 years ago

First day of my life ever messing with rust, but desperately wanted to try out fclone on my truenas system and was able to resolve the errors and get it working by making these changes: https://github.com/pkolaczk/fclones/pull/117/commits/c90bccf7ffb5ab9e66d4feec0b19305657780e91

Not sure if I might have broken something unknown by doing this, but in my scenario it appears to be working at the moment. I'll report back if I find any issues with the changes I made.

up2geek commented 2 years ago

I didn't actually mean to submit this PR: https://github.com/pkolaczk/fclones/pull/117

But I guess it makes it easy enough to read. I thought I was just making a PR for my own local fork, but I guess I'll leave it in case you want to take it any further.

Please provide any feedback that would tell me anywhere I went wrong or things to lookout for in the future around rust/this project. I am please with how it's working so far and always like learning

pkolaczk commented 2 years ago

Thank you! Merged.