pkolaczk / fclones

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

`cargo install fclones` fails #225

Closed koutheir closed 10 months ago

koutheir commented 10 months ago

Installing fclones through cargo install fails:

$ cargo install fclones
    Updating crates.io index
  Installing fclones v0.32.1
    Updating crates.io index
   Compiling libc v0.2.147
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling memchr v2.6.0
   Compiling scopeguard v1.2.0
   Compiling crossbeam-utils v0.8.16
   Compiling serde v1.0.188
   Compiling version_check v0.9.4
   Compiling typenum v1.16.0
   Compiling bitflags v1.3.2
   Compiling once_cell v1.18.0
   Compiling smallvec v1.11.0
   Compiling io-lifetimes v1.0.11
   Compiling regex-syntax v0.7.5
   Compiling lazy_static v1.4.0
   Compiling parking_lot_core v0.8.6
   Compiling rustix v0.37.23
   Compiling memoffset v0.9.0
   Compiling crossbeam-epoch v0.9.15
   Compiling lock_api v0.4.10
   Compiling num-traits v0.2.16
   Compiling instant v0.1.12
   Compiling generic-array v0.14.7
   Compiling aho-corasick v1.0.4
   Compiling utf8parse v0.2.1
   Compiling quote v1.0.33
   Compiling subtle v2.5.0
   Compiling crc32fast v1.3.2
   Compiling log v0.4.20
   Compiling linux-raw-sys v0.3.8
   Compiling rayon-core v1.11.0
   Compiling crossbeam-channel v0.5.8
   Compiling anstyle-parse v0.2.1
   Compiling indexmap v1.9.3
   Compiling memoffset v0.7.1
   Compiling getrandom v0.2.10
   Compiling syn v2.0.29
   Compiling num_cpus v1.16.0
   Compiling cc v1.0.83
   Compiling anstyle-query v1.0.0
   Compiling portable-atomic v1.4.3
   Compiling anstyle v1.0.2
   Compiling colorchoice v1.0.0
   Compiling arrayvec v0.7.4
   Compiling regex-automata v0.3.7
   Compiling byteorder v1.4.3
   Compiling thiserror v1.0.47
   Compiling crossbeam-deque v0.8.3
   Compiling parking_lot_core v0.9.8
   Compiling either v1.9.0
   Compiling rust_decimal v1.32.0
   Compiling parking_lot v0.11.2
   Compiling anstream v0.5.0
   Compiling rand_core v0.6.4
   Compiling blake3 v1.4.1
   Compiling fs2 v0.4.3
   Compiling time v0.1.45
   Compiling bstr v1.6.0
   Compiling priority-queue v1.3.2
   Compiling fxhash v0.2.1
   Compiling iana-time-zone v0.1.57
   Compiling ppv-lite86 v0.2.17
   Compiling fnv v1.0.7
   Compiling unicode-width v0.1.10
   Compiling itoa v1.0.9
   Compiling option-ext v0.2.0
   Compiling minimal-lexical v0.2.1
   Compiling heck v0.4.1
   Compiling terminal_size v0.2.6
   Compiling serde_json v1.0.105
   Compiling same-file v1.0.6
   Compiling regex v1.9.4
   Compiling bitflags v2.4.0
   Compiling ryu v1.0.15
   Compiling clap_lex v0.5.1
   Compiling strsim v0.10.0
   Compiling hashbrown v0.12.3
   Compiling rand_chacha v0.3.1
   Compiling serde_derive v1.0.188
   Compiling pin-project-internal v1.1.3
   Compiling thiserror-impl v1.0.47
   Compiling dirs-sys v0.4.1
   Compiling nom v7.1.3
   Compiling console v0.15.7
   Compiling clap_derive v4.4.0
   Compiling nix v0.27.1
   Compiling walkdir v2.3.3
   Compiling rayon v1.7.0
   Compiling clap_builder v4.4.1
   Compiling sled v0.34.7
   Compiling globset v0.4.13
   Compiling csv-core v0.1.10
   Compiling thread_local v1.1.7
   Compiling number_prefix v0.4.0
   Compiling utf8-width v0.1.6
   Compiling keccak v0.1.4
   Compiling pin-utils v0.1.0
   Compiling arrayref v0.3.7
   Compiling cpufeatures v0.2.9
   Compiling hashbrown v0.14.0
   Compiling constant_time_eq v0.3.0
   Compiling sysinfo v0.29.9
   Compiling ignore v0.4.20
   Compiling nom-regex v0.2.0
   Compiling nix v0.26.4
   Compiling indicatif v0.17.6
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling file-owner v0.1.1
   Compiling dirs v5.0.1
error[E0432]: unresolved import `nix::unistd::chown`
   --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-owner-0.1.1/src/lib.rs:44:5
    |
44  | use nix::unistd::chown;
    |     ^^^^^^^^^^^^^^^^^^ no `chown` in `unistd`
    |
note: found an item that was configured out
   --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:725:8
    |
725 | pub fn chown<P: ?Sized + NixPath>(
    |        ^^^^^

error[E0432]: unresolved imports `nix::unistd::Gid`, `nix::unistd::Uid`, `nix::unistd::Group`, `nix::unistd::User`
    --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-owner-0.1.1/src/lib.rs:45:19
     |
45   | use nix::unistd::{Gid, Uid, Group as NixGroup, User};
     |                   ^^^  ^^^  ^^^^^^^^^^^^^^^^^  ^^^^ no `User` in `unistd`
     |                   |    |    |
     |                   |    |    no `Group` in `unistd`
     |                   |    no `Uid` in `unistd`
     |                   no `Gid` in `unistd`
     |
note: found an item that was configured out
    --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:131:12
     |
131  | pub struct Gid(gid_t);
     |            ^^^
     = note: the item is gated behind the `user` feature
note: found an item that was configured out
    --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:74:12
     |
74   | pub struct Uid(uid_t);
     |            ^^^
     = note: the item is gated behind the `user` feature
note: found an item that was configured out
    --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:3749:12
     |
3749 | pub struct Group {
     |            ^^^^^
     = note: the item is gated behind the `user` feature
note: found an item that was configured out
    --> /home/koutheir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:3445:12
     |
3445 | pub struct User {
     |            ^^^^
     = note: the item is gated behind the `user` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `file-owner` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `fclones v0.32.1`, intermediate artifacts can be found at `/tmp/cargo-install0NexDB`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

By the way:

$ rustc --version
rustc 1.72.0 (5680fa18f 2023-08-23)
koutheir commented 10 months ago

cargo install --git https://github.com/pkolaczk/fclones fclones fails as well.

koutheir commented 10 months ago

The PR #226 fixes the problem, but a new release that includes the fix is needed in order to allow people to cargo install fclones again.