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

installation by cargo does not work: error: could not compile clap. #41

Closed
happyboy2k opened this issue Feb 16, 2022 · 2 comments
Closed

Comments

@happyboy2k
Copy link

Hi!
This is what I tried:
$ cargo install --git https://github.com/lpil/sonic-pi-tool/ --force Updating git repository https://github.com/lpil/sonic-pi-tool/`
Installing sonic-pi-tool v0.1.0 (https://github.com/lpil/sonic-pi-tool/#3f1b64e9)
Updating crates.io index
Compiling libc v0.2.118
Compiling semver v0.1.20
Compiling unicode-width v0.1.9
Compiling byteorder v1.4.3
Compiling bitflags v0.4.0
Compiling ansi_term v0.11.0
Compiling vec_map v0.8.2
Compiling strsim v0.8.0
Compiling cfg-if v0.1.10
Compiling void v1.0.2
Compiling bitflags v1.3.2
Compiling ansi_term v0.9.0
Compiling textwrap v0.11.0
Compiling rustc_version v0.1.7
Compiling rosc v0.1.6
Compiling nix v0.7.0
Compiling atty v0.2.14
Compiling dirs v1.0.5
Compiling clap v2.33.4
error[E0658]: if is not allowed in a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.4/src/app/settings.rs:7:1
|
7 | / bitflags! {
8 | | struct Flags: u64 {
9 | | const SC_NEGATE_REQS = 1;
10 | | const SC_REQUIRED = 1 << 1;
... |
51 | | }
52 | | }
| |_^
|
= note: for more information, see rust-lang/rust#49146
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0658]: if is not allowed in a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.4/src/args/settings.rs:6:1
|
6 | / bitflags! {
7 | | struct Flags: u32 {
8 | | const REQUIRED = 1;
9 | | const MULTIPLE = 1 << 1;
... |
28 | | }
29 | | }
| |_^
|
= note: for more information, see rust-lang/rust#49146
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658.
error: could not compile clap.
warning: build failed, waiting for other jobs to finish...
error: failed to compile sonic-pi-tool v0.1.0 (https://github.com/lpil/sonic-pi-tool/#3f1b64e9), intermediate artifacts can be found at /tmp/cargo-installJEGF1N

Caused by:
build failed
`

@lpil
Copy link
Owner

lpil commented Feb 16, 2022

Hello! Are you using the latest stable Rust? Thank you

@happyboy2k
Copy link
Author

I had v1.41.1 installed. I installed v1.58.1 (https://www.rust-lang.org/learn/get-started) and now it's compiling. Thx for your answer.

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