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

0.9.1 fails to compilte on ubuntu 20.04 #2461

Open
Willburn opened this issue Jul 20, 2020 · 6 comments
Open

0.9.1 fails to compilte on ubuntu 20.04 #2461

Willburn opened this issue Jul 20, 2020 · 6 comments
Assignees

Comments

@Willburn
Copy link

My 18.04 server compiles 0.9.1 fine while 20.04 server does not.
pkg-config and c libaries are installed as per the requirements in the readme file. Build essentials are also installed.
submodules are updated when fetching and checking out 0.9.1 and installation is done with cargo.

Compiler error output:
error[E0277]: the trait bound signature::error::Error: std::clone::Clone is not satisfied
--> chain-deps/chain-crypto/src/algorithms/sumed25519/sum.rs:8:27
|
8 | Ed25519SignatureError(ed25519::SignatureError),
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait std::clone::Clone is not implemented for signature::error::Error
|
= note: required by std::clone::Clone::clone
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named from_bytes found for struct ed25519::Signature in the current scope
--> chain-deps/chain-crypto/src/algorithms/sumed25519/sum.rs:409:29
|
409 | ed25519::Signature::from_bytes(bytes).expect("internal error: signature invalid")
| ^^^^^^^^^^
| |
| function or associated item not found in ed25519::Signature
| help: there is an associated function with a similar name: to_bytes
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a use for it:
use signature::signature::Signature;

error[E0599]: no function or associated item named from_bytes found for struct ed25519::Signature in the current scope
--> chain-deps/chain-crypto/src/algorithms/sumed25519/sum.rs:479:37
|
479 | let _ = ed25519::Signature::from_bytes(sigma_slice)?;
| ^^^^^^^^^^
| |
| function or associated item not found in ed25519::Signature
| help: there is an associated function with a similar name: to_bytes
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a use for it:
use signature::signature::Signature;

error[E0599]: no method named sign found for struct ed25519_dalek::keypair::Keypair in the current scope
--> chain-deps/chain-crypto/src/algorithms/sumed25519/sum.rs:593:20
|
593 | let sigma = sk.sign(m);
| ^^^^ method not found in ed25519_dalek::keypair::Keypair
|
::: /home/eysteinh/.cargo/registry/src/github.com-1ecc6299db9ec823/signature-1.1.0/src/signer.rs:15:8
|
15 | fn sign(&self, msg: &[u8]) -> S {
| ----
| |
| the method is available for std::boxed::Box<ed25519_dalek::keypair::Keypair> here
| the method is available for std::sync::Arc<ed25519_dalek::keypair::Keypair> here
| the method is available for std::rc::Rc<ed25519_dalek::keypair::Keypair> here
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a use for it:
use signature::signer::Signer;

error[E0599]: no method named verify found for struct ed25519_dalek::public::PublicKey in the current scope
--> chain-deps/chain-crypto/src/algorithms/sumed25519/sum.rs:627:17
|
627 | if sig.pk().verify(m, &sig.sigma()).is_err() {
| ^^^^^^ method not found in ed25519_dalek::public::PublicKey
|
::: /home/eysteinh/.cargo/registry/src/github.com-1ecc6299db9ec823/signature-1.1.0/src/verifier.rs:14:8
|
14 | fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>;
| ------
| |
| the method is available for std::boxed::Box<ed25519_dalek::public::PublicKey> here
| the method is available for std::sync::Arc<ed25519_dalek::public::PublicKey> here
| the method is available for std::rc::Rc<ed25519_dalek::public::PublicKey> here
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a use for it:
use signature::verifier::Verifier;

Compiling tower-ready-cache v0.3.1
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try rustc --explain E0277.
error: could not compile chain-crypto.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile jormungandr v0.9.1 (/home/eysteinh/jornode/latest_github/jormungandr), intermediate artifacts can be found at /home/eysteinh/jornode/latest_github/target

Caused by:
build failed

Possible causes of error:
Maybe I am missing some dependancies that is not default in 20.04 that are defautl in 18.04 ?

@NicolasDP
Copy link
Contributor

No it is not a dependency missing. Somehow you have code that does not compile.

can you give me:

  1. compiler version? cargo --version
  2. commit used git show-ref HEAD
  3. submobule status: git submodule status

thanks

@NicolasDP NicolasDP self-assigned this Jul 22, 2020
@Willburn
Copy link
Author

Willburn commented Jul 23, 2020

Appricate the follow up. Will be embarrasing if this is something simple....

  1. "cargo 1.45.0 (744bd1fbb 2020-06-15)"
  2. "79cca10e02a5f8a9b7bc3a2faa5ca2e281dbee3b refs/remotes/origin/HEAD"
  3. "2b7e6941acc67293498047d2be35e12d7dda542b chain-deps (chain-deps-v0.8.10-558-g2b7e6941)"

@NicolasDP
Copy link
Contributor

okay, so you are building on a nightly tag. not on the version 0.9.1. try to use a stable version instead. I could not reproduce this issue. can you try to do a clean build maybe? make sure all cache are cleaned. Also do you have the same issue on master too ?

@Willburn
Copy link
Author

Willburn commented Jul 24, 2020

I got same error using master as branch (git checkout tags/v0.9.1 -b master) with cargo clean. I also make sure to rustup stable (
rustup install stable
rustup default stable)

does it matter I am not building but installing?
"cargo install --force --path ~/jornode/latest_github/jormungandr/ --features sys
cargo install --force --path ~/jornode/latest_github/jcli/"

edit tested cargo build and that works. It fails when i do cargo install. Hmm. Anyhow this should not waist a lot of your time so defintively not a priority issue I will try to look more into it myself.

@vincenthz
Copy link
Member

vincenthz commented Jul 25, 2020

yes, the newer version of ed25519-dalek is using a Signer trait that need to be imported;

The following diff on an unrelated project is enough to make it work, and jormungandr need the same patch:

-use ed25519_dalek::Keypair;
+use ed25519_dalek::{Keypair, Signer};

@samcgill29
Copy link

I'm not sure how to implement the above patch on my own. Is it possible? Which file(s) do I need to modify?

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

4 participants