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

cargo build failure on openindiana #51

Closed
3eka opened this issue Oct 27, 2021 · 3 comments
Closed

cargo build failure on openindiana #51

3eka opened this issue Oct 27, 2021 · 3 comments

Comments

@3eka
Copy link

3eka commented Oct 27, 2021

Hi all,
i was able to build this (fantastic) tool back on Aug 26th, 2021, with

:; rustc --version
rustc 1.44.1

:; difftastic --version
Difftastic 0.8.0

:; file difftastic
difftastic: ELF 64-bit LSB executable, x86-64, version 1 (Solaris), dynamically linked, interpreter /usr/lib/amd64/ld.so.1, not stripped

with this sequence:

:; git clone https://github.com/Wilfred/difftastic && cd difftastic
:; cargo build --release --jobs 1

now, it fails with error:

   Compiling tree-sitter v0.20.0                                                                                                                                                                             
   Compiling colored v2.0.0                                                                           
   Compiling clap v2.33.3                                                                                                                                                                                    
error[E0658]: `if` is not allowed in a `const fn`                                                                                                                                                            
  --> /export/home/predrag_zecevic/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.3/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: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: `if` is not allowed in a `const fn`
  --> /export/home/predrag_zecevic/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.3/src/args/settings.rs:6:1
   |
6  | / bitflags! {
7  | |     struct Flags: u32 {
8  | |         const REQUIRED         = 1;
9  | |         const MULTIPLE         = 1 << 1;
...  |
28 | |     }
29 | | }
   | |_^
   |
   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
   = note: this error originates in a macro (in Nightly builds, run with -Z 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`.

To learn more, run the command again with --verbose.

Any idea what I am doing wrong?
Regards.

@3eka 3eka changed the title cargobuild failure on openindiana cargo build failure on openindiana Oct 27, 2021
@Wilfred
Copy link
Owner

Wilfred commented Oct 27, 2021

That looks like clap (the argument parser library) now requires a newer version of rustc than what you have installed.

I should really pin a specific rust version in CI, so it's clear what the build requirements are.

@Wilfred
Copy link
Owner

Wilfred commented Oct 28, 2021

OK, looks like Rust 1.46 is required, due to clap depending on bitflags.

@3eka
Copy link
Author

3eka commented Oct 28, 2021

Thanks @Wilfred - all clear now

ap-nri pushed a commit to ap-nri/difftastic that referenced this issue Apr 1, 2022
gurjeet pushed a commit to gurjeet/difftastic that referenced this issue Sep 20, 2022
grunweg pushed a commit to grunweg/difftastic that referenced this issue May 5, 2023
Do not match bracket groups inside the generic command rule. Instead, only parse brackets for specific commands.

Fixes Wilfred#48.
Wilfred pushed a commit that referenced this issue Aug 9, 2023
gcr pushed a commit to gcr/difftastic-nim that referenced this issue Jan 31, 2024
ci: demote parser mismatch into warnings
Wilfred pushed a commit to Thecentury/difftastic that referenced this issue May 14, 2024
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