tokio 0.2を使用するアプリにrust-rocksdbを含めようとしています(非同期待機)。1.39.0-beta.1を使用してコンパイルしようとしています。次のエラーが発生します。
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
私も毎晩試してみましたが、同じ問題が発生します。代わりに毎晩2019-09-20と2019-09-10を使用すると、正常にコンパイルされます。
これがlibrocksdb-sysの問題ではない場合は申し訳ありませんが(おそらくbingenの問題です)、私はさびた初心者なので、それを確認する方法が100%わかりません。
やあ! 問題を作成していただきありがとうございます。 私たちはこの問題を認識しており、そのためにTravisのbeta
チャネルを無効にすることを余儀なくされました。
ただし、私が提案できる唯一の解決策は、 stable
コンパイラに切り替えることです。
その理由は、 https://doc.rust-lang.org/nightly/src/core/array.rs.html#385によると、この問題が安定して表示されることはないためです
[unstable(feature = "const_generic_impls_guard"、issue = "0"、
reason = "will never be stable, just a temporary step until const generics are stable")]
@vitvakatuああ、ありがとう! まだawait / asyncが必要なので、1.39が安定するまで毎晩作業を使用します。
あなたにできることは何もないので、この問題を閉じます。
MacOS Mojave、Xcode 11.1(私はMacPortsを持っていますが、醸造していません)でも、ベータ版でlibrocksdb-sysをビルドできません(非同期/待機用のベータ版も必要です)。
このエラーが発生します:
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`.
お知らせ下さい?
@cculianuはい。 これは既知の問題です。 使用してみてくださいlibrocksdb-sys
からmaster
。
分かりました。 それでそれはうまくいくでしょうか?
申し訳ありませんが、私はさびた世界に夢中です-私は文字通り、私の共同作業者が作成したプロジェクトをコンパイルしようとしているので、それを私のmacosシステムで動作させることができます(彼はサーバー側をやっていて、私はまったく異なる言語のクライアント)。 彼のサーバーをコンパイルして、ここで実行できるようにしたいだけです... Linux VMを使用する必要はありません(Linuxでは完全にコンパイルされます)。
私はこれをグーグルで検索できることを知っていますが、それは恐ろしいことです-Rustの世界は文字通り私にとって非常に新しいものです。 私はC ++開発者です。 :)マスターを使用し、必要なクレートをダウンロードしないように彼のビルド仕様を取得するにはどうすればよいですか? 彼のプロジェクトのソースディレクトリでcargo build
を実行すると、クレートがダウンロードされ、ビルドが試行されます。 それを上書きできますか?
多分私は彼に尋ねるべきです.. :)
私はそれを理解したと思います-私は彼のrocksdb依存関係を0.12.4ではなくここであなたのリポジトリに向けています。
今構築中です...
コンパイルしたZOMG! 返信してくれてありがとう。 文字通り何をすべきかわからなかった。 ありがとう。
最も参考になるコメント
コンパイルしたZOMG! 返信してくれてありがとう。 文字通り何をすべきかわからなかった。 ありがとう。