未验证 提交 9b61170b 编写于 作者: E Enwei Jiao 提交者: GitHub

Fix compile proto failed (#20820)

Signed-off-by: NEnwei Jiao <enwei.jiao@zilliz.com>
Signed-off-by: NEnwei Jiao <enwei.jiao@zilliz.com>
上级 170bbde0
......@@ -48,7 +48,7 @@ cppcheck:
@(env bash ${PWD}/scripts/core_build.sh -l)
# put generate proto as a separated target because build cpp have different cases like with unittest.
generated-proto-go-without-cpp: export protoc:=${PWD}/cmake_build/thirdparty/protobuf/protobuf-build/protoc
generated-proto-go-without-cpp: export protoc:=${PWD}/cmake_build/bin/protoc
generated-proto-go-without-cpp:
@mkdir -p ${GOPATH}/bin
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && cd /tmp && go install github.com/golang/protobuf/protoc-gen-go@v1.3.2)
......
......@@ -27,6 +27,7 @@ aws-sdk-cpp:transfer=False
gtest:build_gmock=False
[imports]
bin, * -> ../bin
lib, *.dylib -> ../lib
lib, *.dll -> ../lib
lib, *.so* -> ../lib
......@@ -19,7 +19,6 @@
SCRIPTS_DIR=$(dirname "$0")
PROTO_DIR=$SCRIPTS_DIR/../internal/proto/
GOOGLE_PROTO_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty/protobuf/protobuf-src/src/
API_PROTO_DIR=$SCRIPTS_DIR/../cmake_build/thirdparty/milvus-proto/proto/
PROGRAM=$(basename "$0")
......@@ -31,7 +30,6 @@ if [ -z $GOPATH ]; then
fi
export PATH=${GOPATH}/bin:$PATH
echo `which protoc-gen-go`
# official go code ship with the crate, so we need to generate it manually.
pushd ${PROTO_DIR}
......@@ -52,30 +50,7 @@ mkdir -p planpb
mkdir -p ../../cmd/tools/migration/legacy/legacypb
#${protoc} --proto_path="${GOOGLE_PROTO_DIR}" --proto_path=. \
# --go_opt="Mmilvus.proto=github.com/milvus-io/milvus/api/milvuspb;milvuspb" \
# --go_opt=Mcommon.proto=github.com/milvus-io/milvus/api/commonpb \
# --go_opt=Mschema.proto=github.com/milvus-io/milvus/api/schemapb \
# --go_out=plugins=grpc,paths=source_relative:./../../api/milvuspb milvus.proto
#
#${protoc} --proto_path="${GOOGLE_PROTO_DIR}" --proto_path=. \
# --go_opt=Mmilvus.proto=github.com/milvus-io/milvus/api/milvuspb \
# --go_opt=Mcommon.proto=github.com/milvus-io/milvus/api/commonpb \
# --go_opt="Mschema.proto=github.com/milvus-io/milvus/api/schemapb;schemapb" \
# --go_out=plugins=grpc,paths=source_relative:./../../api/schemapb schema.proto
#
#${protoc} --proto_path="${GOOGLE_PROTO_DIR}" --proto_path=. \
# --go_opt=Mmilvus.proto=github.com/milvus-io/milvus/api/milvuspb \
# --go_opt="Mcommon.proto=github.com/milvus-io/milvus/api/commonpb;commonpb" \
# --go_opt=Mschema.proto=github.com/milvus-io/milvus/api/schemapb \
# --go_out=plugins=grpc,paths=source_relative:./../../api/commonpb common.proto
#protoc_opt="${protoc} --proto_path=${GOOGLE_PROTO_DIR} --proto_path=${API_PROTO_DIR} --proto_path=.
# --go_opt=Mmilvus.proto=github.com/milvus-io/milvus/api/milvuspb
# --go_opt=Mcommon.proto=github.com/milvus-io/milvus/api/commonpb
# --go_opt=Mschema.proto=github.com/milvus-io/milvus/api/schemapb"
protoc_opt="${protoc} --proto_path=${GOOGLE_PROTO_DIR} --proto_path=${API_PROTO_DIR} --proto_path=."
protoc_opt="${protoc} --proto_path=${API_PROTO_DIR} --proto_path=."
${protoc_opt} --go_out=plugins=grpc,paths=source_relative:./etcdpb etcd_meta.proto
${protoc_opt} --go_out=plugins=grpc,paths=source_relative:./indexcgopb index_cgo_msg.proto
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册