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

Could not compile libp2p-core #6

Open
GreyEcologist opened this issue Feb 3, 2020 · 0 comments
Open

Could not compile libp2p-core #6

GreyEcologist opened this issue Feb 3, 2020 · 0 comments

Comments

@GreyEcologist
Copy link

GreyEcologist commented Feb 3, 2020

I'm running into an issue setting up a node locally. Something about
the trait `rand_core::CryptoRng` is not implemented for `rand::rngs::thread::ThreadRng

This is the entire trace log:

error[E0277]: the trait bound `rand::rngs::thread::ThreadRng: rand_core::CryptoRng` is not satisfied
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.7.1/src/identity/ed25519.rs:34:44
    |
34  |         Keypair(ed25519::Keypair::generate(&mut rand::thread_rng()))
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::CryptoRng` is not implemented for `rand::rngs::thread::ThreadRng`
    | 
   ::: /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-dalek-1.0.0-pre.3/src/ed25519.rs:130:12
    |
130 |         R: CryptoRng + RngCore,
    |            --------- required by this bound in `ed25519_dalek::ed25519::Keypair::generate`
    |
help: trait impl with same name found
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/lib.rs:430:1
    |
430 | impl<'a, R: CryptoRng + ?Sized> CryptoRng for &'a mut R {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: Perhaps two different versions of crate `rand_core` are being used?

error[E0277]: the trait bound `rand::rngs::thread::ThreadRng: rand_core::RngCore` is not satisfied
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.7.1/src/identity/ed25519.rs:34:44
    |
34  |         Keypair(ed25519::Keypair::generate(&mut rand::thread_rng()))
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::RngCore` is not implemented for `rand::rngs::thread::ThreadRng`
    | 
   ::: /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-dalek-1.0.0-pre.3/src/ed25519.rs:130:24
    |
130 |         R: CryptoRng + RngCore,
    |                        ------- required by this bound in `ed25519_dalek::ed25519::Keypair::generate`
    |
help: trait impl with same name found
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/lib.rs:373:1
    |
373 | / impl<'a, R: RngCore + ?Sized> RngCore for &'a mut R {
374 | |     #[inline(always)]
375 | |     fn next_u32(&mut self) -> u32 {
376 | |         (**self).next_u32()
...   |
392 | |     }
393 | | }
    | |_^
    = note: Perhaps two different versions of crate `rand_core` are being used?

error[E0277]: the trait bound `rand::rngs::thread::ThreadRng: rand_core::CryptoRng` is not satisfied
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.7.1/src/identity/ed25519.rs:141:48
    |
141 |         SecretKey(ed25519::SecretKey::generate(&mut rand::thread_rng()))
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::CryptoRng` is not implemented for `rand::rngs::thread::ThreadRng`
    | 
   ::: /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-dalek-1.0.0-pre.3/src/secret.rs:172:12
    |
172 |         T: CryptoRng + RngCore,
    |            --------- required by this bound in `ed25519_dalek::secret::SecretKey::generate`
    |
help: trait impl with same name found
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/lib.rs:430:1
    |
430 | impl<'a, R: CryptoRng + ?Sized> CryptoRng for &'a mut R {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: Perhaps two different versions of crate `rand_core` are being used?

error[E0277]: the trait bound `rand::rngs::thread::ThreadRng: rand_core::RngCore` is not satisfied
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.7.1/src/identity/ed25519.rs:141:48
    |
141 |         SecretKey(ed25519::SecretKey::generate(&mut rand::thread_rng()))
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_core::RngCore` is not implemented for `rand::rngs::thread::ThreadRng`
    | 
   ::: /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-dalek-1.0.0-pre.3/src/secret.rs:172:24
    |
172 |         T: CryptoRng + RngCore,
    |                        ------- required by this bound in `ed25519_dalek::secret::SecretKey::generate`
    |
help: trait impl with same name found
   --> /Users/garethkmensah/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/lib.rs:373:1
    |
373 | / impl<'a, R: RngCore + ?Sized> RngCore for &'a mut R {
374 | |     #[inline(always)]
375 | |     fn next_u32(&mut self) -> u32 {
376 | |         (**self).next_u32()
...   |
392 | |     }
393 | | }
    | |_^
    = note: Perhaps two different versions of crate `rand_core` are being used?

   Compiling parity-crypto v0.3.1
error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `libp2p-core`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `akropolis v0.8.2 (/Users/garethkmensah/Desktop/akropolis/node)`, intermediate artifacts can be found at `/Users/garethkmensah/Desktop/akropolis/node/target`

Caused by:
  build failed

[Process completed]
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