ehuss / cargo-clone-crate

Cargo subcommand to clone a repo from the registry.
MIT License
13 stars 3 forks source link

cargo install cargo-clone-crate mio v0.7.14 fails #8

Closed davehorner closed 2 years ago

davehorner commented 2 years ago

could not find 'ioapiset' in 'um' and expected struct OVERLAPPED_ENTRY, found struct windows_sys::Windows::Win32::System::IO::OVERLAPPED_ENTRY

error[E0432]: unresolved import `winapi::um::ioapiset`
  --> C:\Users\\.cargo\registry\src\github.com-1ecc6299db9ec823\mio-0.7.14\src\sys\windows\named_pipe.rs:12:17
   |
12 | use winapi::um::ioapiset::CancelIoEx;
   |                 ^^^^^^^^ could not find `ioapiset` in `um`

error[E0308]: mismatched types
   --> C:\Users\r\.cargo\registry\src\github.com-1ecc6299db9ec823\mio-0.7.14\src\sys\windows\selector.rs:514:26
    |
514 |                 callback(iocp_event.entry(), Some(events));
    |                          ^^^^^^^^^^^^^^^^^^ expected struct `OVERLAPPED_ENTRY`, found struct `windows_sys::Windows::Win32::System::IO::OVERLAPPED_ENTRY`
    |
    = note: expected reference `&OVERLAPPED_ENTRY`
               found reference `&windows_sys::Windows::Win32::System::IO::OVERLAPPED_ENTRY````

===rustup show===
Default host: i686-pc-windows-msvc
rustup home:  C:\Users\\.rustup
installed toolchains
--------------------
stable-x86_64-pc-windows-msvc
nightly-i686-pc-windows-msvc
nightly-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-msvc (default)
active toolchain
----------------
nightly-x86_64-pc-windows-msvc (default)
rustc 1.58.0-nightly (a77da2d45 2021-11-19)

any ideas on how to resolve these errors?

ehuss commented 2 years ago

It looks like this was caused by a new version of miow, which has since been yanked (https://github.com/yoshuawuyts/miow/issues/51). Can you try to install again?

davehorner commented 2 years ago

Installing again provides a linker error about userenv.lib being missing.

ehuss commented 2 years ago

Which versions of the Windows SDK do you have installed?

Can you include the full text of the output from cargo?

davehorner commented 2 years ago

I did not realize there was a windows sdk dependency. Installing choco install windows-sdk-10.0. This did not resolve the issue

error: linking with link.exe failed: exit code: 1181 = note: LINK : fatal error LNK1181: cannot open input file 'userenv.lib' error: could not compile proc-macro2 due to previous error warning: build failed, waiting for other jobs to finish... error: linking with link.exe failed: exit code: 1181

the environment vars I do not share typically.

ehuss commented 2 years ago

The typical way to install the SDK is via the Visual Studio Installer. One way is to check the "Visual Studio Build Tools" option, enable "Desktop development with C++", and make sure that "Windows 10 SDK" is enabled.

davehorner commented 2 years ago

working fine on two machines after using: choco install visualstudio2019-workload-vctools thank you.