openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
6.79k stars 2.16k forks source link

libinference_engine.so: undefined symbol when run project in Qt5.6.1. #1389

Closed Ludwig-Zh closed 4 years ago

Ludwig-Zh commented 4 years ago

Hi, Recently I try to run my project in qt5.6.1 with OPENVINO, but have received this error: "symbol lookup error: /opt/intel/openvino_2020.3.194/deployment_tools/inference_engine/lib/intel64/libinference_engine.so: undefined symbol: _ZN3tbb8internal13numa_topology4fillEPi" This is my develop enviroment: Ubuntu 18.04 Qt5.6.1 OpenVINO2020.3 This is .pro file in my project:

INCLUDEPATH += /opt/intel/openvino/opencv/include \ /opt/intel/openvino/opencv/include/opencv2

LIBS += /opt/intel/openvino/opencv/lib/libopencv_highgui.so \ /opt/intel/openvino/opencv/lib/libopencv_core.so \ /opt/intel/openvino/opencv/lib/libopencv_imgproc.so \ /opt/intel/openvino/opencv/lib/libopencv_imgcodecs.so \

INCLUDEPATH += /opt/intel/openvino/inference_engine/include \ /opt/intel/openvino/inference_engine/include/cpp \ /opt/intel/openvino/deployment_tools/ngraph/include \ /opt/intel/openvino/deployment_tools/ngraph/include/ngraph \ /opt/intel/openvino/inference_engine/external/tbb/include \

DEPENDPATH += /opt/intel/openvino/inference_engine/lib/intel64/ \ /opt/intel/openvino/deployment_tools/ngraph/lib/ \ /opt/intel/openvino/inference_engine/external/tbb/lib/ \

LIBS += /opt/intel/openvino/inference_engine/lib/intel64/libinference_engine.so \ /opt/intel/openvino/inference_engine/lib/intel64 /libinference_engine_transformations.so \ /opt/intel/openvino/inference_engine/lib/intel64/libinference_engine_legacy.so \ /opt/intel/openvino/inference_engine/lib/intel64/libMKLDNNPlugin.so \ /opt/intel/openvino/inference_engine/lib/intel64/libinference_engine_lp_transformations.so \ /opt/intel/openvino/deployment_tools/ngraph/lib/libngraph.so \ /opt/intel/openvino/inference_engine/external/tbb/lib/libtbb.so.2 \

Could anyone give some advise? Thx a lot.

ilya-lavrenov commented 4 years ago

@Ludwig-Zh looks like you have different version of TBB on your system and Inference Engine tries to use it, while Inference Engine needs custom version of TBB which is distributed in OpenVINO package. Please, make sure that correct version of TBB is used.

Ludwig-Zh commented 4 years ago

@Ludwig-Zh looks like you have different version of TBB on your system and Inference Engine tries to use it, while Inference Engine needs custom version of TBB which is distributed in OpenVINO package. Please, make sure that correct version of TBB is used.

Yes,I confirm this problem.QT use libtbb.so.2 in usr/lib/x86_64-linux-gnu/ rather than openVINO version.when I run my project in terminal with environment setup correctly,it works well. But I don't know how to deal with this issue when debugging in QT?Need more help yet.

Thanks @ilya-lavrenov

ilya-lavrenov commented 4 years ago

But I don't know how to deal with this issue when debugging in QT?Need more help yet.

What is the issue with debugging?

Ludwig-Zh commented 4 years ago

What is the issue with debugging? I guess the issue is how to set the openVINO environment for QT? Because "#source /opt/intel/openvino/bin/setupvars.sh" in .bashrc only work for terminal.

Ludwig-Zh commented 4 years ago

I have solved this issue, share here: In Qt start script "qtcreator.sh", add a line "source /opt/intel/openvino/bin/setupvars.sh", then we can debug by Qt IDE with openVINO enviroments. Note: must change the first line in qtcreator.sh( "#! /bin/sh"==>"#! /bin/bash"), couse th e SOURECE command only work in bash.