Skip to content

git2 compile error when cargo installing #503

Closed

Description

@hoijui

when executing cargo install gitui, I get:

   Compiling git2 v0.13.17
error[E0658]: use of unstable library feature 'str_strip': newly added
   --> /home/hoijui/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.17/src/cred.rs:283:39
    |
283 |                 self.path = Some(path.strip_prefix('/').unwrap_or(path).to_string());
    |                                       ^^^^^^^^^^^^
    |
    = note: see issue #67302 <https://github.com/rust-lang/rust/issues/67302> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: failed to compile `gitui v0.11.0`, intermediate artifacts can be found at `/tmp/cargo-installWOyxWf`

Caused by:
  could not compile `git2`.

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

Activity

  1. extrawurst commented on Jan 26, 2021

    @extrawurst
    Collaborator

    hi @hoijui thanks for your interest in gitui. any reason to ignore all the info the bug report template asks you to fill in making it easier to help you with your issue?

    without any further information my best guess is you try to build with some older rust version. as the readme states: we build using most recent rust

  2. hoijui commented on Jan 27, 2021

    @hoijui
    Author

    Then I would recommend updating the edition field
    and using 'rust = 1.696` in Cargo.toml.

    my rust version is rustc 1.44.0 (49cae5576 2020-06-01).

  3. extrawurst commented on Jan 27, 2021

    @extrawurst
    Collaborator

    @hoijui the edition is correct and the rust field did not make it into current cargo yet: https://doc.rust-lang.org/cargo/reference/manifest.html

    current supported rust version is: rustc 1.49.0 (e1884a8e3 2020-12-29)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions