I am trying to get resctl-demo, but I am having troubles installing resctl-demo. I am new to cargo and rust. I am running on Ubuntu 22.04.3 LTS
I run "cargo build --release" OK , but when I get to the following step I get the ahash version failure and can't figure out how to get past it:
$ cargo install --path resctl-demo
Installing resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo)
Updating crates.io index
error: failed to compile resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo)
, intermediate artifacts can be found at /work/resctl-demo/target
Caused by:
failed to select a version for the requirement ahash = "^0.6"
candidate versions found which didn't match: 0.8.7, 0.8.6, 0.8.5, ...
location searched: crates.io index
required by package cursive v0.16.0
... which satisfies dependency cursive = "^0.16"
of package resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo)
perhaps a crate was updated and forgotten to be re-vendored?
resctl-demo had the same complaint, but I was able to get around it by running:
$ cargo add [email protected] --package resctl-demo
I have tried searching with google, but all the suggested solutions have not worked for me.
cargo build --release
cargo install --path rd-hashd
cargo install --path rd-agent
cargo install --path resctl-demo <-- only having the ahash issue with this step
cargo install --path resctl-bench
Tried the following, but cargo build fails.
#300
$ git diff
diff --git a/resctl-demo/Cargo.toml b/resctl-demo/Cargo.toml
index b6b0a07..1413bf9 100644
--- a/resctl-demo/Cargo.toml
+++ b/resctl-demo/Cargo.toml
@@ -20,7 +20,7 @@ anyhow = "1.0"
chrono = { version = "0.4", features = ["serde"] }
clap = "2.33"
crossbeam = "0.8"
-cursive = { version = "0.16", default-features = false, features = ["termion"] }
+cursive = { version = "0.20", default-features = false, features = ["termion"] }
cursive_buffered_backend = "0.5"
cursive-tabs = "0.6"
enum-iterator = "0.7"
$ cargo build --release
Updating crates.io index
Compiling autocfg v1.1.0
Compiling libc v0.2.148
Compiling proc-macro2 v1.0.67
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
Compiling syn v1.0.109
Compiling libm v0.2.7
Compiling version_check v0.9.4
Compiling log v0.4.18
Compiling serde v1.0.188
...
Compiling resctl-demo v2.2.4 (/work/senpai/resctl-demo/resctl-demo)
Compiling rd-agent v2.2.4 (/work/senpai/resctl-demo/rd-agent)
error[E0277]: the trait bound TabView: ViewWrapper
is not satisfied
--> resctl-demo/src/graph.rs:86:9
|
86 | siv.call_on_name("graph-tabs", |v: &mut TabView| {
| ^^^^^^^^^^^^ the trait ViewWrapper
is not implemented for TabView
|
= help: the following other types implement trait ViewWrapper
:
BoxedView
CircularFocus
EnableableView
FocusTracker
HideableView
LastSizeView
NamedView
OnEventView
and 9 others
= note: required for TabView
to implement cursive::View
note: required by a bound in Cursive::call_on_name
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/cursive.rs:556:12
|
550 | pub fn call_on_name<V, F, R>(
| ------------ required by a bound in this associated function
...
556 | V: View,
| ^^^^ required by this bound in Cursive::call_on_name
error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:923:17
|
922 | tabs.add_tab(
| ------- arguments to this method are incorrect
923 | / LinearLayout::vertical()
924 | | .child(graph_tab_title(0))
925 | | .child(
926 | | horiz_or_vert()
... |
934 | | )
935 | | .with_name(graph_tab_id(0)),
| |_______________________________________________^ expected NamedView<_>
, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout>
and NamedView<_>
have similar names, but are actually distinct types
note: NamedView<LinearLayout>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core
are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^
error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:938:17
|
937 | tabs.add_tab(
| ------- arguments to this method are incorrect
938 | / LinearLayout::vertical()
939 | | .child(graph_tab_title(1))
940 | | .child(
941 | | horiz_or_vert()
... |
949 | | )
950 | | .with_name(graph_tab_id(1)),
| |_______________________________________________^ expected NamedView<_>
, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout>
and NamedView<_>
have similar names, but are actually distinct types
note: NamedView<LinearLayout>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core
are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^
error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:953:17
|
952 | tabs.add_tab(
| ------- arguments to this method are incorrect
953 | / LinearLayout::vertical()
954 | | .child(graph_tab_title(2))
955 | | .child(
956 | | horiz_or_vert()
... |
964 | | )
965 | | .with_name(graph_tab_id(2)),
| |_______________________________________________^ expected NamedView<_>
, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout>
and NamedView<_>
have similar names, but are actually distinct types
note: NamedView<LinearLayout>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core
are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^
error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:968:17
|
967 | tabs.add_tab(
| ------- arguments to this method are incorrect
968 | / LinearLayout::vertical()
969 | | .child(graph_tab_title(3))
970 | | .child(
971 | | horiz_or_vert()
... |
979 | | )
980 | | .with_name(graph_tab_id(3)),
| |_______________________________________________^ expected NamedView<_>
, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout>
and NamedView<_>
have similar names, but are actually distinct types
note: NamedView<LinearLayout>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_>
is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core
are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^
error[E0599]: the method with_name
exists for struct TabView
, but its trait bounds were not satisfied
--> resctl-demo/src/graph.rs:996:33
|
996 | .child(tabs.with_name("graph-tabs"))
| ^^^^^^^^^
|
::: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:58:1
|
58 | pub struct TabView {
| ------------------
| |
| doesn't satisfy TabView: Nameable
| doesn't satisfy TabView: cursive::View
|
= note: the following trait bounds were not satisfied:
TabView: cursive::View
which is required by TabView: Nameable
&TabView: cursive::View
which is required by &TabView: Nameable
&mut TabView: cursive::View
which is required by &mut TabView: Nameable
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a use
for it:
|
2 + use cursive_core::view::nameable::Nameable;
|
error[E0308]: mismatched types
--> resctl-demo/src/main.rs:622:13
|
621 | Box::new(cursive_buffered_backend::BufferedBackend::new(
| ---------------------------------------------- arguments to this function are incorrect
622 | termion_backend,
| ^^^^^^^^^^^^^^^ expected trait cursive_core::backend::Backend
, found trait cursive::backend::Backend
|
= note: expected struct Box<(dyn cursive_core::backend::Backend + 'static)>
found struct Box<dyn cursive::backend::Backend>
= note: perhaps two different versions of crate cursive_core
are being used?
note: associated function defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_buffered_backend-0.5.0/src/lib.rs:90:12
|
90 | pub fn new(backend: Box) -> Self {
| ^^^
error[E0277]: the trait bound BufferedBackend: cursive::backend::Backend
is not satisfied
--> resctl-demo/src/main.rs:621:9
|
621 | / Box::new(cursive_buffered_backend::BufferedBackend::new(
622 | | termion_backend,
623 | | ))
| |__________^ the trait cursive::backend::Backend
is not implemented for BufferedBackend
|
= help: the following other types implement trait cursive::backend::Backend
:
cursive::backends::puppet::Backend
cursive::backends::termion::Backend
Dummy
= note: required for the cast from Box<BufferedBackend>
to Box<(dyn cursive::backend::Backend + 'static)>
Some errors have detailed explanations: E0277, E0308, E0599.
For more information about an error, try rustc --explain E0277
.
error: could not compile resctl-demo
(bin "resctl-demo") due to 8 previous errors
warning: build failed, waiting for other jobs to finish...