Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.2 includes libmirprotobuf and protobuf 2.6 which is conflicting with protobuf 3.1

Hello,

I have some issues with installing OpenCV with contrib modules from sources codes and Protobuf libraries.

I have a program, that needs Protobuf 3.1. and OpenCV 3.2 with contrib modules. After compiling and installing both from sources, the program itself compiles and linked well. When executing the program, I get the following error:

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 2.6.0 of the Protocol Buffer runtime library, but the installed version is 3.2.0. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.

Looking into the linked libraries, I found out that Opencv linked

  • libmir* libraries (which are using protobuf) with
  • Protobuf 2.6 (libprotobuf-lite.so.9 in usr/lib/x86_64-linux-gnu/)

while my Protobuf 3.1 is in /usr/local/ Also opencv uses libprotobuf 3.1. when building DNN parts etc.

~$ ldd /usr/local/bin/opencv* | grep libproto* 
libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9

ldd /usr/local/bin/opencv* | grep libmir*
libmirclient.so.9 => /usr/lib/x86_64-linux-gnu/libmirclient.so.9 (0x00007f1d59b4c000)
libmircommon.so.5 => /usr/lib/x86_64-linux-gnu/libmircommon.so.5 (0x00007f1d56d5f000)
libmirprotobuf.so.3 => /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3 (0x00007f1d56afe000)
  • What is libmir* (libmirclient9 or libmirclient-dev or libmircommon5 etc. are installed via apt apparently) and what is it used for / by?
  • Which part / library / module of Opencv 3 uses libprotobuf 2.6 and libmir? * How can I configure a build of Opencv 3 not using any libmir* or protobuf 2.6 library (or which links to it)

Thank you very much for your effort.

BR Florian

OpenCV 3.2 includes libmirprotobuf and protobuf 2.6 which is conflicting with protobuf 3.1

Hello,

I have some issues with installing OpenCV with contrib modules from sources codes and Protobuf libraries.

I have a program, that needs Protobuf 3.1. and OpenCV 3.2 with contrib modules. After compiling and installing both from sources, the program itself compiles and linked well. When executing the program, I get the following error:

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] google/protobuf/stubs/common.cc:78] This program requires version 2.6.0 was compiled against version 2.6.1 of the Protocol Buffer runtime library, but which is not compatible with the installed version is 3.2.0. Please update your library. (3.1.0). 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.library. (Version verification failed in "/build/mir-pkdHET/mir-0.21.0+16.04.20160330/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".) terminate called after throwing an instance of 'google::protobuf::FatalException' what(): This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.1.0). 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 "/build/mir-pkdHET/mir-0.21.0+16.04.20160330/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)

Checking the linked libraries of my software, I see that protobuf was included in 2.6. (so.9) and 3.1 (so.11) as well as libmir*.so

ldd localization | grep protobuf*
libprotobuf.so.11 => /usr/local/lib/libprotobuf.so.11 (0x00007f1797df8000)
libmirprotobuf.so.3 => /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3 (0x00007f178a751000)
libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9 (0x00007f178a31b000)

Looking into the linked libraries, I found out that the included Opencv linked

  • libmir* libraries (which are using protobuf) with
  • Protobuf 2.6 (libprotobuf-lite.so.9 in usr/lib/x86_64-linux-gnu/)

while my Protobuf 3.1 is in /usr/local/ Also opencv uses libprotobuf 3.1. when building DNN parts etc.

~$ ldd /usr/local/bin/opencv* | grep libproto* 
libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9

ldd /usr/local/bin/opencv* | grep libmir*
libmirclient.so.9 => /usr/lib/x86_64-linux-gnu/libmirclient.so.9 (0x00007f1d59b4c000)
libmircommon.so.5 => /usr/lib/x86_64-linux-gnu/libmircommon.so.5 (0x00007f1d56d5f000)
libmirprotobuf.so.3 => /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3 (0x00007f1d56afe000)
  • What is libmir* (libmirclient9 or libmirclient-dev or libmircommon5 etc. are installed via apt apparently) and what is it used for / by?
  • Which part / library / module of Opencv 3 uses libprotobuf 2.6 and libmir? * How can I configure a build of Opencv 3 not using any libmir* or protobuf 2.6 library (or which links to it)
  • any other way to exclude protobuf 2.6 from my program

Thank you very much for your effort.

BR Florian