From 0d822c13fe8ec14a401ee58c23830bebca98d682 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 13 Jan 2016 13:29:39 -0800 Subject: [PATCH] Added proto3 installation as part of check_nanopb --- tools/distrib/check_nanopb_output.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index d1d829d09d2..1fd190d506b 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -45,15 +45,31 @@ pip install protobuf==3.0.0b2 # change to root directory cd $(dirname $0)/../.. +# install protoc version 3 +pushd third_party/protobuf +apt-get install -y autoconf automake libtool curl +./autogen.sh +./configure +make +sudo make install +sudo ldconfig +popd + +if [ ! -x "/usr/local/bin/protoc" ]; then + echo "Error: protoc not found in path" + exit 1 +fi +readonly PROTOC_PATH='/usr/local/bin' # stack up and change to nanopb's proto generator directory pushd third_party/nanopb/generator/proto -make +PATH="$PROTOC_PATH:$PATH" make # back to the root directory popd + # nanopb-compile the proto to a temp location -./tools/codegen/core/gen_load_balancing_proto.sh \ +PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_load_balancing_proto.sh \ src/proto/grpc/lb/v0/load_balancer.proto \ $NANOPB_TMP_OUTPUT