I'm trying to compile a local Substrate node and receive the following :
caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release
Compiling librocksdb-sys v0.8.0+7.4.4
Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)
error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`
Caused by:
process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)
--- stdout
Running: "/usr/bin/protoc" "--include_imports" "--include_source_info" "-o" "/tmp/prost-build2QKUaS/prost-descriptor-set" "-I" "src/schema" "bitswap.v1.2.0.proto"
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: bitswap.v1.2.0.proto: No such file or directory\n" }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm
warning: : [tag_type] "+r"(tag_type), "=@ccz"(is_literal));
warning: ^
warning: 1 error generated.
error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`
I tried to install clang (as metioned here). Do you have any suggestions ?
As suggested by @AurevoirXavier I installed g++. It seems that it was already installed but the error message evolved:
caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release
Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)
Compiling kvdb-rocksdb v0.16.0
error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`
Caused by:
process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)
--- stdout
Running: "/usr/bin/protoc" "--include_imports" "--include_source_info" "-o" "/tmp/prost-build3AYt6r/prost-descriptor-set" "-I" "src/schema" "bitswap.v1.2.0.proto"
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: bitswap.v1.2.0.proto: No such file or directory\n" }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Rust toolchain:
caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/caladay/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
active toolchain
----------------
stable-x86_64-unknown-linux-gnu (default)
rustc 1.65.0 (897e37553 2022-11-02)