electrs: incompatibility with the new version of rocksdb
Somwhere between 6.23.3 and 6.25.3 the API or rocksdb has changed:
Compiling electrs-rocksdb v0.15.0-e2
error[E0308]: mismatched types
--> /private/tmp/nix-build-electrs-0.9.2.drv-0/electrs-0.9.2-vendor.tar.gz/electrs-rocksdb/src/db_options.rs:477:56
|
477 | ffi::rocksdb_filterpolicy_create_bloom(bits_per_key)
| ^^^^^^^^^^^^ expected `f64`, found `i32`
|
help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer
|
477 | ffi::rocksdb_filterpolicy_create_bloom(bits_per_key.into())
| ^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> /private/tmp/nix-build-electrs-0.9.2.drv-0/electrs-0.9.2-vendor.tar.gz/electrs-rocksdb/src/db_options.rs:479:61
|
479 | ffi::rocksdb_filterpolicy_create_bloom_full(bits_per_key)
| ^^^^^^^^^^^^ expected `f64`, found `i32`
|
help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer
|
479 | ffi::rocksdb_filterpolicy_create_bloom_full(bits_per_key.into())
| ^^^^^^^^^^^^^^^^^^^
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 18 (10 by maintainers)
Edit: I read the instructions wrong. If you don’t install any librocks packages and don’t build the dep yourself, the normal
cargo buildjust works on Ubuntu 24.04. Leaving the rest of the comment here, in case someone else makes the same mistake.I just tried installing electrs on the latest Ubuntu LTS (24.04), and ran into not being able to either build the required version of librocksdb from source or find a prebuilt package in any of the apt repos.
The guide currently mentions Ubuntu 23.04, which is not an LTS release, and thus not supported anymore. The previous LTS contains an older version of the package, and the latest one has a newer version of it:
(The build from source failed with multiple errors, but I’m hesitant to open an issue for it upstream, because of the large gap between the version I’m trying to build and the current version.)
Yes, I’m only changing dependencies to use rust-rocksdb. I’ve updated the patch taking into account your remarks.
@zciendor 32 bit ARM has multiple issues, I strongly recommend migrating to 64 bit. I also tried to compile rocksdb package for it but failed.
FWIW, we have https://github.com/romanz/electrs/issues/201 😃
Many thanks for reporting this issue!
Due to multiple compatibility issues (mostly with ARM platforms - e.g. #403), we have forked the
rust-rocksdbcrate (https://crates.io/crates/electrs-rocksdb), in order to “pin” the C++ RocksDB to 6.11.4 release (#473) to allow dynamic linking on Debian 11.So indeed, it probably won’t work with the latest RocksDB releases 😦