Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions third_party/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_LIBDIR=lib"
if [[ ${cmake_options} =~ USE_CAFFE=ON || ${cmake_options} =~ USE_ONNX=ON || ${cmake_options} =~ USE_FLOW=ON ]]; then
PROTOC_ROOT=${work_dir}/protoc
protobuf_version="3.14.0"
protobuf_cmake_options=""
if [[ ${target} =~ linux-aarch64 ]]; then
protobuf_version="3.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when using linux-aarch64 run on android phone, we find that protobuf only 3.1.0 can work, we encounter error when using 3.14.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when using linux-aarch64 run on android phone, we find that protobuf only 3.1.0 can work, we encounter error when using 3.14.

else
protobuf_cmake_options="-DWITH_PROTOC=${PROTOC_ROOT}/bin/protoc -Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
fi
protobuf_cmake_options="-DWITH_PROTOC=${PROTOC_ROOT}/bin/protoc -Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
# download prebuilt protoc
if [ ! -f "${PROTOC_ROOT}/bin/protoc" ]; then
echo "[INFO] build protoc in ${PROTOC_ROOT}..."
Expand All @@ -113,6 +108,9 @@ if [[ ${cmake_options} =~ USE_CAFFE=ON || ${cmake_options} =~ USE_ONNX=ON || ${c
if [[ ${host} =~ macos-x86_64 ]] ; then
protoc_platform="osx-x86_64"
fi
if [[ ${host} =~ linux-aarch64 ]] ; then
protoc_platform="linux-aarch_64"
fi
if [ ! -f "${script_dir}/sources/protoc-${protobuf_version}-${protoc_platform}.zip" ]; then
echo "${script_dir}/sources/protoc-${protobuf_version}-${protoc_platform}.zip"
wget --no-check-certificate https://github.com/protocolbuffers/protobuf/releases/download/v${protobuf_version}/protoc-${protobuf_version}-${protoc_platform}.zip > ${log_file} || exit 1
Expand Down