Closed zoedberg closed 4 years ago
Can you pls make sure you update to the latest version? (it compiles on mine)
@afilini was doing Electrum part, may be he can know why this strange error happens under some builds
I would try with cargo update
or cargo clean
and then re-build.
TxResolver
used to be a type alias but it's now a trait. I'm assuming cargo hasn't updated some of the dependencies (probably rust-lnpbp
)
I've run cargo update && cargo clean
and then re-built (commit 339b9ff
). The previously reported error doesn't appear anymore, but then I've received a E0277 error:
[ ... ]
Compiling lightning v0.0.11 (https://github.com/LNP-BP/rust-lightning?tag=lnpbp-v0.1.0-beta-4#06469874)
Compiling electrum-client v0.2.0-beta.3 (https://github.com/LNP-BP/rust-electrum-client.git?tag=lnpbp-v0.1.0-beta-4#f0bdc38c)
Compiling torut v0.1.5
Compiling lnpbp v0.1.0-beta.3 (https://github.com/LNP-BP/rust-lnpbp?branch=master#3f65e6e3)
Compiling rgb v0.1.0 (/mnt/dmc/zoe/work/rgb-node/ffi)
error[E0277]: can't compare `[u8]` with `[u8; 33]`
--> /home/zoe/.cargo/git/checkouts/rust-lnpbp-1c6b6ac6d4fb658b/3f65e6e/src/rgb/contract/amount.rs:96:36
|
96 | match (&self.commitment.0).partial_cmp(&other.commitment.0) {
| ^^^^^^^^^^^ no implementation for `[u8] < [u8; 33]` and `[u8] > [u8; 33]`
|
= help: the trait `std::cmp::PartialOrd<[u8; 33]>` is not implemented for `[u8]`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /home/zoe/.cargo/git/checkouts/rust-lnpbp-1c6b6ac6d4fb658b/3f65e6e/src/rgb/contract/amount.rs:96:48
|
96 | match (&self.commitment.0).partial_cmp(&other.commitment.0) {
| ^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[u8; 33]`
|
= note: required because of the requirements on the impl of `std::cmp::PartialEq<[u8; 33]>` for `[u8]`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.
error: could not compile `lnpbp`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
> Task :library:buildRust FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':library:buildRust'.
> Process 'command './build_rust.sh'' finished with non-zero exit value 101
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 6s
5 actionable tasks: 1 executed, 4 up-to-date
then I've run rustup update
(updating rustc
from 1.46.0
to 1.48.0
) and re-built again: BUILD SUCCESSFUL in 10m 11s
.
So this issue can be closed, but I would talk about committing the Cargo.lock
file, for this project there could be a purpose; see here for possible reasons to do that. As an alternative, we should document that running cargo update
may be necessary when re-building an updated version of this library.
I would talk about committing the Cargo.lock file, for this project there could be a purpose
Good point
As an alternative, we should document that running cargo update may be necessary when re-building an updated version of this library.
Sounds better. @zoedberg can you pls open an issue discussion the best option?
Trying to build the android library, I've received a E0404 error on rust build. Here's the log: