Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Can't cargo install app #11851

Closed
Morgan-iv opened this issue Aug 8, 2020 · 3 comments
Closed

Can't cargo install app #11851

Morgan-iv opened this issue Aug 8, 2020 · 3 comments

Comments

@Morgan-iv
Copy link

  • OpenEthereum version: master (d4a74d2) and stable (41aee5a)
  • Operating system: Linux
  • Installation: built from source
  • Fully synchronized: no info, app did not build
  • Network: no info, app did not build
  • Restarted: no info, app did not build

I tried to install app from source via cargo install, but build crashed when building evm. App builds normally with just cargo build.

expected behavior

cargo install successfully built app and copied binary to $HOME/.cargo/bin

actual

cargo install failed on building evm

steps to reproduce

git clone [email protected]:openethereum/openethereum.git
cd openethereum
cargo install --features final --path . # same with --bin parity or --bin openethereum

additional info

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:971:7
    |
971 |                         ONE => a,
    |                         ^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:972:7
    |
972 |                         TWO => a >> 1,
    |                         ^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:973:7
    |
973 |                         TWO_POW_5 => a >> 5,
    |                         ^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:974:7
    |
974 |                         TWO_POW_8 => a >> 8,
    |                         ^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:975:7
    |
975 |                         TWO_POW_16 => a >> 16,
    |                         ^^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:976:7
    |
976 |                         TWO_POW_24 => a >> 24,
    |                         ^^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:977:7
    |
977 |                         TWO_POW_64 => a >> 64,
    |                         ^^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:978:7
    |
978 |                         TWO_POW_96 => a >> 96,
    |                         ^^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:979:7
    |
979 |                         TWO_POW_224 => a >> 224,
    |                         ^^^^^^^^^^^

error: to use a constant of type `ethereum_types::U256` in a pattern, `ethereum_types::U256` must be annotated with `#[derive(PartialEq, Eq)]`
   --> ethcore/evm/src/interpreter/mod.rs:980:7
    |
980 |                         TWO_POW_248 => a >> 248,
    |                         ^^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:972:7
    |
972 |                         TWO => a >> 1,
    |                         ^^^
    |
    = note: `#[warn(unreachable_patterns)]` on by default

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:973:7
    |
973 |                         TWO_POW_5 => a >> 5,
    |                         ^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:974:7
    |
974 |                         TWO_POW_8 => a >> 8,
    |                         ^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:975:7
    |
975 |                         TWO_POW_16 => a >> 16,
    |                         ^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:976:7
    |
976 |                         TWO_POW_24 => a >> 24,
    |                         ^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:977:7
    |
977 |                         TWO_POW_64 => a >> 64,
    |                         ^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:978:7
    |
978 |                         TWO_POW_96 => a >> 96,
    |                         ^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:979:7
    |
979 |                         TWO_POW_224 => a >> 224,
    |                         ^^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:980:7
    |
980 |                         TWO_POW_248 => a >> 248,
    |                         ^^^^^^^^^^^

warning: unreachable pattern
   --> ethcore/evm/src/interpreter/mod.rs:981:7
    |
981 |                         _ => a / b,
    |                         ^

   Compiling hyper-rustls v0.18.0
error: aborting due to 10 previous errors; 10 warnings emitted

error: could not compile `evm`.

@Morgan-iv
Copy link
Author

OS: Linux Mint 20
RAM: 32 Gb
rustc: 1.45.2 (d3fb005a3 2020-07-31)
cargo: 1.45.1 (f242df6ed 2020-07-22)
yasm: 1.3.0.48.g0094
perl: 5.30.0

@rakita
Copy link

rakita commented Aug 11, 2020

Hello, could you try cargo install --features final --locked --path .
Here you can find an explanation: rust-lang/cargo#7302

@rakita
Copy link

rakita commented Aug 14, 2020

I would say this is solved, closing it.

@rakita rakita closed this as completed Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants