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

halo2-lib build failure #272

Open
vbhattaccmu opened this issue Jul 10, 2024 · 6 comments
Open

halo2-lib build failure #272

vbhattaccmu opened this issue Jul 10, 2024 · 6 comments

Comments

@vbhattaccmu
Copy link

vbhattaccmu commented Jul 10, 2024

I am trying to build halo2-lib by cloning the community-edition from this repository and running cargo build. I am running into an error which is shown below.

vikra@MSI MINGW64 /C/Users/vikra/OneDrive/Desktop/halo2-lib (community-edition)
$ cargo build --release
info: syncing channel updates for 'nightly-2024-02-08-x86_64-pc-windows-msvc'
info: latest update on 2024-02-08, rust version 1.78.0-nightly (8ace7ea1f 2024-02-07)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
    Updating crates.io index
    Updating git repository `https://github.com/privacy-scaling-explorations/halo2.git`
    Updating git repository `https://github.com/axiom-crypto/pse-poseidon.git`
    Updating git repository `https://github.com/axiom-crypto/snark-verifier.git`
    Updating git repository `https://github.com/axiom-crypto/halo2-lib.git`
  Downloaded maybe-rayon v0.1.1
  Downloaded crossbeam v0.8.4
  Downloaded serde_derive v1.0.204
  Downloaded test-case-macros v3.3.1
  Downloaded strum v0.26.3
  Downloaded type-map v0.5.0
  Downloaded test-case-core v3.3.1
  Downloaded syn v2.0.70
  Downloaded test-case v3.3.1
  Downloaded serde_arrays v0.1.0
  Downloaded pairing v0.23.0
  Downloaded getset v0.1.2
  Downloaded halo2-axiom v0.4.4
  Downloaded poseidon-primitives v0.1.1
  Downloaded pasta_curves v0.5.1
  Downloaded halo2curves-axiom v0.5.3
  Downloaded 16 crates (4.4 MB) in 4.08s (largest was `halo2curves-axiom` at 3.3 MB)
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling serde v1.0.204
   Compiling syn v1.0.109
   Compiling subtle v2.6.1
   Compiling typenum v1.17.0
   Compiling zeroize v1.8.1
   Compiling const-oid v0.9.6
   Compiling ppv-lite86 v0.2.17
   Compiling radium v0.7.0
   Compiling arrayvec v0.7.4
   Compiling tap v1.0.1
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.14.5
   Compiling funty v2.0.0
   Compiling crossbeam-utils v0.8.20
   Compiling winnow v0.5.40
   Compiling static_assertions v1.1.0
   Compiling getrandom v0.2.15
   Compiling toml_datetime v0.6.6
   Compiling autocfg v1.3.0
   Compiling rand_core v0.6.4
   Compiling wyz v0.5.1
   Compiling spin v0.9.8
   Compiling cpufeatures v0.2.12
   Compiling crunchy v0.2.2
   Compiling windows_x86_64_msvc v0.48.5
   Compiling lazy_static v1.5.0
   Compiling rayon-core v1.12.1
   Compiling once_cell v1.19.0
   Compiling byte-slice-cast v1.2.2
   Compiling generic-array v0.14.7
   Compiling either v1.13.0
   Compiling rand_chacha v0.3.1
   Compiling rustc-hex v2.1.0
   Compiling thiserror v1.0.61
   Compiling proc-macro-error-attr v1.0.4
   Compiling paste v1.0.15
   Compiling arrayref v0.3.7
   Compiling byteorder v1.5.0
   Compiling keccak v0.1.5
   Compiling constant_time_eq v0.3.0
   Compiling rand v0.8.5
   Compiling indexmap v2.2.6
   Compiling num-traits v0.2.19
   Compiling serde_json v1.0.120
   Compiling proc-macro-error v1.0.4
   Compiling blake2b_simd v1.0.2
   Compiling windows-targets v0.48.5
   Compiling itoa v1.0.11
   Compiling ryu v1.0.18
   Compiling halo2curves-axiom v0.5.3
   Compiling tiny-keccak v2.0.2
   Compiling windows-sys v0.48.0
   Compiling tracing-core v0.1.32
   Compiling der v0.7.9
   Compiling windows_x86_64_msvc v0.52.6
   Compiling pin-project-lite v0.2.14
   Compiling bitvec v1.0.1
   Compiling rustc-hash v1.1.0
   Compiling itertools v0.11.0
   Compiling rand_xorshift v0.3.0
   Compiling base16ct v0.2.0
   Compiling memchr v2.7.4
   Compiling quote v1.0.36
   Compiling rustversion v1.0.17
   Compiling crossbeam-epoch v0.9.18
   Compiling crossbeam-queue v0.3.11
   Compiling crossbeam-channel v0.5.13
   Compiling syn v2.0.70
   Compiling toml_edit v0.21.1
   Compiling fixed-hash v0.8.0
   Compiling colored v2.1.0
   Compiling log v0.4.22
   Compiling crossbeam-deque v0.8.5
   Compiling regex-syntax v0.8.4
   Compiling windows-targets v0.52.6
   Compiling heck v0.5.0
   Compiling num-integer v0.1.46
   Compiling crossbeam v0.8.4
   Compiling aho-corasick v1.1.3
   Compiling ark-std v0.3.0
   Compiling bytes v1.6.0
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling num-bigint v0.4.6
   Compiling crypto-bigint v0.5.5
   Compiling windows-sys v0.52.0
   Compiling fastrand v2.1.0
   Compiling chrono v0.4.38
   Compiling unicode-xid v0.2.4
   Compiling digest v0.10.7
   Compiling sec1 v0.7.3
   Compiling rayon v1.10.0
   Compiling spki v0.7.3
   Compiling type-map v0.5.0
   Compiling sha2 v0.10.8
   Compiling sha3 v0.10.8
   Compiling hmac v0.12.1
   Compiling signature v2.2.0
   Compiling tempfile v3.10.1
   Compiling array-init v2.1.0
   Compiling rfc6979 v0.4.0
   Compiling proc-macro-crate v3.1.0
   Compiling regex-automata v0.4.7
   Compiling test-case-core v3.3.1
   Compiling ff v0.13.0
   Compiling group v0.13.0
   Compiling pasta_curves v0.5.1
   Compiling pairing v0.23.0
   Compiling elliptic-curve v0.13.8
   Compiling serde_derive v1.0.204
   Compiling thiserror-impl v1.0.61
   Compiling derive_more v0.99.18
   Compiling tracing-attributes v0.1.27
   Compiling strum_macros v0.26.4
   Compiling num_enum_derive v0.7.2
   Compiling auto_impl v1.2.0
   Compiling test-case-macros v3.3.1
   Compiling ecdsa v0.16.9
   Compiling test-case v3.3.1
   Compiling k256 v0.13.3
   Compiling maybe-rayon v0.1.1
   Compiling num_enum v0.7.2
   Compiling tracing v0.1.40
   Compiling poseidon-primitives v0.1.1
   Compiling regex v1.10.5
   Compiling strum v0.26.3
   Compiling impl-trait-for-tuples v0.2.2
   Compiling parity-scale-codec-derive v3.6.12
   Compiling rlp-derive v0.1.0
   Compiling scale-info-derive v2.11.3
   Compiling getset v0.1.2
   Compiling open-fastrlp-derive v0.1.1
