cjbassi/ytop

Wont compile on raspberry Pi

Opened this issue · 9 comments

Running the cargo build command on the latest version of raspbian will not allow it to compile as it just throws a ton of errors and then fails out.

Can you give the output of uname -a and also paste the compile errors?

Linux PiHole 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

cargo install -f --git https://github.com/cjbassi/ytop ytop > output.txt
Updating git repository https://github.com/cjbassi/ytop
Compiling itoa v0.4.4
Compiling log v0.4.8
Compiling platforms v0.2.1
Compiling arc-swap v0.4.4
error[E0433]: failed to resolve. Use of undeclared type or module std
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/error.rs:17:6
|
17 | impl std::error::Error for Error {
| ^^^ Use of undeclared type or module std

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/mod.rs:1:5
|
1 | use crate::target::*;
| ^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/req.rs:1:5
|
1 | use crate::error::Error;
| ^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/req.rs:2:5
|
2 | use crate::platform::{Platform, ALL_PLATFORMS};
| ^^^^^

error: paths in use groups are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/req.rs:5:11
|
5 | use std::{str::FromStr, string::String, vec::Vec};
| ^^^^^^^^^^^^

error: paths in use groups are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/req.rs:5:25
|
5 | use std::{str::FromStr, string::String, vec::Vec};
| ^^^^^^^^^^^^^^

error: paths in use groups are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/req.rs:5:41
|
5 | use std::{str::FromStr, string::String, vec::Vec};
| ^^^^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier1.rs:14:5
|
14 | use crate::{
| ^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier1.rs:15:5
|
15 | platform::{Platform, Tier},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier1.rs:16:5
|
16 | target::{Arch, Env, OS},
| ^^^^^^^^^^^^^^^^^^^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier2.rs:18:5
|
18 | use crate::{
| ^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier2.rs:19:5
|
19 | platform::{Platform, Tier},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier2.rs:20:5
|
20 | target::{Arch, Env, OS},
| ^^^^^^^^^^^^^^^^^^^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier3.rs:9:5
|
9 | use crate::{
| ^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier3.rs:10:5
|
10 | platform::{Platform, Tier},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/platform/tier3.rs:11:5
|
11 | target::{Arch, Env, OS},
| ^^^^^^^^^^^^^^^^^^^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/arch.rs:5:5
|
5 | use crate::error::Error;
| ^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/env.rs:5:5
|
5 | use crate::error::Error;
| ^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/os.rs:5:5
|
5 | use crate::error::Error;
| ^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/mod.rs:11:5
|
11 | arch::{Arch, TARGET_ARCH},
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/mod.rs:12:5
|
12 | env::{Env, TARGET_ENV},
| ^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/target/mod.rs:13:5
|
13 | os::{OS, TARGET_OS},
| ^^^^^^^^^^^^^^^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/lib.rs:32:9
|
32 | pub use crate::platform::PlatformReq;
| ^^^^^

error: crate in paths is experimental (see issue #45477)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/lib.rs:33:9
|
33 | pub use crate::{
| ^^^^^

error: paths in use groups are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/lib.rs:34:5
|
34 | error::Error,
| ^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/lib.rs:35:5
|
35 | platform::{Platform, Tier, ALL_PLATFORMS},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: nested groups in use are experimental (see issue #44494)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/platforms-0.2.1/src/lib.rs:36:5
|
36 | target::{TARGET_ARCH, TARGET_ENV, TARGET_OS},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 27 previous errors

error: the struct #[repr(align(u16))] attribute is experimental (see issue #33626)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/debt.rs:18:1
|
18 | #[repr(align(64))]
| ^^^^^^^^^^^^^^^^^^

error: non-string literals in attributes, or string literals in top-level positions, are experimental (see issue #34981)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/debt.rs:18:1
|
18 | #[repr(align(64))]
| ^^^^^^^^^^^^^^^^^^

error: the struct #[repr(align(u16))] attribute is experimental (see issue #33626)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/gen_lock.rs:46:1
|
46 | #[repr(align(64))]
| ^^^^^^^^^^^^^^^^^^

error: non-string literals in attributes, or string literals in top-level positions, are experimental (see issue #34981)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/gen_lock.rs:46:1
|
46 | #[repr(align(64))]
| ^^^^^^^^^^^^^^^^^^

error: underscore lifetimes are unstable (see issue #44524)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/lib.rs:749:65
|
749 | fn lock_internal(&self, signal_safe: SignalSafety) -> Guard<'_, T> {
| ^^

error: underscore lifetimes are unstable (see issue #44524)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/lib.rs:778:45
|
778 | pub fn load_signal_safe(&self) -> Guard<'_, T> {
| ^^

error: slice pattern syntax is experimental (see issue #23121)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/lib.rs:984:32
|
984 | .fold([0, 0], |[a1, a2], s| {
| ^^^^^^^^

error: slice pattern syntax is experimental (see issue #23121)
--> .cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.4/src/lib.rs:985:25
|
985 | let [v1, v2] = s.snapshot();
| ^^^^^^^^

error: aborting due to 8 previous errors

error: failed to compile ytop v0.5.1 (https://github.com/cjbassi/ytop#bce6b2e1), intermediate artifacts can be found at /tmp/cargo-install.KmmwVpKzap0h

Caused by:
Could not compile platforms.

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

Could be something on my end, I dont know much about this stuff.

error[E0433]: failed to resolve. Use of undeclared type or module std

Well that's definitely unusual :) It can't import the standard library. I wonder if there's some issue with the way the rust tool chain has been set or if there's something that i'm not aware of.

Also, would it be good if i just provided a pre compiled binary for your platform that you could just download and unzip to use?

Your tool chain might also just be really old. I would recommend just reinstalling your rust tool chain or updating it.

Hmm possibly.... Raspbian is not known for being the most up to date os.

I've never really played around with installing pre-compiled binaries on linux, but it might be worth a shot.

hmm same thing when I tried to use it with aur, when i try to compile it says it's not compatible with my architecture.
this is what i got

==> The following packages are not compatible with your architecture: ytop

my uname output is
Linux i-use-arch-btw 5.4.40-1-ARCH #1 SMP PREEMPT Thu May 14 01:50:25 UTC 2020 armv6l GNU/Linux

@icanotc I think that's a different issue. The issue there is just that the AUR package only lists x86_64 as the only supported architecture, which isn't correct.

@icanotc The AUR packages should be fixed now. You can use either the ytop or ytop-git packages but not the ytop-bin since that one is still only x86_64.

it worked at the beginning, just every time it gives me a warning about how it's not compatible, and I actually never tried ytop-bin and ytop-git

it would fail to compile most of the times, probably because of how long it takes, but compiling multiple times somehow worked