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

Error building v0.0.3-alpha.3 #50

Open
guillemcordoba opened this issue Aug 23, 2021 · 1 comment
Open

Error building v0.0.3-alpha.3 #50

guillemcordoba opened this issue Aug 23, 2021 · 1 comment

Comments

@guillemcordoba
Copy link

This is the error I get when I try to install lair_keystore v0.0.3:

Compiling ghost_actor v0.3.0-alpha.3
error[E0277]: `(dyn RemoteKeyPair + 'static)` cannot be shared between threads safely
  --> /home/guillem/.cargo/registry/src/github.com-1ecc6299db9ec823/lair_keystore_api-0.0.3/src/internal/tls.rs:22:1
   |
22 | / static WK_CA_RCGEN_CERT: Lazy<Arc<rcgen::Certificate>> = Lazy::new(|| {
23 | |     let mut params = rcgen::CertificateParams::new(vec![WK_CA_ID.into()]);
24 | |     params.alg = &rcgen::PKCS_ECDSA_P256_SHA256;
25 | |     params.is_ca = rcgen::IsCa::Ca(rcgen::BasicConstraints::Unconstrained);
...  |
40 | |     Arc::new(cert)
41 | | });
   | |___^ `(dyn RemoteKeyPair + 'static)` cannot be shared between threads safely
   |
   = help: the trait `Sync` is not implemented for `(dyn RemoteKeyPair + 'static)`
   = note: required because of the requirements on the impl of `Sync` for `Unique<(dyn RemoteKeyPair + 'static)>`
   = note: required because it appears within the type `Box<(dyn RemoteKeyPair + 'static)>`
   = note: required because it appears within the type `rcgen::KeyPairKind`
   = note: required because it appears within the type `rcgen::KeyPair`
   = note: required because it appears within the type `Certificate`
   = note: required because of the requirements on the impl of `Sync` for `std::sync::Arc<Certificate>`
   = note: 1 redundant requirements hidden
   = note: required because of the requirements on the impl of `Sync` for `once_cell::imp::OnceCell<std::sync::Arc<Certificate>>`
   = note: required because it appears within the type `once_cell::sync::OnceCell<std::sync::Arc<Certificate>>`
   = note: required because of the requirements on the impl of `Sync` for `once_cell::sync::Lazy<std::sync::Arc<Certificate>>`
   = note: shared static variables must have a type that implements `Sync`

error[E0277]: `(dyn RemoteKeyPair + 'static)` cannot be sent between threads safely
  --> /home/guillem/.cargo/registry/src/github.com-1ecc6299db9ec823/lair_keystore_api-0.0.3/src/internal/tls.rs:22:1
   |
22 | / static WK_CA_RCGEN_CERT: Lazy<Arc<rcgen::Certificate>> = Lazy::new(|| {
23 | |     let mut params = rcgen::CertificateParams::new(vec![WK_CA_ID.into()]);
24 | |     params.alg = &rcgen::PKCS_ECDSA_P256_SHA256;

This also accurs with lair_keystore v0.0.2. I was able to reproduce the error with these rusts toolchains: 1.54.0, 1.52.2, 1.45.2, 1.55.0-nightly.

@guillemcordoba
Copy link
Author

Workaround for now:

cargo install lair_keystore --locked

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