error[E0658]: `#[diagnostic]` attribute name space is experimental
   --> C:\Users\vikra\.cargo\registry\src\index.crates.io-6f17d22bba15001f\serde-1.0.204\src\de\mod.rs:537:5
    |
537 |     diagnostic::on_unimplemented(
    |     ^^^^^^^^^^
    |
    = note: see issue #111996 <https://github.com/rust-lang/rust/issues/111996> for more information
    = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable
    = note: this compiler was built on 2024-02-07; consider upgrading it if it is out of date

error[E0658]: `#[diagnostic]` attribute name space is experimental
   --> C:\Users\vikra\.cargo\registry\src\index.crates.io-6f17d22bba15001f\serde-1.0.204\src\ser\mod.rs:220:5
    |
220 |     diagnostic::on_unimplemented(
    |     ^^^^^^^^^^
    |
    = note: see issue #111996 <https://github.com/rust-lang/rust/issues/111996> for more information
    = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable
    = note: this compiler was built on 2024-02-07; consider upgrading it if it is out of date

For more information about this error, try `rustc --explain E0658`.
The following warnings were emitted during compilation:

warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag
warning: [email protected]: cargo:rustc-check-cfg requires -Zcheck-cfg flag

error: could not compile `serde` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Please let me know what should I do to make it build.

@hridambasu
Copy link

I am also facing the same issue.

@zilong-dai
Copy link

It looks like you're using an outdated nightly toolchain. nightly-2024-05-06-x86_64-unknown-linux-gnu works ok. Have a try to upgrade the nightly toolchain.

@taint160596
Copy link

same issue

@CODER-6
Copy link
Contributor

CODER-6 commented Dec 12, 2024

Here is a method that may not be clever but is very practical: place this cargo.lock file in the halo2-lib folder to specify the dependency versions. This cargo.lock was generated when I successfully ran halo2-lib in the past, and it is significantly different from the cargo.lock automatically generated during the current run.
https://github.com/CODER-6/halo2-lib/blob/community-edition/Cargo.lock

@jonathanpwang
Copy link
Contributor

@CODER-6 thanks! would you like to PR this Cargo.lock into the community-edition branch? If it passes CI we can merge it -- it's a good solution

@CODER-6
Copy link
Contributor

CODER-6 commented Dec 15, 2024

@jonathanpwang Of course, it would be my pleasure. Here's the related PR: #277.

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

6 participants