2

I'm immediately failing to compile https://github.com/Blockstream/electrs on a clean branch of new-index as instructed in the README. The build is failing with the following error:

error: failed to run custom build command for `librocksdb-sys v6.20.3`

...

electrs/target/release/build/librocksdb-sys-3b3cba65ffc3c8e0/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '"enum_(unnamed_at_rocksdb/include/rocksdb/c_h_854_1)" is not a valid Ident'

My variation from the run command in the README.md is in trying to connect to Polar/Regtest data. The command is run based on feedback in related questions and I've verified that the directory exists for me.

cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.polar/networks/1/volumes/bitcoind/backend1 --network=regtest

Any feedback on this particular issue would be greatly appreciated as well as any tips on running Esplora on regtest, that ideally expand on --lightmode.

OS: MacOS (Intel)
rustc: 1.72.1
cargo: 1.72.1
rustup: 1.26.0
3
  • Seems to be a version conflict between bindgen version < 0.62 via rocksdb, and clang version 15. I was unfortunately planning on using XCode 15 for the same project so this does create a material issue. Commented Dec 16, 2023 at 12:54
  • 2
    For what it's worth github.com/mempool/electrs is a maintained fork which serves the same purpose. Commented Dec 18, 2023 at 14:51
  • Its worth a lot! Thank you for responding @AntoinePoinsot Commented Dec 18, 2023 at 16:21

1 Answer 1

1

There were several steps I was able to take to resolve this at the expense of the librocksdb-oldcpu feature and optional dependency.

  1. Remove librocksdb-oldcpu dependency and feature
  2. Upgrade librocksdb to 0.21.0, this pulls bindgen up to >0.62.0.
  3. Update the Iterator implementation in src/new-index/db.rs to fix a breaking change on the response type of a function.

You can see the commit of my fork for this here.

I understand that this change optimizes for my machine and expediency so still looking for any insights into how others maybe using Electrum in Regtest today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.