some error failed to run custom build command for `librocksdb-sys v6.11.4`
Asked Answered
R

7

13

I tried to create my first substrate chain. Create Your First Substrate Chain

But I got some error while compiling substrate.

failed to run custom build command for librocksdb-sys v6.11.4

Does anybody know how to fix this problem?

Replay answered 11/3, 2021 at 13:40 Comment(2)
Are you on Apple M1? If, so there are currently issues with building rocksdb there. See here an approach: vikiival.medium.com/run-substrate-on-apple-m1-a2699743fae8Showbread
This needs more clarity. What are your dependencies, platform, and more specifically what is the full output of the build error?Misplace
A
22

You need to install additional library:

sudo apt install clang should help.

Ayeshaayin answered 1/4, 2021 at 13:20 Comment(2)
I have old mac and brew require os version 10.16 while I have 10.14 any solutions for me pleaseHardball
The solution works for Linux based OS, I do not know issues with old mac so not able to help.Ayeshaayin
S
7
sudo apt-get update
sudo apt install make clang pkg-config libssl-dev

This should do the trick. Reference: https://github.com/paritytech/polkadot/issues/65

Sopher answered 18/3, 2022 at 14:28 Comment(1)
Thanks ! That did the trick for a project I'm working on, in the Solana ecosystem !Elsi
A
1

From @apopiak

Are you on Apple M1? If, so there are currently issues with building rocksdb there. See here an approach: vikiival.medium.com/run-substrate-on-apple-m1-a2699743fae8

Also others have reported needing to:

You need clone the rust-rocksdb repo and checkout the commit listed here: https://github.com/substrate-developer-hub/substrate-node-template/issues/122 then you can create a config.toml file in your .cargo folder in your home directory and add a path to that cloned repo

Audie answered 11/3, 2021 at 20:24 Comment(0)
E
1

You had better update cargo to the nightly version and then try it. If it keep in stuck error try comment commands, you may will need to study link.

#rustup component add --toolchain=nightly rust-src rustfmt

rustup target add wasm32-unknown-unknown

#apt-get install llvm clang linux-headers-"$(uname -r)" #

apt install llvm clang
cargo build --release

#cargo fix --allow-dirty #cargo fix --edition

 #lsb_release -a
   No LSB modules are available.
   Distributor ID:  Ubuntu
   Description: Ubuntu 20.04.3 LTS
   Release: 20.04
   Codename:    focal
 #ldconfig --version
   ldconfig (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
 #cargo --version
   cargo 1.60.0-nightly (25fcb13 2022-02-01)
 #rustc --version
   rustc 1.60.0-nightly (f624427f8 2022-02-06)
 #rustup show
   Default host: x86_64-unknown-linux-gnu
   rustup home:  /root/.rustup
   installed targets for active toolchain
 --------------------------------------
 wasm32-unknown-unknown
 x86_64-unknown-linux-gnu
 active toolchain
 ----------------
 nightly-x86_64-unknown-linux-gnu (default)
 rustc 1.60.0-nightly (f624427f8 2022-02-06)

#ArmanRiazi.blockchain#Substrate#Dr.GavinWood For details: Walk-Through/Substrate/NodeSetup

Evangelineevangelism answered 7/2, 2022 at 11:58 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Sanferd
S
0

You need to update the to this version: "6.20.3" checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d"

am running on M1!

Stogner answered 17/2, 2022 at 11:19 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Sanferd
This works for me as well, running on macOS. Just updated Cargo.lock file and everything started working perfectly!Spiritualism
A
0

For me, on intel (x86_64-apple-darwin) MacOS, fix was in uninstalling brew installed llvm.

brew uninstall llvm

and using one installed from Apple's Command line tools.

Agc answered 24/3, 2023 at 21:47 Comment(0)
B
0

So for me what works was:

sudo apt-get update
sudo apt-get install g++

I tried several things but, after downloading g++ on Ubuntu running WSL2 worked for me and I was able to build and run frontier and run with the following commands:

git clone https://github.com/paritytech/frontier/
cd frontier
cargo build --release
./target/debug/frontier-template-node --dev

And to see the blockchain explorer I used this link https://polkadot.js.org/apps/#?rpc=ws://127.0.0.1:9944

Brogle answered 28/7, 2023 at 23:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.