Update protobuf to the latest version (#7396)

This commit is contained in:
Changming Sun 2021-04-21 10:30:06 -07:00 committed by GitHub
parent 243713c464
commit b4cfa88bf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 20 deletions

View file

@ -158,6 +158,16 @@
"comments": "git submodule at cmake/external/date"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "e1e11e0d555c08bec08a6c7773aa777dfcaae9da",
"repositoryUrl": "https://github.com/dmlc/dlpack.git"
},
"comments": "git submodule at cmake/external/dlpack"
}
},
{
"component": {
"type": "git",
@ -168,6 +178,16 @@
"comments": "git submodule at cmake/external/eigen"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "8b32b7def837a15e766039501630549149d3db41",
"repositoryUrl": "https://github.com/emscripten-core/emsdk.git"
},
"comments": "git submodule at cmake/external/emsdk"
}
},
{
"component": {
"type": "git",
@ -332,7 +352,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "498de9f761bef56a032815ee44b6e6dbe0892cc4",
"commitHash": "436bd7880e458532901c58f4d9d1ea23fa7edd52",
"repositoryUrl": "https://github.com/protocolbuffers/protobuf.git"
},
"comments": "git submodule at cmake/external/protobuf"
@ -447,16 +467,6 @@
},
"comments": "git submodule at server/external/spdlog"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "e1e11e0d555c08bec08a6c7773aa777dfcaae9da",
"repositoryUrl": "https://github.com/dmlc/dlpack.git"
},
"comments": "git submodule at cmake/external/dlpack"
}
}
]
}

@ -1 +1 @@
Subproject commit 498de9f761bef56a032815ee44b6e6dbe0892cc4
Subproject commit 436bd7880e458532901c58f4d9d1ea23fa7edd52

View file

@ -23,7 +23,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.11.3" />
<PackageReference Include="Google.Protobuf" Version="3.15.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />

View file

@ -62,7 +62,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Targets" Version="2.1.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2" />
<PackageReference Include="Google.Protobuf" Version="3.11.3" />
<PackageReference Include="Google.Protobuf" Version="3.15.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />

View file

@ -788,8 +788,8 @@ stages:
sudo rm -rf /mnt/toolchains
sudo mkdir /mnt/toolchains
sudo tar -Jxf $(Build.BinariesDirectory)/toolchains.tar.xz -C /mnt/toolchains
aria2c -q https://github.com/protocolbuffers/protobuf/releases/download/v3.11.1/protoc-3.11.1-linux-x86_64.zip
unzip protoc-3.11.1-linux-x86_64.zip
aria2c -q https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
unzip protoc-3.15.8-linux-x86_64.zip
sudo cp /mnt/toolchains/manylinux2014_aarch64/usr/include/stdlib.h /mnt/toolchains/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/
#The PYTHON_EXECUTABLE cmake variable is only used for generating ONNX's protobuf definition file.(Invoking the onnx/gen_proto.py file in ONNX's source folder)
cmake \

View file

@ -34,9 +34,9 @@ function GetFile {
return $?
}
GetFile https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz /tmp/src/v3.13.0.tar.gz
tar -xf /tmp/src/v3.13.0.tar.gz -C /tmp/src
cd /tmp/src/protobuf-3.13.0
GetFile https://github.com/protocolbuffers/protobuf/archive/v3.15.8.tar.gz /tmp/src/v3.15.8.tar.gz
tar -xf /tmp/src/v3.15.8.tar.gz -C /tmp/src
cd /tmp/src/protobuf-3.15.8
cmake ./cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo
make -j$(getconf _NPROCESSORS_ONLN)
make install

View file

@ -42,7 +42,7 @@ rm -rf /tmp/googletest
echo "Installing protobuf from source"
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git checkout v3.11.2
git checkout v3.15.8
mkdir b
cd b
cmake ../cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug