Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running cargo-install-all.sh on v1.16.23 #34429

Closed
buffalu opened this issue Dec 13, 2023 · 2 comments · Fixed by #34430
Closed

Error running cargo-install-all.sh on v1.16.23 #34429

buffalu opened this issue Dec 13, 2023 · 2 comments · Fixed by #34430
Labels
community Community contribution

Comments

@buffalu
Copy link
Contributor

buffalu commented Dec 13, 2023

Problem

Running cargo-install-all on v1.16.23 yields the following logs:

   Compiling solana_rbpf v0.8.0
error[E0658]: use of unstable library feature 'once_cell'
  --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/vm.rs:31:33
   |
31 | static RUNTIME_ENVIRONMENT_KEY: std::sync::OnceLock<i32> = std::sync::OnceLock::<i32>::new();
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
  --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/vm.rs:31:60
   |
31 | static RUNTIME_ENVIRONMENT_KEY: std::sync::OnceLock<i32> = std::sync::OnceLock::<i32>::new();
   |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
  --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/vm.rs:31:60
   |
31 | static RUNTIME_ENVIRONMENT_KEY: std::sync::OnceLock<i32> = std::sync::OnceLock::<i32>::new();
   |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

   Compiling tracing-opentelemetry v0.17.4
error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/disassembler.rs:269:48
    |
269 |                 loader.get_function_registry().lookup_by_key(insn.imm as u32).map(|(function_name, _)| String::from_utf8_lossy(function_name).to_string()).unwrap_or_else(|| "[invalid]".to_string())
    |                                                ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
    --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/elf.rs:1098:63
     |
1098 | ...                   && loader.get_function_registry().lookup_by_key(hash).is_none()
     |                                                         ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
     |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
    --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
     |
90   | impl<T: Copy + PartialEq> FunctionRegistry<T> {
     |                ^^^^^^^^^  -------------------
     |                |
     |                unsatisfied trait bound introduced here

error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/interpreter.rs:474:116
    |
474 |                     if let Some((_function_name, function)) = self.executable.get_loader().get_function_registry().lookup_by_key(insn.imm as u32) {
    |                                                                                                                    ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/jit.rs:646:120
    |
646 |                         if let Some((_function_name, function)) = self.executable.get_loader().get_function_registry().lookup_by_key(insn.imm as u32) {
    |                                                                                                                        ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:143:51
    |
143 |                 && loader.get_function_registry().lookup_by_key(hash).is_some()
    |                                                   ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0599]: the method `eq` exists for struct `FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:225:57
    |
78  | pub struct FunctionRegistry<T> {
    | ------------------------------
    | |
    | method `eq` not found for this struct
    | doesn't satisfy `_: Iterator`
    | doesn't satisfy `_: PartialEq`
...
225 |         self.config.eq(&other.config) && self.functions.eq(&other.functions)
    |                                                         ^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:77:17
    |
77  | #[derive(Debug, PartialEq, Eq)]
    |                 ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
    = note: the following trait bounds were not satisfied:
            `FunctionRegistry<for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>: Iterator`
            which is required by `&mut FunctionRegistry<for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>: Iterator`
note: the trait `Iterator` must be implemented
   --> /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/iter/traits/iterator.rs:73:1

error[E0599]: the method `mem_size` exists for struct `FunctionRegistry<fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:272:44
    |
78  | pub struct FunctionRegistry<T> {
    | ------------------------------ method `mem_size` not found for this struct
...
272 |             .saturating_add(self.functions.mem_size())
    |                                            ^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, C>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0599]: the method `lookup_by_key` exists for reference `&FunctionRegistry<fn(*mut EbpfVm<'a, TestContextObject>, u64, u64, u64, u64, u64)>`, but its trait bounds were not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/static_analysis.rs:234:26
    |
230 |                       if let Some((function_name, _function)) = self
    |  _______________________________________________________________-
231 | |                         .executable
232 | |                         .get_loader()
233 | |                         .get_function_registry()
234 | |                         .lookup_by_key(insn.imm as u32)
    | |                         -^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
    | |_________________________|
    |
    |
note: trait bound `for<'a> fn(*mut EbpfVm<'a, TestContextObject>, u64, u64, u64, u64, u64): PartialEq` was not satisfied
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/program.rs:90:16
    |
90  | impl<T: Copy + PartialEq> FunctionRegistry<T> {
    |                ^^^^^^^^^  -------------------
    |                |
    |                unsatisfied trait bound introduced here

error[E0658]: use of unstable library feature 'once_cell'
  --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/solana_rbpf-0.8.0/src/vm.rs:36:10
   |
36 |         .get_or_init(|| rand::thread_rng().gen::<i32>() >> PROGRAM_ENVIRONMENT_KEY_SHIFT)
   |          ^^^^^^^^^^^
   |
   = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

Some errors have detailed explanations: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: could not compile `solana_rbpf` due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `spl-token-cli v3.3.0`, intermediate artifacts can be found at `/tmp/cargo-installe4Yb7E`

jito-solana is seeing the same issue.

Proposed Solution

Fix

@buffalu buffalu added the community Community contribution label Dec 13, 2023
@buffalu
Copy link
Contributor Author

buffalu commented Dec 13, 2023

@Yiwen-Gao
Copy link

I ran into the same problem yesterday, so thank you guys for raising and fixing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants