我正在尝试从源代码构建 OpenCV 3.4.3,并且我正在创建一个用于我的 Python 代码的库。我看到以下错误:
import vision_library
ImportError: dlopen(/home/ssk/pyVision/python_scripts/vision_library.so, 2): Symbol not found: ___itt_api_version_ptr__3_0
Referenced from: /home/ssk/pyVision/python_scripts/vision_library.so
Expected in: flat namespace
这是 CMAKE 构建命令:
# Set Build Variables
PYTHON2_EXECUTABLE='/usr/local/Frameworks/Python.framework/Versions/2.7/bin/python2.7'
PYTHON2_INCLUDE_DIR='/usr/local/Frameworks/Python.framework/Versions/2.7/include/python2.7'
PYTHON2_LIBRARY='/usr/local/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' # TODO - Fix for linux
PYTHON2_NUMPY_INCLUDE_DIRS='/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include' # Todo - Fix for linux
cd $OPENCV_DIR
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$OPENCV_INSTALL_PATH \
-D WITH_CUDA=OFF \
-D WITH_IPP=OFF \
-D WITH_CLP:BOOL=ON \
-D BUILD_opencv_python2:BOOL=ON \
-D PYTHON2_EXECUTABLE=$PYTHON2_EXECUTABLE \
-D PYTHON2_INCLUDE_DIR=$PYTHON2_INCLUDE_DIR \
-D PYTHON2_LIBRARY=$PYTHON2_LIBRARY \
-D PYTHON2_NUMPY_INCLUDE_DIRS=$PYTHON2_NUMPY_INCLUDE_DIRS \
-D INSTALL_PYTHON_EXAMPLES:BOOL=ON \
-D BUILD_SHARED_LIBS=OFF \
..
make -j8
make install
如何禁用 ITT?我不需要它。
可以在上面的 cmake 中禁用 ITT:
-D WITH_ITT=OFF \
我是一名优秀的程序员,十分优秀!