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

Upgrade librocksdb/bindgen for compatibility with Clang15 (XCode 15) #65

Closed
wants to merge 2 commits into from

Conversation

Nsandomeno
Copy link

I was unable to compile a clean copy of new-index due to pre-existing dependencies on my machine 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'

I then noticed some other comments/issues around this error message related to an incompatibility with Clang 15 and Rust bindgen (<=0.62). With some tinkering and upgrading rocksdb to 0.21.0 I'm able to compile and use this in Regtest, but I'm curious if this could be a stub for a larger dependency upgrade that I'd be happy to contribute to.

The goal was to use electrs with a local bitcoind Regtest node, derived from Polar (Docker), which works following this change... here are some details of my setup to reproduce the original issue:

OS: MacOS (Intel)
rustc: 1.72.1
cargo: 1.72.1
rustup: 1.26.0

@ovitrif
Copy link

ovitrif commented Dec 22, 2023

Thanks a lot @Nsandomeno 🙇🏻‍♂️!

I was able to compile new-index after checking out on your PR gp pr checkout 65 🎉

My env:

OS: MacOS (M1) (arm64)
rustc: 1.74.1
cargo: 1.74.1
rustup: 1.26.0
# command: cargo build --release

@Nsandomeno
Copy link
Author

Nsandomeno commented Dec 22, 2023 via email

@ovitrif
Copy link

ovitrif commented Dec 24, 2023

Glad it helped! I was pointed to https://github.com/mempool/electrs by someone on a Bitcoin Stack Exchange that is a maintained version (unfortunately after this little change). It has a similar fix.

Thank you bro, you're too kind 🤗 . Lovely to meet such friendly folks in my early bitcoin dev journey 👍🏻

Was able to build the mempool/electrs project, will take it for a spin and most prolly I'll use it as my main electrs daemon 🎉

@souvikhaldar
Copy link

Glad it helped! I was pointed to https://github.com/mempool/electrs by someone on a Bitcoin Stack Exchange that is a maintained version (unfortunately after this little change). It has a similar fix.

Thank you bro, you're too kind 🤗 . Lovely to meet such friendly folks in my early bitcoin dev journey 👍🏻

Was able to build the mempool/electrs project, will take it for a spin and most prolly I'll use it as my main electrs daemon 🎉

@ovitrif So which electrs implementation you went with and how has your experience been?
I'm constantly facing "Too many open files" issue.

@ovitrif
Copy link

ovitrif commented Feb 12, 2024

@souvikhaldar I'm still using this one for the moment, though not working often enough with it to experience the Too many open files issue

@storopoli storopoli mentioned this pull request Feb 13, 2024
8 tasks
@shesek
Copy link
Collaborator

shesek commented Feb 13, 2024

Hi @Nsandomeno, thanks for the contribution! I did this in a slightly different way as part of #67, closing this. Cheers :)

@shesek shesek closed this Feb 13, 2024
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

Successfully merging this pull request may close these issues.

4 participants