deps-rs / deps.rs

Keep your dependencies up-to-date
https://deps.rs
Apache License 2.0
426 stars 26 forks source link

librocksdb-sys and rocksdb compatibility problem #238

Closed julio75012 closed 1 month ago

julio75012 commented 1 month ago

Hello,

While compiling the https://github.com/paritytech/polkadot-sdk-solochain-template on my Open Suse 15.6 linux distribution, I get the following error:

jules@localhost:~/Documents/kwickbit/polkadot-sdk-solochain-template> cargo build
   Compiling sc-network-types v0.12.1
   Compiling rocksdb v0.21.0
   Compiling solochain-template-runtime v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/runtime)
error[E0425]: cannot find function `rocksdb_options_set_access_hint_on_compaction_start` in crate `ffi`
    --> /home/jules/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.21.0/src/db_options.rs:2591:18
     |
2591 |   ...    ffi::rocksdb_options_set_access_hint_on_compaction_start(self.inner, ...
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `rocksdb_options_set_disable_auto_compactions`
     |
    ::: /home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/target/debug/build/librocksdb-sys-e4c927eb0f4571f6/out/bindings.rs:3330:5
     |
3330 | /     pub fn rocksdb_options_set_disable_auto_compactions(
3331 | |         arg1: *mut rocksdb_options_t,
3332 | |         arg2: libc::c_int,
3333 | |     );
     | |_____- similarly named function `rocksdb_options_set_disable_auto_compactions` defined here

   Compiling sc-consensus v0.43.0
error[E0061]: this function takes 9 arguments but 5 arguments were supplied
    --> /home/jules/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rocksdb-0.21.0/src/db_options.rs:2443:13
     |
2443 |               ffi::rocksdb_options_set_plain_table_factory(
     |  _____________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
2444 | |                 self.inner,
2445 | |                 options.user_key_length,
2446 | |                 options.bloom_bits_per_key,
2447 | |                 options.hash_table_ratio,
2448 | |                 options.index_sparseness,
2449 | |             );
     | |_____________- multiple arguments are missing
     |
note: function defined here
    --> /home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/target/debug/build/librocksdb-sys-e4c927eb0f4571f6/out/bindings.rs:3397:12
     |
3397 |     pub fn rocksdb_options_set_plain_table_factory(
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the arguments
     |
2443 |             ffi::rocksdb_options_set_plain_table_factory(self.inner, options.user_key_length, options.bloom_bits_per_key, options.hash_table_ratio, options.index_sparseness, /* usize */, /* i8 */, /* u8 */, /* u8 */);
     |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some errors have detailed explanations: E0061, E0425.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `rocksdb` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

it seems that librocksdb-sys=0.11.0 and rocksdb=0.21.0 are incompatible. any suggestion for solving it ?

robjtede commented 1 month ago

i suggest asking them here https://github.com/rust-rocksdb/rust-rocksdb/issues