[GH-ISSUE #187] install failed, can't compile clap on Armbian Buster #83

Closed
opened 2026-06-08 11:25:36 +03:00 by zhus · 5 comments
Owner

Originally created by @MX10-AC2N on GitHub (Oct 3, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/187

Hi,
Just to try, I tried to install dust on an Armbian buster linux 5.10.60-meson64, but the installation process hangs, unable to compile Clap.
I tried the installation with cargo, and also directly with the source files but the results are the same ..
If you have any ideas, I'm interested.

/usr/local/bin/dust-0.7.1.alpha4#` cargo check
  Downloaded unicode-width v0.1.8
  Downloaded libc v0.2.101
   Compiling libc v0.2.101
   Compiling autocfg v1.0.1
    Checking lazy_static v1.4.0
   Compiling crossbeam-utils v0.8.5
    Checking cfg-if v1.0.0
   Compiling memchr v2.4.1
   Compiling crossbeam-epoch v0.9.5
   Compiling rayon-core v1.9.1
    Checking scopeguard v1.1.0
    Checking regex-syntax v0.6.25
    Checking unicode-width v0.1.8
    Checking bitflags v1.3.2
    Checking either v1.6.1
    Checking ansi_term v0.11.0
    Checking vec_map v0.8.2
    Checking strsim v0.8.0
    Checking ansi_term v0.12.1
    Checking thousands v0.2.0
    Checking lscolors v0.7.1
   Compiling memoffset v0.6.4
   Compiling rayon v1.5.1
    Checking crossbeam-channel v0.5.1
    Checking aho-corasick v0.7.18
    Checking crossbeam-deque v0.8.1
    Checking term_size v0.3.2
    Checking num_cpus v1.13.0
    Checking atty v0.2.14
    Checking terminal_size v0.1.17
    Checking textwrap v0.11.0
    Checking clap v2.33.3
error[E0658]: `if` is not allowed in a `const fn`
  --> /root/.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: for more information, see https://github.com/rust-lang/rust/issues/49                                         146
   = note: this error originates in a macro outside of the current crate (in Nig                                         htly builds, run with -Z external-macro-backtrace for more info)

error[E0658]: `if` is not allowed in a `const fn`
  --> /root/.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: for more information, see https://github.com/rust-lang/rust/issues/49                                         146
   = note: this error originates in a macro outside of the current crate (in Nig                                         htly builds, run with -Z external-macro-backtrace for more info)

    Checking regex v1.5.4
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: build failed
Originally created by @MX10-AC2N on GitHub (Oct 3, 2021). Original GitHub issue: https://github.com/bootandy/dust/issues/187 Hi, Just to try, I tried to install dust on an Armbian buster linux 5.10.60-meson64, but the installation process hangs, unable to compile Clap. I tried the installation with cargo, and also directly with the source files but the results are the same .. If you have any ideas, I'm interested. ``` /usr/local/bin/dust-0.7.1.alpha4#` cargo check Downloaded unicode-width v0.1.8 Downloaded libc v0.2.101 Compiling libc v0.2.101 Compiling autocfg v1.0.1 Checking lazy_static v1.4.0 Compiling crossbeam-utils v0.8.5 Checking cfg-if v1.0.0 Compiling memchr v2.4.1 Compiling crossbeam-epoch v0.9.5 Compiling rayon-core v1.9.1 Checking scopeguard v1.1.0 Checking regex-syntax v0.6.25 Checking unicode-width v0.1.8 Checking bitflags v1.3.2 Checking either v1.6.1 Checking ansi_term v0.11.0 Checking vec_map v0.8.2 Checking strsim v0.8.0 Checking ansi_term v0.12.1 Checking thousands v0.2.0 Checking lscolors v0.7.1 Compiling memoffset v0.6.4 Compiling rayon v1.5.1 Checking crossbeam-channel v0.5.1 Checking aho-corasick v0.7.18 Checking crossbeam-deque v0.8.1 Checking term_size v0.3.2 Checking num_cpus v1.13.0 Checking atty v0.2.14 Checking terminal_size v0.1.17 Checking textwrap v0.11.0 Checking clap v2.33.3 error[E0658]: `if` is not allowed in a `const fn` --> /root/.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: for more information, see https://github.com/rust-lang/rust/issues/49 146 = note: this error originates in a macro outside of the current crate (in Nig htly builds, run with -Z external-macro-backtrace for more info) error[E0658]: `if` is not allowed in a `const fn` --> /root/.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: for more information, see https://github.com/rust-lang/rust/issues/49 146 = note: this error originates in a macro outside of the current crate (in Nig htly builds, run with -Z external-macro-backtrace for more info) Checking regex v1.5.4 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: build failed ```
zhus closed this issue 2026-06-08 11:25:36 +03:00
Author
Owner

@bootandy commented on GitHub (Oct 11, 2021):

My first thought is that's a clap error. Can you install other libraries that use clap 2.33 (This is the most common and widely used version of clap).

<!-- gh-comment-id:940219212 --> @bootandy commented on GitHub (Oct 11, 2021): My first thought is that's a clap error. Can you install other libraries that use clap 2.33 (This is the most common and widely used version of clap).
Author
Owner

@MX10-AC2N commented on GitHub (Oct 14, 2021):

Thanks,
I'm a novice, please how can install other libraries that use clap 2.33 ?

<!-- gh-comment-id:942981932 --> @MX10-AC2N commented on GitHub (Oct 14, 2021): Thanks, I'm a novice, please how can install other libraries that use clap 2.33 ?
Author
Owner

@bootandy commented on GitHub (Oct 17, 2021):

can you install bat?
https://github.com/sharkdp/bat

<!-- gh-comment-id:945070647 --> @bootandy commented on GitHub (Oct 17, 2021): can you install bat? https://github.com/sharkdp/bat
Author
Owner

@MX10-AC2N commented on GitHub (Oct 18, 2021):

can you install bat? https://github.com/sharkdp/bat

Hi, I try install from source bat but "error of segmentation", build failed..
Another way I try build bat on Armbian Bulleyes 5.10.68-rockchip64 and the bat building process ends without any problems.. So I try build dust on armbian bullseye too and it's OK under Bullseye but not for Buster..

can you explain to me what to do about this end of build process message

warning: be sure to add /root/.cargo/bin to your PATH to be able to run the installed binaries

Thank

<!-- gh-comment-id:945730190 --> @MX10-AC2N commented on GitHub (Oct 18, 2021): > > > can you install bat? https://github.com/sharkdp/bat Hi, I try install from source bat but "error of segmentation", build failed.. Another way I try build bat on Armbian Bulleyes 5.10.68-rockchip64 and the bat building process ends without any problems.. So I try build dust on armbian bullseye too and it's OK under Bullseye but not for Buster.. can you explain to me what to do about this end of build process message >warning: be sure to add `/root/.cargo/bin` to your PATH to be able to run the installed binaries Thank
Author
Owner

@MX10-AC2N commented on GitHub (Oct 18, 2021):

That's it I found, I just had to use the latest version of rustc ..
sudo apt remove rustc
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
and the whole building process ends without any problem.
Sorry it was just rustc which is too old in the armbian buster repositories ..

<!-- gh-comment-id:945793023 --> @MX10-AC2N commented on GitHub (Oct 18, 2021): That's it I found, I just had to use the latest version of rustc .. `sudo apt remove rustc` `curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh` and the whole building process ends without any problem. Sorry it was just rustc which is too old in the armbian buster repositories ..
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#83