Rust-rocksdb: λ² νƒ€μ—μ„œ librocksdb-sysλ₯Ό μ»΄νŒŒμΌν•  수 μ—†μŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2019λ…„ 09μ›” 27일  Β·  7μ½”λ©˜νŠΈ  Β·  좜처: rust-rocksdb/rust-rocksdb

tokio 0.2(async await)λ₯Ό μ‚¬μš©ν•˜λŠ” 앱에 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

λ‚˜λŠ” λ˜ν•œ nightly둜 μ‹œλ„ν–ˆμ§€λ§Œ nightly 2019-09-20 및 2019-09-10을 λŒ€μ‹  μ‚¬μš©ν•˜μ—¬ λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λŒ€μ‹  잘 μ»΄νŒŒμΌλ©λ‹ˆλ‹€.

이것이 librocksdb-sys λ¬Έμ œκ°€ μ•„λ‹ˆλΌλ©΄ μ£„μ†‘ν•©λ‹ˆλ‹€(μ•„λ§ˆλ„ bingen 문제일 수 있음). κ·ΈλŸ¬λ‚˜ μ €λŠ” λ…Ήμ˜ μ΄ˆλ³΄μžμ΄λ―€λ‘œ 이λ₯Ό ν™•μΈν•˜λŠ” 방법을 100% ν™•μ‹ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

ZOMG μ»΄νŒŒμΌν–ˆμŠ΅λ‹ˆλ‹€! λ‹΅μž₯을 λ³΄λ‚΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€. 말 κ·ΈλŒ€λ‘œ 무엇을 해야할지 μ „ν˜€ λͺ°λžμŠ΅λ‹ˆλ‹€. 감사 ν•΄μš”.

λͺ¨λ“  7 λŒ“κΈ€

μ•ˆλ…•ν•˜μ„Έμš”! 문제λ₯Ό λ§Œλ“€μ–΄ μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€. μš°λ¦¬λŠ” 이 문제λ₯Ό μΈμ§€ν•˜κ³  있으며 이 λ•Œλ¬Έμ— Travisμ—μ„œ beta 채널을 κ°•μ œλ‘œ λΉ„ν™œμ„±ν™”ν–ˆμŠ΅λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ λ‚΄κ°€ μ œμ•ˆν•  수 μžˆλŠ” μœ μΌν•œ 해결책은 stable 컴파일러둜 μ „ν™˜ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.
κ·Έ μ΄μœ λŠ” https://doc.rust-lang.org/nightly/src/core/array.rs.html#385 에 λ”°λ₯΄λ©΄ 이 λ¬Έμ œκ°€ μ•ˆμ •μ μœΌλ‘œ λ‚˜νƒ€λ‚˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€.

[λΆˆμ•ˆμ •(κΈ°λŠ₯ = "const_generic_impls_guard", 문제 = "0",

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

@vitvakatu 였
당신이 그것에 λŒ€ν•΄ ν•  수 μžˆλŠ” 것이 아무것도 μ—†κΈ° λ•Œλ¬Έμ— 이 문제λ₯Ό λ‹«κ² μŠ΅λ‹ˆλ‹€.

MacOS Mojave, Xcode 11.1(λ‚˜λŠ” MacPortsκ°€ 있고 brewκ°€ μ•„λ‹˜)μ—μ„œ λ² νƒ€μ—μ„œ 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 from master μ‚¬μš©ν•΄ λ³΄μ„Έμš”.

μ•Œ κ² μ–΄μš”. 그럼 νš¨κ³Όκ°€ μžˆμ„κΉŒμš”?

μ£„μ†‘ν•©λ‹ˆλ‹€λ§Œ: μ €λŠ” λ…ΉμŠ¨ 세계에 관심이 μ—†μŠ΅λ‹ˆλ‹€. μ €λŠ” 말 κ·ΈλŒ€λ‘œ 제 macos μ‹œμŠ€ν…œμ—μ„œ μž‘λ™ν•˜λ„λ‘ ν•˜κΈ° μœ„ν•΄ 제 λ™λ£Œκ°€ λ§Œλ“  ν”„λ‘œμ νŠΈλ₯Ό μ»΄νŒŒμΌν•˜λ €κ³  ν•©λ‹ˆλ‹€(κ·ΈλŠ” μ„œλ²„ μΈ‘μ—μ„œ μž‘μ—…ν•˜κ³  μ €λŠ” μ™„μ „νžˆ λ‹€λ₯Έ μ–Έμ–΄λ‘œ 된 ν΄λΌμ΄μ–ΈνŠΈ). λ‚˜λŠ” 그의 μ„œλ²„κ°€ 컴파일되기λ₯Ό μ›ν•˜λ―€λ‘œ μ—¬κΈ°μ—μ„œ μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€... Linux VM을 μ‚¬μš©ν•˜μ§€ μ•Šκ³ λ„(Linuxμ—μ„œλŠ” μ™„λ²½ν•˜κ²Œ μ»΄νŒŒμΌλ©λ‹ˆλ‹€).

λ‚˜λŠ” 이것을 ꡬ글링할 수 μžˆλ‹€λŠ” 것을 μ•Œκ³  μžˆμ§€λ§Œ 그것은 겁이 λ‚œλ‹€. Rust μ„Έκ³„λŠ” 말 κ·ΈλŒ€λ‘œ λ‚˜μ—κ²Œ 맀우 μƒˆλ‘­λ‹€. μ €λŠ” C++ κ°œλ°œμžμž…λ‹ˆλ‹€. :) λ§ˆμŠ€ν„°λ₯Ό μ‚¬μš©ν•˜κ³  μ›ν•˜λŠ” 크레이트λ₯Ό λ‹€μš΄λ‘œλ“œν•˜μ§€ μ•Šλ„λ‘ λΉŒλ“œ 사양을 μ–»μœΌλ €λ©΄ μ–΄λ–»κ²Œ ν•΄μ•Ό ν•©λ‹ˆκΉŒ? λ‚΄κ°€ 그의 ν”„λ‘œμ νŠΈμ— λŒ€ν•œ μ†ŒμŠ€ λ””λ ‰ν† λ¦¬μ—μ„œ cargo build λ₯Ό μ‹€ν–‰ν•˜λ©΄ 크레이트λ₯Ό λ‹€μš΄λ‘œλ“œν•˜κ³  λΉŒλ“œλ₯Ό μ‹œλ„ν•©λ‹ˆλ‹€. 그것을 λ¬΄μ‹œν•  수 μžˆμŠ΅λ‹ˆκΉŒ?

κ·Έμ—κ²Œ 물어봐야 할지도.. :)

λ‚˜λŠ” 그것을 μ•Œμ•„ λƒˆλ‹€κ³  μƒκ°ν•œλ‹€ - λ‚˜λŠ” 그의 0.12.4κ°€ μ•„λ‹Œ λ‹Ήμ‹ μ˜ μ €μž₯μ†Œμ— λŒ€ν•œ 그의 rockdb μ˜μ‘΄μ„±μ„ 가리킀고 μžˆλ‹€.

μ§€κΈˆ 곡사쀑...

ZOMG μ»΄νŒŒμΌν–ˆμŠ΅λ‹ˆλ‹€! λ‹΅μž₯을 λ³΄λ‚΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€. 말 κ·ΈλŒ€λ‘œ 무엇을 해야할지 μ „ν˜€ λͺ°λžμŠ΅λ‹ˆλ‹€. 감사 ν•΄μš”.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