[GH-ISSUE #65] Fail to install on Windows #28

Closed
opened 2026-06-08 11:25:22 +03:00 by zhus · 3 comments
Owner

Originally created by @tan-wei on GitHub (Feb 5, 2020).
Original GitHub issue: https://github.com/bootandy/dust/issues/65

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!

Originally created by @tan-wei on GitHub (Feb 5, 2020). Original GitHub issue: https://github.com/bootandy/dust/issues/65 Versions: - rustc 1.43.0-nightly (c9290dcee 2020-02-04) Error message: ```console $ 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!
zhus closed this issue 2026-06-08 11:25:22 +03:00
Author
Owner

@bootandy commented on GitHub (Feb 9, 2020):

Noted, I didn't have a windows machine.

However windows has now been added to the CI so this should not happen again and will be fixed with the new release.

<!-- gh-comment-id:583826686 --> @bootandy commented on GitHub (Feb 9, 2020): Noted, I didn't have a windows machine. However windows has now been added to the CI so this should not happen again and will be fixed with the new release.
Author
Owner

@bootandy commented on GitHub (Feb 9, 2020):

Should be fixed with version 0.4.5

<!-- gh-comment-id:583827338 --> @bootandy commented on GitHub (Feb 9, 2020): Should be fixed with version 0.4.5
Author
Owner

@tan-wei commented on GitHub (Feb 9, 2020):

Successfully install du-dust v0.4.5. Thanks! The issue can be closed.

<!-- gh-comment-id:583851874 --> @tan-wei commented on GitHub (Feb 9, 2020): Successfully install `du-dust v0.4.5`. Thanks! The issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#28