We are trying to implement a Protocol Buffers format (ONNX) importer for a C++ runtime. Our runtime will be used by frontend applications, which also use the Protocol Buffers models.
When trying to execute a process which runs both frontend and backend components, we are seeing errors indicating that a symbol name conflicts with the existing symbol
.
[libprotobuf ERROR google/protobuf/descriptor_database.cc:109] Symbol name "onnx.AttributeProto" conflicts with the existing symbol "onnx.AttributeProto".
[libprotobuf FATAL google/protobuf/descriptor.cc:1164] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
Aborted (core dumped)
Is there any way to have two components (application and shared object) statically linked PB message handling code and register the same Protobuf symbols in one process? Is there a way to tell the other component not to re-register the PB messages?