stafiprotocol/stafi-node

Cargo build failed

Closed this issue · 3 comments

error[E0432]: unresolved import sp_core::to_substrate_wasm_fn_return_value
--> /home/ubuntu/.cargo/git/checkouts/stafi-blockchain-617d6602e3c006ac/3c6a142/primitives/api/src/lib.rs:54:9
|
54 | pub use sp_core::to_substrate_wasm_fn_return_value;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no to_substrate_wasm_fn_return_value in the root

For more information about this error, try rustc --explain E0432.
error: could not compile sp-api due to previous error
warning: build failed, waiting for other jobs to finish...
error: cannot find macro vec in this scope
--> /home/ubuntu/.cargo/git/checkouts/stafi-blockchain-617d6602e3c006ac/3c6a142/frame/support/src/storage/migration.rs:183:16
|
183 | let mut key = vec![0u8; 32 + hash.len()];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::codec::alloc::vec
sp_std::vec

error: cannot find macro vec in this scope
--> /home/ubuntu/.cargo/git/checkouts/stafi-blockchain-617d6602e3c006ac/3c6a142/frame/support/src/storage/migration.rs:174:16
|
174 | let mut key = vec![0u8; 32 + hash.len()];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::codec::alloc::vec
sp_std::vec

error: cannot find macro vec in this scope
--> /home/ubuntu/.cargo/git/checkouts/stafi-blockchain-617d6602e3c006ac/3c6a142/frame/support/src/storage/migration.rs:165:16
|
165 | let mut key = vec![0u8; 32 + hash.len()];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::codec::alloc::vec
sp_std::vec

error: cannot find macro vec in this scope
--> /home/ubuntu/.cargo/git/checkouts/stafi-blockchain-617d6602e3c006ac/3c6a142/frame/support/src/storage/migration.rs:156:16
|
156 | let mut key = vec![0u8; 32 + hash.len()];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::codec::alloc::vec
sp_std::vec

error: could not compile frame-support due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

I have the same problem

did you solve it? I have the same problem

This is a version problem of rust. Please try version 1.59.0. @KevinTMitnick @blocknodehub @AndreaHan

rustup install 1.59.0
rustup default 1.59.0

Then build again.