ZenGo-X / multi-party-ecdsa

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
GNU General Public License v3.0
975 stars 308 forks source link

Failed to build examples #99

Closed flyq closed 4 years ago

flyq commented 4 years ago

I pull the last code: https://github.com/KZen-networks/multi-party-ecdsa/commit/89b1562b8af4d4fe77479c2fae5e4370895c97d2

and build:

cargo build --release --examples

error log

   Compiling devise v0.2.0
   Compiling pear v0.1.2
   Compiling rocket_http v0.4.4
error: proc macro panicked
   --> /home/flyq/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_http-0.4.4/src/parse/uri/parser.rs:119:34
    |
119 |             let path_and_query = pear_try!(path_and_query(is_pchar));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `rocket_http`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Maybe it is a bug of macro_rules!: Always capture tokens for macro_rules! arguments

According to above, I try this:

$ cargo update -p pear
    Updating crates.io index
    Updating pear v0.1.2 -> v0.1.4

$ cargo update -p rocket_http
    Updating crates.io index
    Updating cookie v0.11.2 -> v0.11.3
    Updating rocket_http v0.4.4 -> v0.4.5

and it doesn't fix it:

 Compiling rocket_http v0.4.5
error: proc macro panicked
   --> /home/flyq/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_http-0.4.5/src/parse/uri/parser.rs:119:34
    |
119 |             let path_and_query = pear_try!(path_and_query(is_pchar));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling paillier v0.3.4 (https://github.com/KZen-networks/rust-paillier?tag=v0.3.4#564352cb)
   Compiling bulletproof v0.2.5 (https://github.com/KZen-networks/bulletproofs?tag=v0.2.5#00be0db5)
error: aborting due to previous error

error: could not compile `rocket_http`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

env

Ubuntu 18.04, I ran the examples successfully before.

$ rustc --version
rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
$ cargo --version
cargo 1.47.0-nightly (aa6872140 2020-07-23)
flyq commented 4 years ago

I delete the Cargo.lock file and build again, succeeded.