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

Build failure under Windows 10 #10

Closed
sanmai-NL opened this issue Apr 13, 2019 · 4 comments
Closed

Build failure under Windows 10 #10

sanmai-NL opened this issue Apr 13, 2019 · 4 comments
Labels

Comments

@sanmai-NL
Copy link

crypto-hash v. 0.3.1. fails to build for me. I used Windows 10 Enterprise build 17763.rs5_release.180914-1434. You can download a VM with this environment at https://developer.microsoft.com/en-us/windows/downloads/virtual-machines .

rustc output:

thread 'main' panicked at 'failed unsafe {
    CryptAcquireContextW(&mut hcp, ptr::null(), ptr::null(), PROV_RSA_AES,
                         CRYPT_VERIFYCONTEXT | CRYPT_SILENT)
}: Provider DLL failed to initialize correctly. (os error -2146893795)', C:\Users\appveyor\.cargo\registry\src\github.jparrowsec.cn-1ecc6299db9ec823\crypto-hash-0.3.1\src\imp\cryptoapi.rs:91:9
@malept
Copy link
Owner

malept commented Apr 13, 2019

  • Does it fail to build, or cause a panic at runtime?
  • What version of Rust are you compiling with?
  • v0.3.1 is not the latest version of crypto-hash. Can you please try the latest version?
  • Is this only with Windows 10 Enterprise? What about other versions of Windows 10?
  • Can you please provide detailed steps to reproduce your error, and a more detailed console output?

@sanmai-NL
Copy link
Author

sanmai-NL commented Apr 13, 2019

  • The panic is reported from custom build tooling, it seems to originate from a cargo invocation.
  • A recent nightly. More details later, if you need them.
  • v0.3.1. is a dependency, I can't switch it out easily.
  • I do not know.
  • There is no more relevant output. I will try to build a reproduction then.

@sanmai-NL
Copy link
Author

The reverse dependency is on Cargo. The Cargo binary fails to use crypto-hash. I cannot upgrade the version easily then.

@sanmai-NL
Copy link
Author

I solved it. The problem was that Cargo was invoked with a clear environment. This works fine under other OSes, but not under Windows. This is a bug in the standard library (rust-lang/rust#31259).

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

No branches or pull requests

2 participants