Giter Site home page Giter Site logo

Android library build error about rgb-node HOT 4 CLOSED

rgb-wg avatar rgb-wg commented on August 27, 2024
Android library build error

from rgb-node.

Comments (4)

dr-orlovsky avatar dr-orlovsky commented on August 27, 2024 1

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?

from rgb-node.

dr-orlovsky avatar dr-orlovsky commented on August 27, 2024

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

from rgb-node.

afilini avatar afilini commented on August 27, 2024

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)

from rgb-node.

zoedberg avatar zoedberg commented on August 27, 2024

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.

from rgb-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.