Rust-rocksdb: لا يمكن تجميع librocksdb-sys في الإصدار التجريبي

تم إنشاؤها على ٢٧ سبتمبر ٢٠١٩  ·  7تعليقات  ·  مصدر: rust-rocksdb/rust-rocksdb

أحاول تضمين rust-rocksdb في تطبيق يستخدم tokio 0.2 (ينتظر غير متزامن) وأحاول التجميع باستخدام 1.39.0-beta.

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 (ربما تكون مشكلة بينجين) لكنني مبتدئ في الصدأ ، لذا فأنا لست متأكدًا بنسبة 100٪ من كيفية التحقق من ذلك.

التعليق الأكثر فائدة

تم تجميعها ZOMG! شكرا لكم على الرد. حرفيا ليس لديه فكرة عما يجب القيام به. شكرا.

ال 7 كومينتر

أهلا! شكرا لخلق قضية. نحن على علم بهذه المشكلة وقد أجبرنا على تعطيل قناة beta على Travis بسببها.
ومع ذلك ، فإن الحل الوحيد الذي يمكنني اقتراحه لك هو التبديل إلى المترجم stable .
والسبب هو أن هذه المشكلة لن تظهر أبدًا بشكل مستقر ، وفقًا لـ https://doc.rust-lang.org/nightly/src/core/array.rs.html#385

[unstable (feature = "const_generic_impls_guard" ، المشكلة = "0" ،

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

vitvakatu أوه حسنًا ، شكرًا لك! سأستخدم العمل ليلا حتى ينتقل 1.39 إلى مستقر حيث ما زلت بحاجة إلى الانتظار / غير المتزامن.
سأغلق هذه المشكلة نظرًا لعدم وجود ما يمكنك فعله حيال ذلك.

لا يمكنني إنشاء librocksdb-sys على إصدار تجريبي (أحتاج أيضًا إلى إصدار تجريبي للأشياء غير المتزامنة / المنتظرة) سواء على MacOS Mojave أو Xcode 11.1 (لدي MacPorts ، وليس المشروب).

أتلقى هذا الخطأ:

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 يتم تجميعه بشكل مثالي).

أعلم أنه يمكنني البحث في google ، لكنه أمر مخيف - عالم Rust هو حرفياً جديد جدًا بالنسبة لي. أنا مطور C ++. :) كيف يمكنني الحصول على مواصفات البناء الخاصة به لاستخدام Master وعدم تنزيل الصندوق الذي يريده؟ عندما أقوم بعمل cargo build في الدليل المصدر لمشروعه ، فإنه يقوم بتنزيل الصندوق ويحاول بناء ذلك. هل يمكنني تجاوز ذلك؟

ربما يجب أن أسأله .. :)

أعتقد أنني اكتشفت الأمر - أشير إلى اعتماده على rocksdb إلى مستودعك هنا بدلاً من 0.12.4.

إنه يبني الآن ...

تم تجميعها ZOMG! شكرا لكم على الرد. حرفيا ليس لديه فكرة عما يجب القيام به. شكرا.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات

القضايا ذات الصلة

elichai picture elichai  ·  6تعليقات

jonhoo picture jonhoo  ·  22تعليقات

mvines picture mvines  ·  10تعليقات

iSynaptic picture iSynaptic  ·  11تعليقات

cetra3 picture cetra3  ·  9تعليقات