Delta: 馃悰 Error while bulding git-delta 0.4.4 on Manjaro Linux from the AUR

Created on 23 Oct 2020  路  11Comments  路  Source: dandavison/delta

Hello !

While updating my packages with yay from the AUR, a compilation error came up, making it impossible to build git-delta.

Here is the log output

```==> Making package: git-delta 0.4.4-1 (ven. 23 oct. 2020 11:04:22)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found git-delta-0.4.4.tgz
==> Validating source files with sha256sums...
git-delta-0.4.4.tgz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting git-delta-0.4.4.tgz with bsdtar
==> Starting prepare()...
-> NOTE : If you're building in a (clean) chroot and want a persistant
cargo cache folder specific for this package, you can create
an empty '.cargo' directory next to the 'PKGBUILD'. This will
be recognized and used as CARGO_HOME (except when CARGO_HOME is
already set).
==> Sources are ready.
==> Making package: git-delta 0.4.4-1 (ven. 23 oct. 2020 11:04:30)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
Downloaded structopt v0.3.19
Downloaded git2 v0.13.11
Downloaded structopt-derive v0.4.12
Downloaded libgit2-sys v0.12.13+1.0.1
Compiling libc v0.2.60
Compiling autocfg v1.0.0
Compiling pkg-config v0.3.17
Compiling proc-macro2 v1.0.6
Compiling version_check v0.9.1
Compiling unicode-xid v0.2.0
Compiling syn v1.0.11
Compiling bitflags v1.2.1
Compiling lazy_static v1.4.0
Compiling serde v1.0.98
Compiling proc-macro2 v0.4.30
Compiling memchr v2.2.1
Compiling unicode-xid v0.1.0
Compiling cfg-if v0.1.9
Compiling unicode-width v0.1.8
Compiling byteorder v1.3.2
Compiling crc32fast v1.2.0
Compiling matches v0.1.8
Compiling ryu v1.0.0
Compiling syn v0.15.43
Compiling smallvec v1.4.0
Compiling adler32 v1.0.4
Compiling log v0.4.8
Compiling unicode-segmentation v1.6.0
Compiling safemem v0.3.1
Compiling regex-syntax v0.6.18
Compiling base64 v0.12.1
Compiling xml-rs v0.8.0
Compiling percent-encoding v2.1.0
Compiling strsim v0.8.0
Compiling linked-hash-map v0.5.2
Compiling ansi_term v0.11.0
Compiling vec_map v0.8.1
Compiling same-file v1.0.5
Compiling itoa v0.4.4
Compiling utf8parse v0.2.0
Compiling lazycell v1.2.1
Compiling fnv v1.0.6
Compiling arrayvec v0.5.1
Compiling either v1.5.3
Compiling ansi_term v0.12.1
Compiling shell-words v1.0.0
Compiling bytelines v2.2.2
Compiling box_drawing v0.1.2
Compiling num-traits v0.2.11
Compiling num-integer v0.1.42
Compiling indexmap v1.3.2
Compiling proc-macro-error-attr v1.0.2
Compiling proc-macro-error v1.0.2
Compiling error-chain v0.12.4
Compiling thread_local v1.0.1
Compiling textwrap v0.11.0
Compiling unicode-bidi v0.3.4
Compiling unicode-normalization v0.1.12
Compiling miniz_oxide v0.3.6
Compiling line-wrap v0.1.1
Compiling heck v0.3.1
Compiling yaml-rust v0.4.3
Compiling walkdir v2.2.9
Compiling itertools v0.9.0
Compiling idna v0.2.0
Compiling jobserver v0.1.21
Compiling atty v0.2.14
Compiling termios v0.3.1
Compiling dirs-sys v0.3.5
Compiling terminal_size v0.1.13
Compiling quote v1.0.2
Compiling quote v0.6.13
Compiling aho-corasick v0.7.6
Compiling flate2 v1.0.12
Compiling bincode v1.2.1
Compiling serde_json v1.0.40
Compiling url v2.1.1
Compiling cc v1.0.54
Compiling clap v2.33.0
Compiling dirs v3.0.1
Compiling vte_generate_state_changes v0.1.1
Compiling regex v1.3.9
Compiling libz-sys v1.1.0
Compiling onig_sys v69.5.0
Compiling libgit2-sys v0.12.13+1.0.1
Compiling ansi_colours v1.0.1
Compiling chrono v0.4.11
Compiling syn-mid v0.5.0
Compiling serde_derive v1.0.98
Compiling vte v0.8.0
Compiling console v0.12.0
Compiling plist v1.0.0
Compiling structopt-derive v0.4.12
Compiling git2 v0.13.11
Compiling structopt v0.3.19
Compiling onig v6.0.0
Compiling syntect v4.4.0
Compiling git-delta v0.4.4 (/home/user/.cache/yay/git-delta/src/delta-0.4.4)
error[E0658]: use of unstable library feature 'matches_macro'
--> src/ansi/mod.rs:76:19
|
76 | .map(|el| matches!(el, Element::CSI(_, _, _)))
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/65721

error: aborting due to previous error

For more information about this error, try rustc --explain E0658.
error: could not compile git-delta.

To learn more, run the command again with --verbose.
==> ERROR: A failure occurred in build().
Aborting...
```

All 11 comments

@Kr1ss-XD would you be able to take a look at this?

Yeah sure. Give me a moment pls.

@N07070 what does pacman -Q rust yield on your system ?

If the output of that command is rustup and some version number, pls also post the output of rustup show.

FYI @N07070 @dandavison I get similar errors when trying to compile with the rust 'nightly' toolchain.

However, both 'stable' toolchain as well as the one from the default Archlinux rust package are building git-delta fine.

Thanks a lot @Kr1ss-XD. Is there a convenient way for @N07070 to use delta for now given their local setup?

  1. If rustup is installed (output of pacman -Q rust is rustup and some version number),
    _EDIT Nightly compiles fine too here, after updating it. So before you switch toolchains, please do a rustup update and try to build again. If that fails:_
    I'd suggest to change to the stable toolchain
rustup default stable

In case this errors out because stable is not installed :

rustup toolchain install stable-x86_64-unknown-linux-gnu

then the first command again. Afterwards the build process should run through.

  1. If not (i.e. output of pacman -Q rust is rust and some version number), we'd have to investigate further.

OTOH, @N07070 :

you can also always use the git-delta-bin package from the AUR. It uses the precompiled binaries and the maintainer does update it as often as I do git-delta. This would save you the hassle from compiling yourself if you're OK with that.

pacman -Q rust

rustup 1.22.1-1


It seems that the issue stems from a mismatch in the Rust versions. So it's not a bug from the code but from my own local Rust install.

Yep, that's what I was suspecting, too.

As mentioned, building should succeed with an updated 'nightly' or 'stable' toolchain, or with the default Archlinux 'rust' package.

Thx for your response ! Guess we can close the ticket ?

Yes, thank you for your time and effort !

NP, always nice being able to be helpful :)

Thanks for your help yet again @Kr1ss-XD!

Was this page helpful?
0 / 5 - 0 ratings