[Makefile:21: build-rust] Error 101

Hi guys, is there a solution for [Makefile:21: build-rust] Error 101 ?

error: failed to run custom build command for nockapp-grpc-proto v0.1.0 (/home/user/nockchain/crates/nockapp-grpc-proto)
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: /home/user/nockchain/target/release/build/nockapp-grpc-proto-6ff5cd5ca08c0304/build-script-build (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=proto/nockchain/common/v1/blockchain.proto
  cargo:rerun-if-changed=proto/nockchain/common/v1/pagination.proto
  cargo:rerun-if-changed=proto/nockchain/common/v1/primitives.proto
  cargo:rerun-if-changed=proto/nockchain/monitoring/v1/monitoring.proto
  cargo:rerun-if-changed=proto/nockchain/private/v1/nockapp.proto
  cargo:rerun-if-changed=proto/nockchain/public/v1/nockchain.proto

  --- stderr
  cargo:rerun-if-changed=proto/nockchain/common/v1/blockchain.proto
  cargo:rerun-if-changed=proto/nockchain/common/v1/pagination.proto
  cargo:rerun-if-changed=proto/nockchain/common/v1/primitives.proto
  cargo:rerun-if-changed=proto/nockchain/monitoring/v1/monitoring.proto
  cargo:rerun-if-changed=proto/nockchain/private/v1/nockapp.proto
  cargo:rerun-if-changed=proto/nockchain/public/v1/nockchain.proto
  Error: Custom { kind: Other, error: "protoc failed: nockchain/common/v1/blockchain.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.\n" }
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:21: build-rust] Error 101

Which command and what OS?

Getting this error too.

$ make install-nockchain-wallet

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

1 Like

I got around this by just uninstalling the ubuntu protobuf-compiler and installing protobuf release directly from their github

PROTOC_VERSION=33.0
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip

# Extract to /usr/local
sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local bin/protoc
sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local 'include/*'

sudo chmod +x /usr/local/bin/protoc

and I got further, we’ll see if there’s a problem later.

1 Like