Re: [protobuf] proto versioning - preventing linking at runtime to a proto version different than at buildtime

2016-06-22 Thread 'Adam Cozzette' via Protocol Buffers
Ah, I see. In that case I think you're right that it would be best to put the symbols in separate namespaces for client and server. The protocol compiler does not have any special support for this, but you could accomplish it by having two .proto files which are identical except that one says

Re: [protobuf] proto versioning - preventing linking at runtime to a proto version different than at buildtime

2016-06-22 Thread Steve Beckert
Thanks for the reply. Unfortunately sharing compiled proto symbols between Client and Server is not an option for me as Client and Server are independently deployable and bump their proto version independently. It sounds like putting the proto symbols in a unique namespace per component would

Re: [protobuf] proto versioning - preventing linking at runtime to a proto version different than at buildtime

2016-06-22 Thread 'Adam Cozzette' via Protocol Buffers
I sounds to me like this symbol duplication is causing a C++ ODR (one-definition rule) violation, which could explain the crashes you have seen. I would try moving the compiled proto symbols into a separate library and have both the client and server libs depend on that same library so that there

[protobuf] proto versioning - preventing linking at runtime to a proto version different than at buildtime

2016-06-21 Thread Steve Beckert
System 1 process with 2 components - a client and a server Both Client and Server make use of a Model.proto Client and Server are built with different versions of Model.proto Build Server generates .h and .cc files at buildtime and compiles them into libServer.so. Sever's use of the proto is