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

Compilation error E0277 #622

Closed
partywave opened this issue Aug 28, 2021 · 5 comments
Closed

Compilation error E0277 #622

partywave opened this issue Aug 28, 2021 · 5 comments

Comments

@partywave
Copy link

Compilation of v5.0.3 fails with recent Rust versions on ARM64, maybe others. Workaround is to install an updated lexical-core crate using cargo update -p lexical-core

@MCM-Mike
Copy link

I am experiencing similar problems when compiling grin-wallet

System: Debian GNU/Linux 10 (buster)
Kernel: 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux

To reproduce error:

result:

   Compiling blake2-rfc v0.2.18
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `lexical-core` due to 27 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

Solution:

I had to update lexical-core:

cargo update -p lexical-core
    Updating crates.io index
      Adding cfg-if v1.0.0
    Updating lexical-core v0.7.4 -> v0.7.6

and compiling the grin-wallet again was working as expected only with a few minor warning:

warning: trait objects without an explicit `dyn` are deprecated
   --> controller/src/controller.rs:596:9
    |
596 |         match OwnerRpc::handle_request(&*api, val) {
    |               ^^^^^^^^ help: use `dyn`: `<dyn OwnerRpc>`
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

warning: trait objects without an explicit `dyn` are deprecated
   --> controller/src/controller.rs:715:9
    |
715 |         match ForeignRpc::handle_request(&api, val) {
    |               ^^^^^^^^^^ help: use `dyn`: `<dyn ForeignRpc>`
    |
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

warning: `grin_wallet_controller` (lib) generated 2 warnings
    Finished release [optimized] target(s) in 4m 01s

compiled grin-node:

grin-wallet 5.0.3
sha256sum grin-wallet
d83c9a30ef42b096699c5ffba0fa467a4a3b02e33943d4b7327d0519c6af1488  grin-wallet

@yeastplume
Copy link
Member

the lexical-core crate was removed in this PR https://github.com/mimblewimble/grin-wallet/pull/625/files#, I've just tried a build from master and it all comes out clean, could you make sure you have the latest master branch and try again?

@MCM-Mike
Copy link

MCM-Mike commented Nov 29, 2021

could you make sure you have the latest master branch and try again?

I was using the git checkout v5.0.3 when trying to compile, but I can test the master branch as well later.

@MCM-Mike
Copy link

I did compile the master branch currently successfully:

Compiling grin_wallet v5.1.0-alpha.1 (/tmp/grin/grin-wallet)
   Compiling grin_store v5.2.0-alpha.1 (https://github.com/mimblewimble/grin?branch=master#3f4f165e)
   Compiling grin_pool v5.2.0-alpha.1 (https://github.com/mimblewimble/grin?branch=master#3f4f165e)
   Compiling grin_chain v5.2.0-alpha.1 (https://github.com/mimblewimble/grin?branch=master#3f4f165e)
   Compiling grin_p2p v5.2.0-alpha.1 (https://github.com/mimblewimble/grin?branch=master#3f4f165e)
   Compiling grin_api v5.2.0-alpha.1 (https://github.com/mimblewimble/grin?branch=master#3f4f165e)
   Compiling grin_wallet_util v5.1.0-alpha.1 (/tmp/grin/grin-wallet/util)
   Compiling grin_wallet_config v5.1.0-alpha.1 (/tmp/grin/grin-wallet/config)
   Compiling grin_wallet_libwallet v5.1.0-alpha.1 (/tmp/grin/grin-wallet/libwallet)
   Compiling grin_wallet_impls v5.1.0-alpha.1 (/tmp/grin/grin-wallet/impls)
   Compiling grin_wallet_api v5.1.0-alpha.1 (/tmp/grin/grin-wallet/api)
   Compiling grin_wallet_controller v5.1.0-alpha.1 (/tmp/grin/grin-wallet/controller)
    Finished release [optimized] target(s) in 4m 43s

/target/release/grin-wallet --version
grin-wallet 5.1.0-alpha.1

Tested on a system without manually updating the lexical-core

@yeastplume
Copy link
Member

Okay great, thanks for testing!

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

3 participants