Rust-rocksdb: Kann librocksdb-sys in der Beta nicht kompilieren

Erstellt am 27. Sept. 2019  ·  7Kommentare  ·  Quelle: rust-rocksdb/rust-rocksdb

Ich versuche, rust-rocksdb in eine App einzubinden, die tokio 0.2 verwendet (also asynchrones Warten) und versuche, mit 1.39.0-beta.1 zu kompilieren. Ich erhalte diese Fehler:

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

Ich habe es auch mit nightly versucht und bekomme das gleiche Problem, mit nightly 2019-09-20 und 2019-09-10 stattdessen kompiliert es gut.

Es tut mir leid, wenn dies kein librocksdb-sys-Problem ist (vielleicht ist es ein Bingen-Problem), aber ich bin ein Anfänger in Rost, daher bin ich mir nicht 100% sicher, wie ich das überprüfen kann.

Hilfreichster Kommentar

ZOMG es zusammengestellt! DANKE FÜR IHRE ANTWORT. Hatte buchstäblich keine Ahnung, was zu tun ist. Vielen Dank.

Alle 7 Kommentare

Hi! Vielen Dank, dass Sie ein Problem erstellt haben. Wir sind uns dieses Problems bewusst und haben uns deshalb gezwungen, den beta Kanal auf Travis zu deaktivieren.
Die einzige Lösung, die ich Ihnen vorschlagen kann, ist jedoch, zum stable Compiler zu wechseln.
Der Grund dafür ist, dass dieses Problem laut https://doc.rust-lang.org/nightly/src/core/array.rs.html#385 nie in Stable erscheinen wird

[unstable(feature = "const_generic_impls_guard", Problem = "0",

reason = "will never be stable, just a temporary step until const generics are stable")]

@vitvakatu oh ok, danke! Ich werde die Arbeit jede Nacht verwenden, bis 1.39 stabil wird, da ich noch wait/async benötige.
Ich schließe dieses Thema, da Sie nichts dagegen tun können.

Ich kann librocksdb-sys nicht auf Beta bauen (ich brauche auch Beta für das Async/Await-Zeug) auch auf MacOS Mojave, Xcode 11.1 (ich habe MacPorts, nicht brew).

Ich bekomme diesen Fehler:

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`.

Bitte beraten?

@cculianu Ja. Es ist ein bekanntes Problem. Versuchen Sie, librocksdb-sys von master .

Ich verstehe. Also wird es dann funktionieren?

Entschuldigung, aber: Ich bin ein Neuling in der Rostwelt -- ich versuche buchstäblich nur, ein Projekt zu kompilieren, das ein Mitarbeiter von mir erstellt hat, damit ich es auf meinem Macos-System zum Laufen bringen kann (er macht die Serverseite und ich mache die Kunde in einer ganz anderen Sprache). Ich möchte nur, dass sein Server kompiliert wird, damit ich ihn hier ausführen kann ... ohne eine Linux-VM verwenden zu müssen (unter Linux kompiliert er perfekt).

Ich weiß, dass ich das googeln kann, aber es ist einschüchternd – die Rust-Welt ist buchstäblich sehr neu für mich. Ich bin ein C++-Entwickler. :) Wie bekomme ich seine Build-Spezifikation, um den Master zu verwenden und nicht die gewünschte Kiste herunterzuladen? Wenn ich cargo build im Quellverzeichnis für sein Projekt mache, lädt es die Kiste herunter und versucht, sie zu erstellen. Kann ich das überschreiben?

Vielleicht sollte ich ihn fragen.. :)

Ich glaube, ich habe es herausgefunden - ich zeige seine rocksdb-Abhängigkeit hier auf Ihr Repository und nicht auf 0.12.4.

Jetzt wird gebaut...

ZOMG es zusammengestellt! DANKE FÜR IHRE ANTWORT. Hatte buchstäblich keine Ahnung, was zu tun ist. Vielen Dank.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

zach-schoenberger picture zach-schoenberger  ·  5Kommentare

freehere107 picture freehere107  ·  12Kommentare

iSynaptic picture iSynaptic  ·  31Kommentare

elichai picture elichai  ·  6Kommentare

iSynaptic picture iSynaptic  ·  11Kommentare