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

[Help] crate winapi 0.28 cannot be found #1037

Open
StEvUgnIn opened this issue Jan 28, 2023 · 1 comment
Open

[Help] crate winapi 0.28 cannot be found #1037

StEvUgnIn opened this issue Jan 28, 2023 · 1 comment

Comments

@StEvUgnIn
Copy link

Hello,
I am trying to build a repository with dependencies to winapi and kernel32-sys.

I am using a script which calls cargo build.

I added dependencies to my Cargo.toml and to the dependency.

I choose to run cargo build against the dependency, it runs fine.

But it breaks when I am compiling from the repository.

+ RUSTFLAGS='--print native-static-libs -C target-feature=+sse4.1'
+ cargo +nightly-2022-05-09-x86_64-pc-windows-gnu build --release --offline --no-default-features --features multicore-sdr,opencl
+ tee /tmp/tmp.ei5M7SZbOg
   Compiling storage-proofs-porep v12.0.0
error[E0463]: can't find crate for `winapi`
  --> C:\Users\stevu\.cargo\registry\src\github.com-1ecc6299db9ec823\storage-proofs-porep-12.0.0\src\stacked\vanilla\cores.rs:10:1
   |
10 | extern crate winapi;
   | ^^^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `kernel32`
  --> C:\Users\stevu\.cargo\registry\src\github.com-1ecc6299db9ec823\storage-proofs-porep-12.0.0\src\stacked\vanilla\cores.rs:11:1
   |
11 | extern crate kernel32;
   | ^^^^^^^^^^^^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `storage-proofs-porep` due to 2 previous errors
+ rm -f /tmp/tmp.ei5M7SZbOg
make[1]: *** [Makefile:14: .install-filcrypto] Error 101
make[1]: Leaving directory '/c/Users/stevu/lotus-local-net/extern/filecoin-ffi'
make: *** [Makefile:41: build/.filecoin-install] Error 2

The repository I am trying to compile is here: https://github.com/filecoin-project/lotus/tree/ntwk/wallaby

@StEvUgnIn
Copy link
Author

Tried running cargo add [email protected] --target "cfg(windows)" --features winuser but fails.

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

1 participant