Comments (19)
Thanks, that worked! 🥳
Small typo - rustc
should point to /snap/bin/rustc
[build]
rustc = "/snap/bin/rustc"
from macchina.
I'm unable to reproduce this, have you managed to get around this?
Here's what I get:
from macchina.
No, I still get the same error with v6.1.6:
cargo install macchina
Updating crates.io index
Downloaded macchina v6.1.6
Downloaded 1 crate (62.8 KB) in 0.76s
Installing macchina v6.1.6
error: failed to compile `macchina v6.1.6`, intermediate artifacts can be found at `/tmp/cargo-install2TvcSA`
Caused by:
failed to select a version for the requirement `libgit2-sys = "^0.13.4"`
candidate versions found which didn't match: 0.13.2+1.4.2, 0.13.1+1.4.2, 0.13.0+1.4.1, ...
location searched: crates.io index
required by package `git2 v0.14.4`
... which satisfies dependency `git2 = "^0.14.4"` of package `vergen v7.4.2`
... which satisfies dependency `vergen = "^7.4.2"` of package `macchina v6.1.6`
from macchina.
I get a little further on Alpine 3.16.1:
...
Compiling enum-iterator v1.1.3
Compiling sysctl v0.4.6
Compiling ansi-to-tui v2.0.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
--> /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/enum-iterator-1.1.3/src/lib.rs:82:26
|
82 | pub const fn cardinality<T: Sequence>() -> usize {
| ^
|
= note: see issue #93706 <https://github.com/rust-lang/rust/issues/93706> for more information
Compiling clap v3.2.22
For more information about this error, try `rustc --explain E0658`.
error: could not compile `enum-iterator` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `macchina v6.1.6`, intermediate artifacts can be found at `/tmp/cargo-installBRTjnG`
Caused by:
build failed
from macchina.
The build fails at different stages on different distributions. ansi-to-tui
as far as I know doesn't suffer from any build issues, so it could be that your Rust version is slightly out of date. Could you try and update to the latest version?
from macchina.
I get the same error with rust 1.64.0:
$ ./snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo --version
cargo 1.64.0 (387270bc7 2022-09-16)
$ ./snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --version
rustc 1.64.0 (a55dd71d5 2022-09-19)
$ ./snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo install macchina
...
Compiling ansi-to-tui v2.0.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
--> /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/enum-iterator-1.1.3/src/lib.rs:82:26
|
82 | pub const fn cardinality<T: Sequence>() -> usize {
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `enum-iterator` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `macchina v6.1.6`, intermediate artifacts can be found at `/tmp/cargo-installoQPjep`
from macchina.
Couldn't find the relevant code snippet in ansi-to-tui
, can you try installing again with --verbose
?
from macchina.
$ ./snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo install --verbose macchina
...
Compiling enum-iterator v1.1.3
Running `rustc --crate-name enum_iterator --edition=2021 /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/enum-iterator-1.1.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=276c3230b7c5448d -C extra-filename=-276c3230b7c5448d --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern enum_iterator_derive=/tmp/cargo-installTzKcFL/release/deps/libenum_iterator_derive-90ff3a38ca2fdad8.so --cap-lints allow`
Running `rustc --crate-name thiserror --edition=2018 /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/thiserror-1.0.37/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=99ebd48cab530a7a -C extra-filename=-99ebd48cab530a7a --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern thiserror_impl=/tmp/cargo-installTzKcFL/release/deps/libthiserror_impl-0db2cf33f2da7b47.so --cap-lints allow`
Running `rustc --crate-name thiserror --edition=2018 /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/thiserror-1.0.37/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C metadata=1d0163612987af2c -C extra-filename=-1d0163612987af2c --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern thiserror_impl=/tmp/cargo-installTzKcFL/release/deps/libthiserror_impl-0db2cf33f2da7b47.so --cap-lints allow`
Compiling sysctl v0.4.6
Running `rustc --crate-name sysctl /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/sysctl-0.4.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C metadata=c06e51584f79548a -C extra-filename=-c06e51584f79548a --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern bitflags=/tmp/cargo-installTzKcFL/release/deps/libbitflags-39d29c794600078e.rmeta --extern byteorder=/tmp/cargo-installTzKcFL/release/deps/libbyteorder-b6e142b2b2e50c49.rmeta --extern libc=/tmp/cargo-installTzKcFL/release/deps/liblibc-5115f8d5d4def03a.rmeta --extern thiserror=/tmp/cargo-installTzKcFL/release/deps/libthiserror-1d0163612987af2c.rmeta --extern walkdir=/tmp/cargo-installTzKcFL/release/deps/libwalkdir-9e4f1ac4bde12e01.rmeta --cap-lints allow`
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
--> /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/enum-iterator-1.1.3/src/lib.rs:82:26
|
82 | pub const fn cardinality<T: Sequence>() -> usize {
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
Compiling ansi-to-tui v2.0.0
Running `rustc --crate-name ansi_to_tui --edition=2018 /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi-to-tui-2.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C metadata=cca9cd8d1de59119 -C extra-filename=-cca9cd8d1de59119 --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern nom=/tmp/cargo-installTzKcFL/release/deps/libnom-1e8dddaf430703de.rmeta --extern thiserror=/tmp/cargo-installTzKcFL/release/deps/libthiserror-1d0163612987af2c.rmeta --extern tui=/tmp/cargo-installTzKcFL/release/deps/libtui-53e6bdc06a6a6793.rmeta --cap-lints allow`
For more information about this error, try `rustc --explain E0658`.
error: could not compile `enum-iterator` due to previous error
Caused by:
process didn't exit successfully: `rustc --crate-name enum_iterator --edition=2021 /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/enum-iterator-1.1.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=276c3230b7c5448d -C extra-filename=-276c3230b7c5448d --out-dir /tmp/cargo-installTzKcFL/release/deps -L dependency=/tmp/cargo-installTzKcFL/release/deps --extern enum_iterator_derive=/tmp/cargo-installTzKcFL/release/deps/libenum_iterator_derive-90ff3a38ca2fdad8.so --cap-lints allow` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `macchina v6.1.6`, intermediate artifacts can be found at `/tmp/cargo-installTzKcFL`
from macchina.
It is indeed enum-iterator
that's causing this, I'll have a look at their GitHub issues to see if something's up.
UPDATE: Looks like there is an open issue for this, but I don't understand why it affects you given you're on the most recent version. I suggest reporting this occurrence there instead, as I can't do much about this personally.
from macchina.
Despite what /full/path/rustc --version
returns, it looks like the code is not built with Rust 1.64.0. I have no experience with Rust installed through snap. Is it possible that you have Rust installed somewhere else too and that gets picked up when running cargo install
? What is the output of the following commands?
rustup show
/full/path/to/snap/installed/rustup show
from macchina.
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/yonas/snap/rustup/common/rustup
stable-x86_64-unknown-linux-gnu (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
$ /snap/bin/rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/yonas/snap/rustup/common/rustup
stable-x86_64-unknown-linux-gnu (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
from macchina.
What about this?
which rustc
which cargo
from macchina.
$ which rustc
/usr/bin/rustc
$ which cargo
/usr/bin/cargo
from macchina.
Thank you. What is the output of this?
/usr/bin/rustc --version
from macchina.
If this outputs an older version, my guess is that /path/to/snap/installed/cargo install ...
ends up invoking /usr/bin/rustc
. You should probably use your distro package manager to uninstall Rust if you want to use Rust from snap.
from macchina.
You should probably use your distro package manager to uninstall Rust if you want to use Rust from snap.
I absolutely agree, but I'm interested to know why they have two Rust compilers installed.
from macchina.
$ /usr/bin/rustc --version
rustc 1.61.0
from macchina.
I absolutely agree, but I'm interested to know why they have two Rust compilers installed.
I'm not sure either...
from macchina.
I'm not sure either...
Then I'd recommend uninstalling either one of them.
EDIT: Looks like the Rust compiler you installed through apt
is out of date, I suggest upgrading it to a later version, or uninstall it and use the one provided by snap
since it's up to date.
Another option is to set the build.rustc
option to a path other than /usr/bin/rustc
in your $CARGO_HOME/config.toml
if $CARGO_HOME
is set or $HOME/.cargo/config.toml
if not.
This document explains this process quite well, but in short you should create the aforementioned document if it doesn't exist by running:
touch ~/.cargo/config.toml
And then execute:
echo "[build]\nrustc = "/snap/bin/rustup" > ~/.cargo/config.toml
cargo will by default call rustc
which expands to the absolute path shown by executing which rustc
, in your case that's /usr/bin/rustc
which is a little too old to compile macchina.
from macchina.
Related Issues (20)
- [New Distro] - Amazon Linux HOT 1
- Display aarch64 CPU info HOT 3
- [BUG] macOS Sonoma is shown as 'macOS 14.0.0 Unknown' HOT 10
- Does Macchina support two batteries? HOT 3
- [BUG] error[E0432]: unresolved imports `vergen::Config`, `vergen::ShaKind`, error[E0425]: cannot find function `vergen` in crate `vergen` HOT 1
- [BUG] Macchina errors for me when using the provided macchina.toml HOT 2
- -o isn't working properly HOT 5
- Wrong battery value on MacOS HOT 10
- CPU Load value greater than 100% on MacOS HOT 12
- [BUG] install failure (build and cargo run works just fine, however) HOT 2
- [Feature Request] Image support like Neofetch. HOT 1
- [BUG] version `GLIBC_2.33' not found HOT 5
- [BUG] no themes installed and no configs is found HOT 1
- [FEATURE] Palette spacing HOT 1
- Investigate CI failure of NetBSD cross-compilation HOT 3
- Only Include Certain Keys HOT 1
- Fails to build macchina from AUR HOT 5
- [Windows] Missing major features and some empty readouts HOT 2
- [Windows] Customization feature request HOT 1
- Empty ascii art (e.g. `hide_ascii`) + single `--show` = only blank lines in output HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macchina.