Skip to content

upgrade protobuf to 3.20.2 and onnx to 1.13 - #14279

Merged
snnn merged 33 commits into
mainfrom
zhanyi/updateprotobuf
Jan 31, 2023
Merged

upgrade protobuf to 3.20.2 and onnx to 1.13#14279
snnn merged 33 commits into
mainfrom
zhanyi/updateprotobuf

Conversation

@mszhanyi

@mszhanyi mszhanyi commented Jan 13, 2023

Copy link
Copy Markdown
Contributor

Description

upgrade protobuf to 3.20.2, same as onnx 1.13.0

Motivation and Context

Per component governance requirement and Fixes #14060

unused-parameter error occurs in 2 conditions.

  1. compile protolbuf
    onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
  2. include onnx_pb.h
2023-01-28T10:20:15.0410853Z FAILED: CMakeFiles/onnxruntime_pybind11_state.dir/onnxruntime_src/onnxruntime/python/onnxruntime_pybind_iobinding.cc.o 
......
2023-01-28T10:20:15.0466024Z                  from /build/Debug/_deps/onnx-src/onnx/onnx_pb.h:51,
2023-01-28T10:20:15.0466958Z                  from /onnxruntime_src/include/onnxruntime/core/framework/to_tensor_proto_element_type.h:10,
....
2023-01-28T10:20:15.0609678Z /build/Debug/_deps/onnx-build/onnx/onnx-operators-ml.pb.h:1178:25:   required from here
2023-01-28T10:20:15.0610895Z /onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
2023-01-28T10:20:15.0611707Z cc1plus: all warnings being treated as errors

https://dev.azure.com/onnxruntime/2a773b67-e88b-4c7f-9fc0-87d31fea8ef2/_apis/build/builds/874605/logs/22

@mszhanyi

mszhanyi commented Jan 13, 2023

Copy link
Copy Markdown
Contributor Author

@snnn, how did you get the sha1. I calculated locally.

@mszhanyi
mszhanyi requested review from edgchen1 and snnn January 13, 2023 04:06
@mszhanyi
mszhanyi force-pushed the zhanyi/updateprotobuf branch from 0f2d1b3 to 79c6d37 Compare January 13, 2023 04:09
@mszhanyi
mszhanyi requested a review from a team as a code owner January 13, 2023 04:30
@mszhanyi
mszhanyi requested a review from a team January 13, 2023 07:56
@mszhanyi mszhanyi changed the title upgrade protobuf to 3.19.6 upgrade protobuf to 3.20.2 Jan 13, 2023
@mszhanyi
mszhanyi marked this pull request as draft January 13, 2023 09:48
@mszhanyi
mszhanyi force-pushed the zhanyi/updateprotobuf branch from fc494fa to b5a7f28 Compare January 13, 2023 10:02
flatbuffers
protobuf==3.18.1
packaging No newline at end of file
protobuf==3.19.6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this one different?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thx. fixed.

Comment thread cmake/deps.txt
@snnn

snnn commented Jan 15, 2023

Copy link
Copy Markdown
Contributor

@snnn, how did you get the sha1. I calculated locally.

Use "C:\Program Files\git\usr\bin\sha1sum.exe" .

@mszhanyi
mszhanyi force-pushed the zhanyi/updateprotobuf branch from 3a4c5ad to 0dd4358 Compare January 18, 2023 10:29
@mszhanyi
mszhanyi force-pushed the zhanyi/updateprotobuf branch from 508d94d to 5f11e9f Compare January 19, 2023 07:20
@mszhanyi
mszhanyi force-pushed the zhanyi/updateprotobuf branch 5 times, most recently from f860de7 to 39efc46 Compare January 28, 2023 11:57
@mszhanyi
mszhanyi requested a review from snnn January 29, 2023 00:57
@mszhanyi

mszhanyi commented Jan 31, 2023

Copy link
Copy Markdown
Contributor Author

@pranavsharma @yuslepukhin do you have any more comments?

@snnn
snnn merged commit 80f807c into main Jan 31, 2023
@snnn
snnn deleted the zhanyi/updateprotobuf branch January 31, 2023 20:55
@faxu faxu added the triage:approved Approved for cherrypicks for release label Feb 1, 2023
mszhanyi added a commit that referenced this pull request Feb 2, 2023
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
upgrade protobuf to 3.20.2, same as onnx 1.13.0

### Motivation and Context
Per component governance requirement and Fixes #14060

unused-parameter error occurs in 2 conditions.
1. compile protolbuf

`onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66:
error: unused parameter ‘prototype’ [-Werror=unused-parameter]`
2. include onnx_pb.h
```
2023-01-28T10:20:15.0410853Z FAILED: CMakeFiles/onnxruntime_pybind11_state.dir/onnxruntime_src/onnxruntime/python/onnxruntime_pybind_iobinding.cc.o 
......
2023-01-28T10:20:15.0466024Z                  from /build/Debug/_deps/onnx-src/onnx/onnx_pb.h:51,
2023-01-28T10:20:15.0466958Z                  from /onnxruntime_src/include/onnxruntime/core/framework/to_tensor_proto_element_type.h:10,
....
2023-01-28T10:20:15.0609678Z /build/Debug/_deps/onnx-build/onnx/onnx-operators-ml.pb.h:1178:25:   required from here
2023-01-28T10:20:15.0610895Z /onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
2023-01-28T10:20:15.0611707Z cc1plus: all warnings being treated as errors

```

