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

build error when cargo build #17

Open
DreamWuGit opened this issue Jun 19, 2024 · 1 comment
Open

build error when cargo build #17

DreamWuGit opened this issue Jun 19, 2024 · 1 comment

Comments

@DreamWuGit
Copy link

DreamWuGit commented Jun 19, 2024

git clone code, do cargo build on mac machine, first meet error:

dream@Dreams-MacBook-Pro webauthn-halo2 % cargo build
error: package `colored v2.1.0` cannot be built because it requires rustc 1.70 or newer, while the currently active rustc version is 1.68.0-nightly
Either upgrade to rustc 1.70 or newer, or use
cargo update -p [email protected] --precise ver
where `ver` is the latest version of `colored` supporting rustc 1.68.0-nightly

try to update rustc to rustc 1.81.0-nightly (59e2c01c2 2024-06-17) then re-do cargo build , meet new error:

Compiling url v2.5.2
  Compiling halo2-ecc v0.2.2 (https://github.com/zkwebauthn/halo2-lib.git?branch=main#7be174c7)
  Compiling unicase_serde v0.1.0
error[E0599]: no associated item named `NUM_BITS` found for associated type `<FpChip as FieldChip<F>>::FieldType` in the current scope
  --> /Users/dream/.cargo/git/checkouts/halo2-lib-9299fbc4a3c34fae/7be174c/halo2-ecc/src/fields/fp12.rs:107:58
   |
107 |     const PRIME_FIELD_NUM_BITS: u32 = FpChip::FieldType::NUM_BITS;
   |                                                          ^^^^^^^^ associated item not found in `<FpChip as FieldChip<F>>::FieldType`
   |
   = help: items from traits can only be used if the trait is in scope
help: trait `PrimeField` which provides `NUM_BITS` is implemented but not in scope; perhaps you want to import it
   |
1   + use ff::PrimeField;
   |

error[E0599]: no associated item named `NUM_BITS` found for associated type `<FpChip as FieldChip<F>>::FieldType` in the current scope
  --> /Users/dream/.cargo/git/checkouts/halo2-lib-9299fbc4a3c34fae/7be174c/halo2-ecc/src/fields/fp2.rs:105:58
   |
105 |     const PRIME_FIELD_NUM_BITS: u32 = FpChip::FieldType::NUM_BITS;
   |                                                          ^^^^^^^^ associated item not found in `<FpChip as FieldChip<F>>::FieldType`
   |
   = help: items from traits can only be used if the trait is in scope
help: trait `PrimeField` which provides `NUM_BITS` is implemented but not in scope; perhaps you want to import it
   |
1   + use ff::PrimeField;
   |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `halo2-ecc` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@rrrliu

@doutv
Copy link

doutv commented Sep 30, 2024

Try my fork https://github.com/doutv/webauthn-halo2.git

I add Cargo.lock
Specify crates version colored="2.0.0 and ahash=0.8.4

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

2 participants