Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librocksdb-sys and rocksdb compatibility problem #12997

Open
julio75012 opened this issue Sep 6, 2024 · 0 comments
Open

librocksdb-sys and rocksdb compatibility problem #12997

julio75012 opened this issue Sep 6, 2024 · 0 comments

Comments

@julio75012
Copy link

julio75012 commented Sep 6, 2024

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 ?

please find the result of a cargo tree --invert librocksdb-sys if this can help:

jules@localhost:~/Documents/kwickbit/polkadot-sdk-solochain-template> cargo tree --invert librocksdb-sys
librocksdb-sys v0.11.0+8.1.1
├── rocksdb v0.21.0
│   ├── kvdb-rocksdb v0.19.0
│   │   └── sc-client-db v0.44.0
│   │       ├── frame-benchmarking-cli v42.0.0
│   │       │   └── solochain-template-node v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/node)
│   │       ├── sc-cli v0.46.0
│   │       │   ├── frame-benchmarking-cli v42.0.0 (*)
│   │       │   └── solochain-template-node v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/node)
│   │       └── sc-service v0.45.0
│   │           ├── frame-benchmarking-cli v42.0.0 (*)
│   │           ├── sc-cli v0.46.0 (*)
│   │           └── solochain-template-node v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/node)
│   └── solochain-template-node v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/node)
└── solochain-template-node v0.1.0 (/home/jules/Documents/kwickbit/polkadot-sdk-solochain-template/node)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant