Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have multiple versions of protobuf? #15288

Closed
josh-wende opened this issue Jan 30, 2024 · 1 comment
Closed

Is it possible to have multiple versions of protobuf? #15288

josh-wende opened this issue Jan 30, 2024 · 1 comment
Labels
Module: Build Indicates build related issues

Comments

@josh-wende
Copy link

Hi,

I am trying to bring in an external library that requires an older version of protobuf than the one already in apollo. As such, I have been trying to get apollo to contain two different versions of protobuf, with the older one only used for this new build target. I got bazel building this version of protobuf (3.6.1) inside of the apollo container, and then I made that a dependency of the new code that uses the external library.

But when I try to run it, I get this error:

This program was compiled against version 3.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.19.6).  Contact the program author for an update.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)
Aborted (core dumped)

Is there a correct way to do this that I'm missing? I'd really appreciate any insight.

@josh-wende
Copy link
Author

I had a mistake in my BUILD files. As long as I keep the dependencies completely separate, it seems to work.

@daohu527 daohu527 added the Module: Build Indicates build related issues label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Build Indicates build related issues
Projects
None yet
Development

No branches or pull requests

2 participants