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

Circuit-layout example doesn't build #720

Open
gnull opened this issue Jan 11, 2023 · 8 comments
Open

Circuit-layout example doesn't build #720

gnull opened this issue Jan 11, 2023 · 8 comments
Labels
A-dev-tooling Area: Developer tooling

Comments

@gnull
Copy link

gnull commented Jan 11, 2023

I'm doing

cargo run --features="test-dev-graph" --example circuit-layout

from the project root trying to build and run the example, but I get this error:

error[E0658]: use of unstable library feature 'command_access'
   --> /home/io/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.49/src/lib.rs:566:49
    |
566 |         let version = Version::from_command(cmd.get_program()).unwrap_or_default();
    |                                                 ^^^^^^^^^^^
    |
    = note: see issue #44434 <https://github.com/rust-lang/rust/issues/44434> for more information

For more information about this error, try `rustc --explain E0658`.

How do I get it to work?

Ivan

@daira
Copy link
Contributor

daira commented Jan 17, 2023

This works for me with rustc 1.56.1. What versions of rustc and cargo are you using?

@daira daira added the A-dev-tooling Area: Developer tooling label Jan 17, 2023
@gnull
Copy link
Author

gnull commented Jan 27, 2023

Here are the versions (I'm running the commands from halo2_proofs directory):

$ rustc --version
rustc 1.56.1 (59eed8a2a 2021-11-01)
$ cargo --version
cargo 1.56.0 (4ed5d137b 2021-10-04)

Also, rustup show gives me this:

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/<…>/.rustup

<…>

active toolchain
----------------

1.56.1-x86_64-unknown-linux-gnu (overridden by '/home/<…>/halo2/rust-toolchain')
rustc 1.56.1 (59eed8a2a 2021-11-01)

@str4d
Copy link
Contributor

str4d commented Jan 27, 2023

When using test-dev-gaph (a feature only for developing the Halo 2 crates themselves) you need to use the stable compiler (cargo +stable ...). The reason is that the dependencies we use for that feature have recently released versions requiring MSRVs greater than our library MSRV (it likely worked for Daira because ze had earlier versions of those dependencies in hir Cargo.lock file).

@gnull
Copy link
Author

gnull commented Feb 1, 2023

I see. I tried adding +stable, and now I get a new error:

$ cargo +stable run --features=test-dev-graph --example circuit-layout
[…]
error[E0599]: no function or associated item named `new` found for struct `plotters::prelude::BitMapBackend` in the current scope
   --> halo2_proofs/examples/circuit-layout.rs:287:31
    |
287 |     let root = BitMapBackend::new("layout.png", (1024, 768)).into_drawing_area();
    |                               ^^^ function or associated item not found in `plotters::prelude::BitMapBackend<'_, _>`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `halo2_proofs` due to previous error

This one must be due to incorrect plotters version being used? Can I fix it by specifying the version more concretely in:

plotters = { version = "0.3.0", default-features = false, optional = true }

?

If so, then what version should it be?

@GhostOfGauss
Copy link

I have a similar problem as @gnull , though my error message is different:

cargo rustc 1.56 +stable run --package halo2_proofs --example circuit-layout --features test-dev-graph 
    Updating crates.io index
error: failed to select a version for the requirement `plotters = "=0.3.4"`
candidate versions found which didn't match: 0.3.4, 0.3.3, 0.3.1, ...
location searched: crates.io index
required by package `halo2_proofs v0.2.0 (.../halo2/halo2_proofs)`

I have tried using plotters versions 3.0 thru 3.5 and receive the same error.

@gnull
Copy link
Author

gnull commented Jul 20, 2023

Maybe we could have someone for whom the build works post their Cargo.lock here for us as a workaround? @daira

@parazyd
Copy link
Contributor

parazyd commented Jul 20, 2023

It might also work by removing default-features=false from the plotters dependency.

@GhostOfGauss
Copy link

@parazyd Thanks for the suggestion but that didn't work for me, still get failed to select a version for the requirement plotters = "=0.3.4"`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dev-tooling Area: Developer tooling
Projects
None yet
Development

No branches or pull requests

5 participants