jrmoulton/tmux-sessionizer

build error

Closed this issue · 7 comments

When trying to install with cargo install tmux-sessionizer i get the following:

$ cargo install tmux-sessionizer
    Updating crates.io index
  Installing tmux-sessionizer v0.2.2
   Compiling libc v0.2.146
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.60
   Compiling quote v1.0.28
   Compiling unicode-ident v1.0.9
   Compiling cfg-if v1.0.0
   Compiling pkg-config v0.3.27
   Compiling version_check v0.9.4
   Compiling crossbeam-utils v0.8.15
   Compiling syn v1.0.109
   Compiling bitflags v1.3.2
   Compiling io-lifetimes v1.0.11
   Compiling ident_case v1.0.1
   Compiling strsim v0.9.3
   Compiling rustix v0.37.19
   Compiling fnv v1.0.7
   Compiling scopeguard v1.1.0
   Compiling utf8parse v0.2.1
   Compiling memchr v2.5.0
   Compiling log v0.4.18
   Compiling once_cell v1.18.0
   Compiling semver v1.0.17
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling linux-raw-sys v0.3.8
   Compiling tinyvec_macros v0.1.1
   Compiling unicode-width v0.1.10
   Compiling crossbeam-queue v0.3.8
   Compiling rayon-core v1.11.0
   Compiling const_fn v0.4.9
   Compiling serde v1.0.164
   Compiling percent-encoding v2.3.0
   Compiling colorchoice v1.0.0
   Compiling is_ci v1.1.1
   Compiling thiserror v1.0.40
   Compiling anstyle-query v1.0.0
   Compiling derive_builder v0.9.0
   Compiling anstyle v1.0.0
   Compiling iana-time-zone v0.1.57
   Compiling regex-syntax v0.7.2
   Compiling unicode-bidi v0.3.13
   Compiling clap_lex v0.5.0
   Compiling lazy_static v1.4.0
   Compiling vec_map v0.8.2
   Compiling either v1.8.1
   Compiling termcolor v1.2.0
   Compiling humantime v2.1.0
   Compiling strsim v0.10.0
   Compiling strsim v0.8.0
   Compiling arrayvec v0.5.2
   Compiling ansi_term v0.12.1
   Compiling shlex v0.1.1
   Compiling beef v0.5.2
   Compiling openssl-probe v0.1.5
   Compiling anstyle-parse v0.2.0
   Compiling tinyvec v1.6.0
   Compiling textwrap v0.11.0
   Compiling thread_local v1.1.7
   Compiling form_urlencoded v1.2.0
   Compiling standback v0.2.17
   Compiling time v0.2.27
   Compiling memoffset v0.8.0
   Compiling crossbeam-epoch v0.9.14
   Compiling memoffset v0.6.5
   Compiling num-traits v0.2.15
   Compiling fuzzy-matcher v0.3.7
   Compiling rustc_version v0.4.0
   Compiling crossbeam-channel v0.5.8
   Compiling aho-corasick v1.0.2
   Compiling unicode-normalization v0.1.22
   Compiling crossbeam-deque v0.8.3
   Compiling error-stack v0.2.4
   Compiling syn v2.0.18
   Compiling jobserver v0.1.26
   Compiling crossbeam v0.8.2
   Compiling defer-drop v1.3.0
   Compiling vte_generate_state_changes v0.1.1
   Compiling cc v1.0.79
   Compiling idna v0.4.0
   Compiling vte v0.9.0
   Compiling regex v1.8.4
   Compiling atty v0.2.14
   Compiling dirs-sys-next v0.1.2
   Compiling dirs-sys v0.3.7
   Compiling num_cpus v1.15.0
   Compiling time v0.1.45
   Compiling nix v0.24.3
   Compiling nix v0.19.1
   Compiling url v2.4.0
   Compiling supports-color v1.3.1
   Compiling clap v2.34.0
   Compiling directories v4.0.1
   Compiling dirs v4.0.0
   Compiling dirs-next v2.0.0
   Compiling owo-colors v3.5.0
   Compiling chrono v0.4.26
   Compiling libz-sys v1.1.9
   Compiling openssl-sys v0.9.88
   Compiling libssh2-sys v0.2.23
   Compiling libgit2-sys v0.14.2+1.5.1
   Compiling shellexpand v2.1.2
   Compiling term v0.7.0
   Compiling rayon v1.7.0
   Compiling env_logger v0.8.4
   Compiling is-terminal v0.4.7
error[E0432]: unresolved import `core::error`
 --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/context.rs:4:11
  |
4 | use core::error::Error;
  |           ^^^^^ could not find `error` in `core`

   Compiling timer v0.2.0
error[E0433]: failed to resolve: use of undeclared type `BacktraceStatus`
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/report.rs:239:55
    |
239 |             .filter(|backtrace| backtrace.status() == BacktraceStatus::Captured)
    |                                                       ^^^^^^^^^^^^^^^ use of undeclared type `BacktraceStatus`

error[E0433]: failed to resolve: use of undeclared type `Backtrace`
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/report.rs:241:19
    |
241 |             .then(Backtrace::capture);
    |                   ^^^^^^^^^ use of undeclared type `Backtrace`

error[E0412]: cannot find type `Backtrace` in this scope
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/report.rs:238:50
    |
238 |         let backtrace = core::any::request_ref::<Backtrace>(&frame)
    |                                                  ^^^^^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use std::backtrace::Backtrace;
    |

error[E0412]: cannot find type `Backtrace` in this scope
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/report.rs:288:40
    |
288 |     pub fn backtrace(&self) -> Option<&Backtrace> {
    |                                        ^^^^^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use std::backtrace::Backtrace;
    |

error[E0412]: cannot find type `Backtrace` in this scope
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/report.rs:289:28
    |
289 |         self.request_ref::<Backtrace>().next()
    |                            ^^^^^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use std::backtrace::Backtrace;
    |

error[E0635]: unknown feature `error_in_core`
   --> /home/redux/.cargo/registry/src/github.com-1ecc6299db9ec823/error-stack-0.2.4/src/lib.rs:439:26
    |
439 |     feature(provide_any, error_in_core, error_generic_member_access)
    |                          ^^^^^^^^^^^^^

Some errors have detailed explanations: E0412, E0432, E0433, E0635.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `error-stack` due to 7 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tmux-sessionizer v0.2.2`, intermediate artifacts can be found at `/tmp/cargo-installJw0BqO`

What version of rust are you using?

~ rustc -V
rustc 1.64.0-nightly (fe3342816 2022-08-01)
~ cargo -V
cargo 1.64.0-nightly (85b500cca 2022-07-24)

Weird. It looks like the error is coming from error-stack but error stack has a MSRV of 1.63. I'm not sure that the version is the problem but can you try building with latest stable rust? (1.70)

Tried removing rustup and just install the rust pkg, which bundles rustc in version 1.70:
rustc 1.70.0 (90c541806 2023-05-31) (Arch Linux rust 1:1.70.0-1)

It works now and compiles succesfully, thanks!

Awesome! You're welcome!

Hey, I'm getting this same error when I try to install.

rustc -V
rustc 1.75.0-nightly (2f1bd0729 2023-10-27)
cargo -V
cargo 1.75.0-nightly (df3509237 2023-10-24)

Anything I can try to do to solve it?

Hey, I'm getting this same error when I try to install.

rustc -V

rustc 1.75.0-nightly (2f1bd0729 2023-10-27)

cargo -V

cargo 1.75.0-nightly (df3509237 2023-10-24)

Anything I can try to do to solve it?

@AtomsForPeace The error should at least be a little different. Can you open a new issue and post the error there?