Skip to content

Possibility to change protobuf version #4026

Description

Is your feature request related to a problem? Please describe.

I faced with a conflict between different protobuf version (probably this is problem of linker on android)

[libprotobuf FATAL /Users/camobap/.conan/data/onnxruntime/1.2.0/alpr/local/build/f502a074061dd809bc2f0d02202f07e31b204b22/onnxruntime/cmake/external/protobuf/src/google/protobuf/stubs/common.cc:87] This program was compiled against version 3.0.0 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.11.3).  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 "out/soong/.intermediates/frameworks/av/drm/libmediadrm/libmediadrm/android_x86_64_shared_core/gen/proto/frameworks/av/drm/libmediadrm/protos/plugin_metrics.pb.cc".)terminating with uncaught exception of type google::protobuf::FatalException: This program was compiled against version 3.0.0 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.11.3).  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 "out/soong/.intermediates/frameworks/av/drm/libmediadrm/libmediadrm/android_x86_64_shared_core/gen/proto/frameworks/av/drm/libmediadrm/protos/plugin_metrics.pb.cc".)

I cannot chance protobuf version of libmediadrm because this is system library.

So it will be nice to have a possibility to change version protobuf library.

Are there some requirements for the minimal protobuf version?

System information

  • ONNX Runtime version (you are using): 1.2.0

Describe the solution you'd like

It will be nice to have some options on build.[sh|bat] or CMakeLists.txt

./build.sh --protobuf_prefix ... or ./build.sh --protobuf_version ... or

Describe alternatives you've considered

A possible workaround is to use dlopen, but it doesn't quite fit my needshttps://stackoverflow.com/questions/52203862/building-an-android-executable-grpc-server-that-uses-protocol-buffers-without-a

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions