Rust-rocksdb: Tidak dapat mengkompilasi librocksdb-sys pada versi beta

Dibuat pada 27 Sep 2019  ·  7Komentar  ·  Sumber: rust-rocksdb/rust-rocksdb

Saya mencoba memasukkan rust-rocksdb ke dalam aplikasi yang menggunakan tokio 0.2 (jadi async menunggu) dan mencoba mengkompilasi menggunakan 1.39.0-beta.1 Saya mendapatkan kesalahan ini:

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

Saya juga sudah mencoba dengan nightly dan saya mendapatkan masalah yang sama, menggunakan nightly 2019-09-20 dan 2019-09-10 alih-alih mengkompilasi dengan baik.

Maaf jika ini bukan masalah librocksdb-sys (mungkin ini masalah bingen) tapi saya seorang pemula dalam karat jadi saya tidak 100% yakin bagaimana cara memeriksanya.

Komentar yang paling membantu

ZOMG itu dikompilasi! TERIMA KASIH ATAS BALASANNYA. Secara harfiah tidak tahu harus berbuat apa. Terima kasih.

Semua 7 komentar

Hai! Terima kasih telah membuat masalah. Kami menyadari masalah ini dan kami terpaksa menonaktifkan saluran beta di Travis karenanya.
Namun, satu-satunya solusi yang dapat saya sarankan kepada Anda adalah beralih ke kompiler stable .
Alasannya adalah bahwa masalah ini tidak akan pernah muncul di stabil, menurut https://doc.rust-lang.org/nightly/src/core/array.rs.html#385

[tidak stabil(fitur = "const_generic_impls_guard", masalah = "0",

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

@vitvakatu oh ok, terima kasih! Saya akan menggunakan working nightly hingga 1,39 menjadi stabil karena saya masih perlu menunggu/async.
Saya akan menutup masalah ini karena tidak ada yang dapat Anda lakukan.

Saya tidak dapat membangun librocksdb-sys pada beta (saya juga membutuhkan beta untuk async/menunggu hal-hal) baik di MacOS Mojave, Xcode 11.1 (Saya punya MacPorts, bukan buatan).

Saya mendapatkan kesalahan ini:

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

Mohon saran?

@cculianu Ya. Ini masalah yang diketahui. Coba gunakan librocksdb-sys dari master .

Jadi begitu. Jadi itu akan berhasil?

Permintaan maaf tetapi: Saya seorang nub ke dunia karat -- Saya benar-benar hanya mencoba mengkompilasi proyek yang dibuat oleh kolaborator saya sehingga saya bisa membuatnya bekerja di sistem macos saya (dia melakukan sisi server dan saya melakukan klien dalam bahasa yang sama sekali berbeda). Saya hanya ingin servernya dikompilasi sehingga saya bisa menjalankannya di sini... tanpa harus menggunakan VM Linux (di Linux itu dikompilasi dengan sempurna).

Saya tahu saya bisa mencarinya di Google, tetapi ini menakutkan -- dunia Rust benar-benar baru bagi saya. Saya seorang pengembang C++. :) Bagaimana cara mendapatkan spesifikasi build-nya untuk menggunakan master dan tidak mengunduh peti yang diinginkan? Ketika saya melakukan cargo build di direktori sumber untuk proyeknya, ia mengunduh peti dan mencoba membangunnya. Bisakah saya menimpanya?

Mungkin aku harus bertanya padanya.. :)

Saya rasa saya menemukan jawabannya - saya menunjukkan ketergantungan rockdb-nya ke repositori Anda di sini daripada 0.12.4.

Sekarang sedang dibangun...

ZOMG itu dikompilasi! TERIMA KASIH ATAS BALASANNYA. Secara harfiah tidak tahu harus berbuat apa. Terima kasih.

Apakah halaman ini membantu?
0 / 5 - 0 peringkat

Masalah terkait

eupn picture eupn  ·  3Komentar

freehere107 picture freehere107  ·  12Komentar

elichai picture elichai  ·  6Komentar

rohitjoshi picture rohitjoshi  ·  10Komentar

zach-schoenberger picture zach-schoenberger  ·  5Komentar