paritytech / substrate-contracts-node

Minimal Substrate node configured for smart contracts via pallet-contracts.
The Unlicense
124 stars 145 forks source link

Update documentation to indicate `protobuf` is mandatory for compilation #161

Closed wottpal closed 1 year ago

wottpal commented 1 year ago

gm, i wasn't able to successfully finish the installation via build w/o installing protobuf even though i exactly followed the instructions (https://docs.substrate.io/install/macos/) and had rosetta installed (i'm on a M1).

it always errored like:

error: failed to run custom build command for `libp2p-core v0.37.0`

Caused by:
  process didn't exit successfully: `/var/folders/gl/1gmng5zd4gl3mstxpsd9l71m0000gn/T/cargo-installjPBE9j/release/build/libp2p-core-a12914c49310c3fc/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.You could try running `brew install protobuf` or downloading it from https://github.com/protocolbuffers/protobuf/releases

  For more information: https://docs.rs/prost-build/#sourcing-protoc
  ', /Users/wottpal/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.2/src/lib.rs:1295:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `contracts-node v0.22.1 (https://github.com/paritytech/substrate-contracts-node.git#75efc0b8)`, intermediate artifacts can be found at `/var/folders/gl/1gmng5zd4gl3mstxpsd9l71m0000gn/T/cargo-installjPBE9j`

after running brew install protobuf the compilation ran though nicely.


system: macOS 13.0.1 chip: apple silicon (M1) rustc: 1.65.0 (897e37553 2022-11-02) cargo: 1.65.0 (4bc8f24d3 2022-10-20) rustup: 1.25.1 (bb60b1e89 2022-07-12)

athei commented 1 year ago

This is a substrate dependency (libp2p to be exact). The official install docs need to be updated and we need to fix the broken link. No need to repeat those steps here.

wottpal commented 1 year ago

Thanks for mentioning, @athei. In which repository should I create an issue then? https://github.com/substrate-developer-hub/substrate-docs?

athei commented 1 year ago

Yeah. Install instructions need to be updated: Rosetta is not longer needed : Instead, brew install protobuf needs to be run.

wottpal commented 1 year ago

Documentation was updated via https://github.com/substrate-developer-hub/substrate-docs/issues/1627.