Tomasz Waszczyk
Tomasz Waszczyk

Reputation: 3169

Failed to run custom build command for `librocksdb-sys

Does anybody know what should I install to fulfill librocksdb-sys dependency? I was trying to solve it with apt install clang but does not solve the issue. My best guess is that it is some error connected with linking and/or versioning.

Appreciate any hints.

error: failed to run custom build command for librocksdb-sys v0.8.0+7.4.4

Caused by: process didn't exit successfully: /home/tomek/ssd/workspaces/substrate/target/release/build/librocksdb-sys-dcab8f317e6498cb/build-script-build (exit status: 101) --- stderr thread 'main' panicked at '"enum_(unnamed_at_rocksdb/include/rocksdb/c_h_981_1)" is not a valid Ident', /home/tomek/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.46/src/fallback.rs:756:9 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...

The error occurs on Debian.

Upvotes: 1

Views: 1932

Answers (1)

HudsonGraeme
HudsonGraeme

Reputation: 515

I ran into this error on M1 and was able to solve it by downgrading to clang 14 as suggested by @kevindong on GitHub

brew install llvm@14
export PATH="/opt/homebrew/opt/llvm@14/bin:$PATH" 
clang --version # Should return 14
#... Your command here

See: https://github.com/rust-rocksdb/rust-rocksdb/issues/768#issuecomment-1767143727

Related Substrate question: https://substrate.stackexchange.com/questions/6088/unable-to-compile-substrate-template-error-failed-to-run-custom-build-command

Upvotes: 1

Related Questions