Skip to content

Fail to install on Windows #65

@tan-wei

Description

@tan-wei

Versions:

  • rustc 1.43.0-nightly (c9290dcee 2020-02-04)

Error message:

 $ cargo install du-dust
    Updating crates.io index
  Downloaded du-dust v0.4.4
  Downloaded 1 crate (21.7 KB) in 3.21s
  Installing du-dust v0.4.4
   Compiling autocfg v0.1.7
   Compiling semver-parser v0.7.0
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling libc v0.2.66
   Compiling scopeguard v1.0.0
   Compiling winapi v0.3.8
   Compiling rayon-core v1.7.0
   Compiling bitflags v1.2.1
   Compiling either v1.5.3
   Compiling unicode-width v0.1.7
   Compiling vec_map v0.8.1
   Compiling strsim v0.8.0
   Compiling semver v0.9.0
   Compiling textwrap v0.11.0
   Compiling rustc_version v0.2.3
   Compiling num_cpus v1.12.0
   Compiling crossbeam-utils v0.7.0
   Compiling crossbeam-epoch v0.8.0
   Compiling memoffset v0.5.3
   Compiling crossbeam-queue v0.2.1
   Compiling crossbeam-channel v0.4.0
   Compiling crossbeam-deque v0.7.2
   Compiling crossbeam v0.7.3
   Compiling rayon v1.3.0
   Compiling atty v0.2.14
   Compiling ansi_term v0.12.1
   Compiling clap v2.33.0
   Compiling jwalk v0.4.0
   Compiling du-dust v0.4.4
error[E0425]: cannot find function `get_filesystem` in this scope
   --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\mod.rs:103:24
    |
103 |         if let Ok(a) = get_filesystem(file_name) {
    |                        ^^^^^^^^^^^^^^ not found in this scope

error[E0658]: use of unstable library feature 'windows_by_handle'
  --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\platform.rs:29:52
   |
29 |         let windows_equivalent_of_inode = Some((md.file_index(), md.volume_serial_number()));
   |                                                    ^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/63010
   = help: add `#![feature(windows_by_handle)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'windows_by_handle'
  --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\platform.rs:29:69
   |
29 |         let windows_equivalent_of_inode = Some((md.file_index(), md.volume_serial_number()));
   |                                                                     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/63010
   = help: add `#![feature(windows_by_handle)]` to the crate attributes to enable

error[E0308]: mismatched types
  --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\platform.rs:28:5
   |
26 |   pub fn get_metadata(d: &DirEntry, use_apparent_size: bool) -> Option<(u64, Option<(u64, u64)>)> {        |                                                                 --------------------------------- expected `std::option::Option<(u64, std::option::Option<(u64, u64)>)>` because of return type
27 |       use std::os::windows::fs::MetadataExt;
28 | /     d.metadata.as_ref().unwrap().as_ref().ok().map(|md| {
29 | |         let windows_equivalent_of_inode = Some((md.file_index(), md.volume_serial_number()));
30 | |         (md.file_size(), windows_equivalent_of_inode)
31 | |     })
   | |______^ expected `u64`, found enum `std::option::Option`
   |
   = note: expected enum `std::option::Option<(_, std::option::Option<(u64, u64)>)>`
              found enum `std::option::Option<(_, std::option::Option<(std::option::Option<u64>, std::option::Option<u32>)>)>`

error[E0658]: use of unstable library feature 'windows_by_handle'
  --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\platform.rs:55:17
   |
55 |     Ok(metadata.volume_serial_number())
   |                 ^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/63010
   = help: add `#![feature(windows_by_handle)]` to the crate attributes to enable

error[E0308]: mismatched types
  --> C:\Users\Winterreise\.cargo\registry\src\github.com-1ecc6299db9ec823\du-dust-0.4.4\src\utils\platform.rs:55:8
   |
55 |     Ok(metadata.volume_serial_number())
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found enum `std::option::Option`
   |
   = note: expected type `u64`
              found enum `std::option::Option<u32>`

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0308, E0425, E0658.
For more information about an error, try `rustc --explain E0308`.
error: failed to compile `du-dust v0.4.4`, intermediate artifacts can be found at `C:\Users\WINTER~1\AppData\Local\Temp\cargo-installTgeiQE`

Caused by:
  could not compile `du-dust`.

To learn more, run the command again with --verbose.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions