Diem: [Bug] Ubuntu 18.04.2, start_cli_testnet.sh could not compile

Created on 19 Jun 2019  路  3Comments  路  Source: diem/diem

馃悰 Bug

start_cli_testnet.sh could not compile

To reproduce

* Code snippet to reproduce *

 git clone https://github.com/libra/libra.git
 cd libra
 ./scripts/dev_setup.sh
 ./scripts/cli/start_cli_testnet.sh

* Stack trace/error message *

   :
   :
   Compiling toml v0.4.10
   Compiling parity-multihash v0.1.2
   Compiling network v0.1.0 (/home/hoge/libra/network)
   Compiling futures-executor-preview v0.3.0-alpha.16
   Compiling rust_decimal v1.0.1
   Compiling x25519-dalek v0.5.2
   Compiling tokio-tcp v0.1.3
   Compiling tokio-udp v0.1.3
   Compiling tokio-uds v0.2.5
   Compiling slog-scope v4.1.1
   Compiling crossbeam v0.4.1
   Compiling proptest_helpers v0.1.0 (/home/hoge/libra/common/proptest_helpers)
   Compiling failure v0.1.5
   Compiling parity-multiaddr v0.4.1
error: failed to run custom build command for `network v0.1.0 (/home/hoge/libra/network)`

Caused by:
  process didn't exit successfully: `/home/hoge/libra/target/debug/build/network-3bce66de4ba49a2b/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=src/proto/network.proto
cargo:rerun-if-changed=src/proto/mempool.proto
cargo:rerun-if-changed=src/proto/consensus.proto

--- stderr
google/protobuf/wrappers.proto: File not found.
transaction.proto: Import "google/protobuf/wrappers.proto" was not found or had errors.
transaction.proto:160:5: "google.protobuf.UInt64Value" is not defined.
mempool.proto: Import "transaction.proto" was not found or had errors.
mempool.proto:17:12: "types.SignedTransaction" is not defined.
thread 'main' panicked at 'protoc: Custom { kind: Other, error: StringError("protoc (\"protoc\" \"-I../types/src/proto\" \"-Isrc/proto\" \"--descriptor_set_out=/tmp/protoc-rustMmYccW/descriptor.pbbin\" \"--include_imports\" \"src/proto/network.proto\" \"src/proto/mempool.proto\" \"src/proto/consensus.proto\") exited with non-zero exit code") }', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

Expected Behavior

i could not compile

System information

Please complete the following information:

  • rustup 1.18.3 (435397f48 2019-05-22)
  • Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-52-generic x86_64)
bug

Most helpful comment

Thank you. I was able to compile. I installed protoc as follows

PROTOC_ZIP=protoc-3.8.0-linux-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.8.0/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local include/*
rm -f $PROTOC_ZIP

All 3 comments

First, make sure you have installed protoc(v3.6.0+) properly.
If still failed, please refer to this PR90

Thank you. I was able to compile. I installed protoc as follows

PROTOC_ZIP=protoc-3.8.0-linux-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.8.0/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local include/*
rm -f $PROTOC_ZIP

We pushed some fixes that should resolve this. If this doesn't please tag me and I'll follow up.

Was this page helpful?
0 / 5 - 0 ratings