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

[electrs] Build fails due to librocksdb-sys build command #469

Open
tnull opened this issue Oct 23, 2023 · 2 comments
Open

[electrs] Build fails due to librocksdb-sys build command #469

tnull opened this issue Oct 23, 2023 · 2 comments

Comments

@tnull
Copy link

tnull commented Oct 23, 2023

Unfortunately building Blockstream/electrs currently fails due to:

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

Caused by:
  process didn't exit successfully: `/home/ero/workspace/electrs/target/debug/build/librocksdb-sys-fe4c5565d1d2e4df/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/ero/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/lib.rs:2144:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Tested on macOS and Linux with a number of different Rust versions.

@tnull
Copy link
Author

tnull commented Nov 3, 2023

Now seeing:

Caused by:
  process didn't exit successfully: `/Users/ero/workspace/electrs/target/release/build/librocksdb-sys-9dfb302ce483f2f2/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /Users/ero/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.37/src/fallback.rs:701:9:
  "enum_(unnamed_at_rocksdb/include/rocksdb/c_h_854_1)" is not a valid Ident
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
     1: core::panicking::panic_fmt
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
     2: proc_macro2::fallback::validate_ident
     3: proc_macro2::fallback::Ident::_new
     4: proc_macro2::fallback::Ident::new
     5: proc_macro2::imp::Ident::new
     6: proc_macro2::Ident::new
     7: bindgen::ir::context::BindgenContext::rust_ident_raw
     8: bindgen::ir::context::BindgenContext::rust_ident
     9: <bindgen::ir::enum_ty::Enum as bindgen::codegen::CodeGenerator>::codegen
    10: <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen
    11: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
    12: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}
    13: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen
    14: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
    15: bindgen::codegen::codegen::{{closure}}
    16: bindgen::ir::context::BindgenContext::gen
    17: bindgen::codegen::codegen
    18: bindgen::Bindings::generate
    19: bindgen::Builder::generate
    20: build_script_build::bindgen_rocksdb
    21: build_script_build::main
    22: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This seems to be rust-rocksdb/rust-rocksdb#713.

As it seems to have been fixed for a while, updating the rocksdb dependency might do the trick.

@phonglnDEV
Copy link

Are you running on Docker?

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

2 participants