Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Conflict with protobuf versions

Subtle
Employee
922 Views

Hi,

 

I am using  CNNNetwork ReadNetwork(const std::string& model, const Blob::CPtr& weights) function for loading models from memory.
My code looks like:

//vector<uint8_t> model (.xml)

//vector<uint8_t>weights (.bin)

//for creating TensorDesc

InferenceEngine::TensorDesc tensor(InferenceEngine::Precision::U8,{weights.size()}, InferenceEngine::Layout::C);

//For creating Blob

InferenceEngine::TBlob<uint8_t>::Ptr wei_blob = InferenceEngine::make_shared_blob<uint8_t>(tensor,&weights[0],vec_s);

here vec_s is of type size_t

//calling readnetwork 

InferenceEngine::CNNNetwork network =  IeCoreSingleton::Instance().ReadNetwork(strModel,wei_blob);

 

When i am running my code, it is throwing error as below:

[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/stubs/common.cc:86] This program was compiled against version 3.7.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.9.2).  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 "/home/jenkins/agent/workspace/private-ci/ie/build-linux-ubuntu20/b/build/dldt/_deps/ext_onnx-build/onnx/onnx_ngraph_onnx-ml.pb.cc".)

terminate called after throwing an instance of 'google::protobuf::FatalException'

  what():  This program was compiled against version 3.7.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.9.2).  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 "/home/jenkins/agent/workspace/private-ci/ie/build-linux-ubuntu20/b/build/dldt/_deps/ext_onnx-build/onnx/onnx_ngraph_onnx-ml.pb.cc".)

Aborted (core dumped)

 

To solve this error i tried few methods from internet to change the protobuf version including this,

Downloaded the 3.7.1 tarball from https://github.com/protocolbuffers/protobuf/releases

cd protobuf-3.7.1

./configure 

make

make check

sudo make install

cd ./python

python3 setup.py build 

python3 setup.py test

sudo python3 setup.py install 

But It is not resolved. For reference I am using OpenVINO 2021.4 version and OS is Ubuntu 20.04 LTS.

What should i do to resolve this error.

 

Thanks a lot 

 

 

 

0 Kudos
1 Solution
Zulkifli_Intel
Moderator
891 Views

Hello Subtle

Thank you for reaching out.

 

The required protobuf version is 3.15.6 as stated in requirements.txt. You can install the specific version using the steps below:

 

  1. Download the protobuf release here:
    1. https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protobuf-all-3.15.6.tar.gz
  2. Unzip the folder
  3. Enter the folder and run ./autogen.sh && ./configure && make
  4. Then run these commands:

make check

sudo make install


Please share with us whether this protobuf version working with your system or not.  


Sincerely,

Zulkifli 


View solution in original post

3 Replies
Zulkifli_Intel
Moderator
892 Views

Hello Subtle

Thank you for reaching out.

 

The required protobuf version is 3.15.6 as stated in requirements.txt. You can install the specific version using the steps below:

 

  1. Download the protobuf release here:
    1. https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protobuf-all-3.15.6.tar.gz
  2. Unzip the folder
  3. Enter the folder and run ./autogen.sh && ./configure && make
  4. Then run these commands:

make check

sudo make install


Please share with us whether this protobuf version working with your system or not.  


Sincerely,

Zulkifli 


Subtle
Employee
882 Views

Hi Zulkifli_intel,

 

Thanks for replying.

The issue have been resolved. This conflict was there because of libprotobuf.so.3.7.1.0 file in /opt/intel/openvino_2021/deployment_tools/ngraph/lib folder of openvino installation directory.  I downloaded the protobuf version 3.9.2 and installed on my system. After this i replaced the libprotobuf.so.3.7.1.0 file by libprotobuf.so from ~/protobuf-3.9.2/src/.libs  in /opt/intel/openvino_2021/deployment_tools/ngraph/lib folder. Initialized the OpenVINO environment and my code was working.

I can see libprotobuf.so -> libprotobuf.so.20.0.2 inside ~/protobuf-3.9.2/src/.libs that's why i am able to run my code.

 

Thank you

Subtle 

 

 

0 Kudos
Zulkifli_Intel
Moderator
863 Views

Hi Subtle,


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question. 


Sincerely,

Zulkifli


0 Kudos
Reply