Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install / compilation fails on Windows 10 | winapi error #280

Closed
askor opened this issue May 9, 2024 · 2 comments
Closed

Install / compilation fails on Windows 10 | winapi error #280

askor opened this issue May 9, 2024 · 2 comments

Comments

@askor
Copy link

askor commented May 9, 2024

Tested on two separate windows machines and I get the same error.

Steps to reproduce:

Run setup:

  1. rustup toolchain install nightly --allow-downgrade
  2. rustup target add wasm32-unknown-unknown
  3. cargo install cargo-generate
  4. npm install -g sass

Then run cargo install cargo-leptos

   Compiling notify v4.0.17
   Compiling which v5.0.0
error[E0432]: unresolved import `winapi::shared::winerror`
  --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\notify-4.0.17\src\windows.rs:11:21
   |
11 | use winapi::shared::winerror::ERROR_OPERATION_ABORTED;
   |                     ^^^^^^^^ could not find `winerror` in `shared`
   |
note: found an item that was configured out
  --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\shared\mod.rs:84:38
   |
84 | #[cfg(feature = "winerror")] pub mod winerror;
   |                                      ^^^^^^^^
   = note: the item is gated behind the `winerror` feature

error[E0308]: mismatched types
   --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\notify-4.0.17\src\windows.rs:276:29
    |
276 |         overlapped.hEvent = request_p;
    |         -----------------   ^^^^^^^^^ expected `winapi::ctypes::c_void`, found `libc::c_void`
    |         |
    |         expected due to the type of this binding
    |
    = note: `libc::c_void` and `winapi::ctypes::c_void` have similar names, but are actually distinct types
note: `libc::c_void` is defined in crate `core`
   --> C:\Users\askor\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ffi\mod.rs:183:1
    |
183 | pub enum c_void {
    | ^^^^^^^^^^^^^^^
note: `winapi::ctypes::c_void` is defined in crate `winapi`
   --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\lib.rs:38:5
    |
38  |     pub enum c_void {}
    |     ^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\notify-4.0.17\src\windows.rs:282:13
     |
280  |         let ret = winbase::ReadDirectoryChangesW(
     |                   ------------------------------ arguments to this function are incorrect
281  |             handle,
282  |             req_buf,
     |             ^^^^^^^ expected `winapi::ctypes::c_void`, found `libc::c_void`
     |
     = note: `libc::c_void` and `winapi::ctypes::c_void` have similar names, but are actually distinct types
note: `libc::c_void` is defined in crate `core`
    --> C:\Users\askor\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ffi\mod.rs:183:1
     |
183  | pub enum c_void {
     | ^^^^^^^^^^^^^^^
note: `winapi::ctypes::c_void` is defined in crate `winapi`
    --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\lib.rs:38:5
     |
38   |     pub enum c_void {}
     |     ^^^^^^^^^^^^^^^
note: function defined here
    --> C:\Users\askor\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\winbase.rs:2072:12
     |
2072 |     pub fn ReadDirectoryChangesW(
     |            ^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0308, E0432.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `notify` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-leptos v0.2.17`, intermediate artifacts can be found at `C:\Users\askor\AppData\Local\Temp\cargo-installJENp9v`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@gbj
Copy link
Contributor

gbj commented May 9, 2024

Should be fixed when #274 is merged, just have not had time to review.

@askor
Copy link
Author

askor commented May 9, 2024

OK thanks 🙏 I'll close this then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants