Estou tentando incluir rust-rocksdb em um aplicativo que usa tokio 0.2 (portanto, async await) e estou tentando compilar usando 1.39.0-beta.1 Recebo estes erros:
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /my-app/target/debug/build/librocksdb-sys-a3849244a8784e5d/out/bindings.rs:243:5
|
243 | pub __opaque: [libc::c_char; 56usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 56]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 56]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 56]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /my-app/target/debug/build/librocksdb-sys-a3849244a8784e5d/out/bindings.rs:282:5
|
282 | pub __opaque: [libc::c_char; 40usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 40]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 40]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 40]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /my-app/target/debug/build/librocksdb-sys-a3849244a8784e5d/out/bindings.rs:364:5
|
364 | pub __opaque: [libc::c_char; 56usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 56]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 56]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 56]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /my-app/target/debug/build/librocksdb-sys-a3849244a8784e5d/out/bindings.rs:487:5
|
487 | pub __opaque: [libc::c_char; 192usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 192]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 192]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 192]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /my-app/target/debug/build/librocksdb-sys-a3849244a8784e5d/out/bindings.rs:572:5
|
572 | pub __opaque: [libc::c_char; 8176usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 8176]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 8176]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 8176]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error: aborting due to 5 previous errors
Também tentei com nightly e tenho o mesmo problema, usando nightly 20/09/2019 e 10/09/2019, em vez disso, compila perfeitamente.
Desculpe se este não é um problema librocksdb-sys (talvez seja um problema Bingen), mas eu sou um novato em ferrugem, então não tenho 100% de certeza de como verificar isso.
Oi! Obrigado por criar um problema. Estamos cientes desse problema e fomos forçados a desabilitar o canal beta
no Travis por causa disso.
No entanto, a única solução que posso sugerir é mudar para o compilador stable
.
O motivo é que esse problema nunca aparecerá no estável, de acordo com https://doc.rust-lang.org/nightly/src/core/array.rs.html#385
[instável (feature = "const_generic_impls_guard", issue = "0",
reason = "will never be stable, just a temporary step until const generics are stable")]
@vitvakatu oh ok, obrigado! Vou usar o trabalho noturno até que 1.39 fique estável, pois ainda preciso esperar / async.
Encerrarei este problema, pois não há nada que você possa fazer a respeito.
Não consigo construir librocksdb-sys no beta (também preciso do beta para o material async / await) no MacOS Mojave, Xcode 11.1 (tenho MacPorts, não brew).
Estou recebendo este erro:
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /Users/calin/src/ec/photon/target/release/build/librocksdb-sys-d77172d3d1e61d8b/out/bindings.rs:243:5
|
243 | pub __opaque: [libc::c_char; 56usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 56]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 56]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 56]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /Users/calin/src/ec/photon/target/release/build/librocksdb-sys-d77172d3d1e61d8b/out/bindings.rs:282:5
|
282 | pub __opaque: [libc::c_char; 40usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 40]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 40]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 40]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /Users/calin/src/ec/photon/target/release/build/librocksdb-sys-d77172d3d1e61d8b/out/bindings.rs:364:5
|
364 | pub __opaque: [libc::c_char; 56usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 56]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 56]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 56]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /Users/calin/src/ec/photon/target/release/build/librocksdb-sys-d77172d3d1e61d8b/out/bindings.rs:487:5
|
487 | pub __opaque: [libc::c_char; 192usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 192]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 192]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 192]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> /Users/calin/src/ec/photon/target/release/build/librocksdb-sys-d77172d3d1e61d8b/out/bindings.rs:572:5
|
572 | pub __opaque: [libc::c_char; 8176usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 8176]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 8176]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 8176]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0277`.
Por favor informar?
@cculianu Sim. É um problema conhecido. Tente usar librocksdb-sys
de master
.
Entendo. Então vai funcionar?
Desculpe, mas: eu sou um nub para o mundo da ferrugem - estou literalmente apenas tentando compilar um projeto que um colaborador meu criou para que eu possa fazê-lo funcionar no meu sistema macos (ele está fazendo o lado do servidor e eu estou fazendo o cliente em um idioma totalmente diferente). Eu só quero que o servidor dele compile para que eu possa executá-lo aqui ... sem ter que usar uma VM Linux (no Linux ele compila perfeitamente).
Eu sei que posso pesquisar no Google, mas é intimidante - o mundo Rust é literalmente muito novo para mim. Sou um dev C ++. :) Como faço para que sua especificação de compilação use master e não baixe a caixa que deseja? Quando eu coloco cargo build
no diretório de origem de seu projeto, ele baixa a caixa e tenta construí-la. Posso substituir isso?
Talvez eu devesse perguntar a ele .. :)
Acho que descobri - estou apontando sua dependência do rocksdb para o seu repositório aqui, em vez de 0.12.4.
Está construindo agora ...
ZOMG compilado! OBRIGADO PELA RESPOSTA. Literalmente não tinha ideia do que fazer. Obrigado.
Comentários muito úteis
ZOMG compilado! OBRIGADO PELA RESPOSTA. Literalmente não tinha ideia do que fazer. Obrigado.