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