report " doesn't have a size known at compile-time" in mac m1 when cargo build
Closed this issue · 1 comments
baidang201 commented
the rustc is 1.62.0-nightly (ecd44958e 2022-05-10)
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> node/cli/src/command.rs:526:8
|
526 | let output_buf = with_runtime_or_err!(chain_spec, {
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> node/cli/src/command.rs:540:5
|
540 | std::fs::write(output, output_buf)?;
| ^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `std::fs::write`
--> /Users/li/.rustup/toolchains/nightly-2022-05-11-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/fs.rs:315:30
|
315 | pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> {
| ^ required by this bound in `std::fs::write`
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> node/cli/src/command.rs:540:28
|
540 | std::fs::write(output, output_buf)?;
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature
For more information about this error, try `rustc --explain E0277`.
error: could not compile `node-cli` due to 3 previous errors
Akagi201 commented
@baidang201 hi, please use the Makefile command, you may use make build-bifrost-kusama-release
for kusama relay chain.