asprecic / mediapipe-qt-integration-example

Example Qt application that demonstrates how to integrate Mediapipe
MIT License
48 stars 5 forks source link

Libopencv_core.so.3.2 not found #2

Closed IamRo45 closed 2 years ago

IamRo45 commented 2 years ago

`/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /home/rohit/mywork/mediapipe-qt-integration-example/example-lib/lib/libexample.so, not found (try using -rpath or -rpath-link) ` I am facing this error after running qmake MediapipeExample.pro and make. I have opencv installed (version 4.2). Seems like with apt install libopencv-core-dev opencv 4.2 gets installed but why is libopencv_core.so.3.2 is needed?

asprecic commented 2 years ago

If you built mediapipe using their provided docker, it uses version 3.2 it seems, and hence you need that version. If you built it on your own machine, and already had 4.2 installed, then probably it compiled its own version 3.2 and used that, maybe you can find it somewhere in bazel-bin. I believe mediapipe builds opencv itself, and it most likely uses version 3.2, so in any case you will need the version it used, regardless of the reason. On my Ubuntu 18.04, apt install libopencv-core-dev installs version 3.2, perhaps you're on a newer Ubuntu? I see that Ubuntu has packages for version 3.2 so you can probably just apt install that. In any case, you can copy the .so files from the docker to your machine, just like you copied libexample.so, and place it in the same directory as libexample.so and it should work.

IamRo45 commented 2 years ago

yes I was using ununtu 20.04 earlier, it had opencv 4.2 installed and I built libexample.so in mediapipe's Docker, so it used opencv 3.2. The problem gets resolved in ubuntu 18.04.