https://dev.azure.com/onnxruntime/2a773b67-e88b-4c7f-9fc0-87d31fea8ef2/_apis/build/builds/874605/logs/22
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
upgrade protobuf to 3.20.2, same as onnx 1.13.0

### Motivation and Context
Per component governance requirement and Fixes #14060

unused-parameter error occurs in 2 conditions.
1. compile protolbuf

`onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66:
error: unused parameter ‘prototype’ [-Werror=unused-parameter]`
2. include onnx_pb.h
```
2023-01-28T10:20:15.0410853Z FAILED: CMakeFiles/onnxruntime_pybind11_state.dir/onnxruntime_src/onnxruntime/python/onnxruntime_pybind_iobinding.cc.o 
......
2023-01-28T10:20:15.0466024Z                  from /build/Debug/_deps/onnx-src/onnx/onnx_pb.h:51,
2023-01-28T10:20:15.0466958Z                  from /onnxruntime_src/include/onnxruntime/core/framework/to_tensor_proto_element_type.h:10,
....
2023-01-28T10:20:15.0609678Z /build/Debug/_deps/onnx-build/onnx/onnx-operators-ml.pb.h:1178:25:   required from here
2023-01-28T10:20:15.0610895Z /onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
2023-01-28T10:20:15.0611707Z cc1plus: all warnings being treated as errors

```

https://dev.azure.com/onnxruntime/2a773b67-e88b-4c7f-9fc0-87d31fea8ef2/_apis/build/builds/874605/logs/22
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
upgrade protobuf to 3.20.2, same as onnx 1.13.0

### Motivation and Context
Per component governance requirement and Fixes #14060

unused-parameter error occurs in 2 conditions.
1. compile protolbuf

`onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66:
error: unused parameter ‘prototype’ [-Werror=unused-parameter]`
2. include onnx_pb.h
```
2023-01-28T10:20:15.0410853Z FAILED: CMakeFiles/onnxruntime_pybind11_state.dir/onnxruntime_src/onnxruntime/python/onnxruntime_pybind_iobinding.cc.o 
......
2023-01-28T10:20:15.0466024Z                  from /build/Debug/_deps/onnx-src/onnx/onnx_pb.h:51,
2023-01-28T10:20:15.0466958Z                  from /onnxruntime_src/include/onnxruntime/core/framework/to_tensor_proto_element_type.h:10,
....
2023-01-28T10:20:15.0609678Z /build/Debug/_deps/onnx-build/onnx/onnx-operators-ml.pb.h:1178:25:   required from here
2023-01-28T10:20:15.0610895Z /onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
2023-01-28T10:20:15.0611707Z cc1plus: all warnings being treated as errors

```

https://dev.azure.com/onnxruntime/2a773b67-e88b-4c7f-9fc0-87d31fea8ef2/_apis/build/builds/874605/logs/22
rui-ren pushed a commit that referenced this pull request Feb 3, 2023
### Description
upgrade protobuf to 3.20.2, same as onnx 1.13.0

### Motivation and Context
Per component governance requirement and Fixes #14060

unused-parameter error occurs in 2 conditions.
1. compile protolbuf

`onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66:
error: unused parameter ‘prototype’ [-Werror=unused-parameter]`
2. include onnx_pb.h
```
2023-01-28T10:20:15.0410853Z FAILED: CMakeFiles/onnxruntime_pybind11_state.dir/onnxruntime_src/onnxruntime/python/onnxruntime_pybind_iobinding.cc.o 
......
2023-01-28T10:20:15.0466024Z                  from /build/Debug/_deps/onnx-src/onnx/onnx_pb.h:51,
2023-01-28T10:20:15.0466958Z                  from /onnxruntime_src/include/onnxruntime/core/framework/to_tensor_proto_element_type.h:10,
....
2023-01-28T10:20:15.0609678Z /build/Debug/_deps/onnx-build/onnx/onnx-operators-ml.pb.h:1178:25:   required from here
2023-01-28T10:20:15.0610895Z /onnxruntime_src/cmake/external/protobuf/src/google/protobuf/repeated_ptr_field.h:752:66: error: unused parameter ‘prototype’ [-Werror=unused-parameter]
2023-01-28T10:20:15.0611707Z cc1plus: all warnings being treated as errors

```

https://dev.azure.com/onnxruntime/2a773b67-e88b-4c7f-9fc0-87d31fea8ef2/_apis/build/builds/874605/logs/22
@faxu faxu removed the release:1.14 label Feb 7, 2023
@pacowong

pacowong commented Feb 9, 2023

Copy link
Copy Markdown

It would be great if the library can upgrade to the protobuf version of 3.21.3+ earlier as I encounter a bug in this version while compiling ORT.

protocolbuffers/protobuf#9947
https://stackoverflow.com/questions/73047153/protobuf-ld-undefined-symbol-internalmetadata

titaiwangms added a commit that referenced this pull request Jun 28, 2025
Delete the legacy patches related to protobuf, which was added from
#14279 and
#15878 to simplify the ONNX
patches.
ankus-qti pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Nov 25, 2025
Delete the legacy patches related to protobuf, which was added from
microsoft#14279 and
microsoft#15878 to simplify the ONNX
patches.
qti-jkilpatrick pushed a commit to onnxruntime/onnxruntime-qnn that referenced this pull request Jan 26, 2026
Delete the legacy patches related to protobuf, which was added from
microsoft/onnxruntime#14279 and
microsoft/onnxruntime#15878 to simplify the ONNX
patches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:approved Approved for cherrypicks for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is a vulnerability in protobuf:3.18.1,upgrade recommended

8 participants