Description
Please check the protocolbuffers/protobuf#9184 for the background. For one of my projects, I am doing a very simple operation with protoc to generate header files. Encountered an issue as mentioned below:
$ protoc --cpp_out=. -I/usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1 -I/usr/share/gocode/src/github.com/gogo/protobuf/protobuf/ -I/usr/share/gocode/src/github.com/gogo/protobuf/ /usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1/containers.proto
[libprotobuf FATAL ./google/protobuf/compiler/cpp/cpp_file.h:175] CHECK failed: !options_.opensource_runtime:
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: !options_.opensource_runtime:
Aborted (core dumped)
protoc is failing with CHECK failed error. I have no clue about the error.
Logged a bug in protobuf community (protocolbuffers/protobuf#9184) and was told that the issue was due to using weak imports in containers.proto file. Check protocolbuffers/protobuf#9184 (comment)
I am logging this issue to request to get rid of weak imports in containerd project.
Steps to reproduce the issue
- Install latest protoc. I have used v3.14.0
- Run $ protoc --cpp_out=. -I/usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1 -I/usr/share/gocode/src/github.com/gogo/protobuf/protobuf/ -I/usr/share/gocode/src/github.com/gogo/protobuf/ /usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1/containers.proto
Describe the results you received and expected
The protoc should be successful and the necessary headers should be properly generated. Instead, protoc command failed.
What version of containerd are you using?
latest version
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Description
Please check the protocolbuffers/protobuf#9184 for the background. For one of my projects, I am doing a very simple operation with protoc to generate header files. Encountered an issue as mentioned below:
$ protoc --cpp_out=. -I/usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1 -I/usr/share/gocode/src/github.com/gogo/protobuf/protobuf/ -I/usr/share/gocode/src/github.com/gogo/protobuf/ /usr/share/gocode/src/github.com/containerd/containerd/api/services/containers/v1/containers.proto
[libprotobuf FATAL ./google/protobuf/compiler/cpp/cpp_file.h:175] CHECK failed: !options_.opensource_runtime:
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: !options_.opensource_runtime:
Aborted (core dumped)
protoc is failing with CHECK failed error. I have no clue about the error.
Logged a bug in protobuf community (protocolbuffers/protobuf#9184) and was told that the issue was due to using weak imports in containers.proto file. Check protocolbuffers/protobuf#9184 (comment)
I am logging this issue to request to get rid of weak imports in containerd project.
Steps to reproduce the issue
Describe the results you received and expected
The protoc should be successful and the necessary headers should be properly generated. Instead, protoc command failed.
What version of containerd are you using?
latest version
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response