<p>There were several steps I was able to take to resolve this at the expense of the <code>librocksdb-oldcpu</code> feature and optional dependency.</p>
<ol>
<li>Remove <code>librocksdb-oldcpu</code> dependency and feature</li>
<li>Upgrade <code>librocksdb</code> to <code>0.21.0</code>, this pulls <code>bindgen</code> up to <code>&gt;0.62.0</code>.</li>
<li>Update the Iterator implementation in src/new-index/db.rs to fix a breaking change on the response type of a function.</li>
</ol>
<p>You can see the commit of my fork for this <a href="https://github.com/Blockstream/electrs/commit/d048abae88da77a1138dcea51b5226a3cfb2c7dd" rel="nofollow noreferrer">here</a>.</p>
<p>I understand that this change optimizes for my machine and expediency so still looking for any insights into how others maybe using Electrum in <code>Regtest</code> today.</p>

CC BY-SA 4.0
2023-12-18T14:39:12.203Z
2023-12-18T14:39:12.203Z
Nicholas Sandomeno
<p>I'm immediately failing to compile <a href="https://github.com/Blockstream/electrs" rel="nofollow noreferrer">https://github.com/Blockstream/electrs</a> on a clean branch of <code>new-index</code> as instructed in the README. The build is failing with the following error:</p>
<pre><code>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 '&quot;enum_(unnamed_at_rocksdb/include/rocksdb/c_h_854_1)&quot; is not a valid Ident'
</code></pre>
<p>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.</p>
<p><code>cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.polar/networks/1/volumes/bitcoind/backend1 --network=regtest</code></p>
<p>Any feedback on this particular issue would be greatly appreciated as well as any tips on running Esplora on <code>regtest</code>, that ideally expand on <code>--lightmode</code>.</p>
<pre><code>OS: MacOS (Intel)
rustc: 1.72.1
cargo: 1.72.1
rustup: 1.26.0
</code></pre>

CC BY-SA 4.0
2023-12-16T12:54:15.063Z
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.
Nicholas Sandomeno
CC BY-SA 4.0
2023-12-18T14:51:35.267Z
For what it's worth https://github.com/mempool/electrs is a maintained fork which serves the same purpose.
Antoine Poinsot
CC BY-SA 4.0
2023-12-18T16:21:25.357Z
Its worth a lot! Thank you for responding @AntoinePoinsot
Nicholas Sandomeno
<compiling><electrum-server><esplora>
Local Esplora Not Compiling on Clean `new-index` Branch
Nicholas Sandomeno
# Local Esplora Not Compiling on Clean `new-index` Branch

(Asked by: username_0 on 2023-12-15)

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

**Tags:** compiling, electrum-server, esplora

> **Comments:**
> **username_0**: 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.  
> **username_1**: For what it's worth https://github.com/mempool/electrs is a maintained fork which serves the same purpose.  
> **username_0**: Its worth a lot! Thank you for responding @AntoinePoinsot  

---

## 1 answers

### Answer by username_0 on 2023-12-18. Score: 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](https://github.com/Blockstream/electrs/commit/d048abae88da77a1138dcea51b5226a3cfb2c7dd).

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.


---

