没有规则可以使目标' TBB_ENV_LIB_DEBUG-NOTFOUND'需要' lib / libopencv_core.so.3.2.0

时间:2017-01-31 12:34:41

标签: c++ opencv debugging cmake tbb

我尝试使用以下CMAKE选项构建opencv:

cmake -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_INSTALL_PREFIX=/home/luca/Dropbox/SURFSPM/opencvInstall -D OPENCV_EXTRA_MODULES_PATH=/home/luca/ParallelOpenCV/opencv_contrib/modules -D WITH_TBB=ON -D WITH_OPENMP=ON -D ENABLE_PROFILING=ON ..

请注意,在RELEASE模式下,OpenCV正确编译了所有其他选项。但是,在43%时它会返回此错误:

[ 42%] Built target pch_Generate_opencv_perf_optflow
[ 42%] Built target pch_Generate_opencv_test_optflow
[ 43%] Generating precomp.hpp.gch/opencv_structured_light_DEBUG.gch
Scanning dependencies of target opencv_core
[ 43%] Built target pch_Generate_opencv_test_phase_unwrapping
make[2]: *** No rule to make target 'TBB_ENV_LIB_DEBUG-NOTFOUND', needed by 'lib/libopencv_core.so.3.2.0'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 43%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
cc1plus: warning: /home/luca/ParallelOpenCV/opencv/build/modules/core/precomp.hpp.gch/opencv_core_Release.gch: created with -gnone, but used with -gdwarf-2
[ 43%] Built target pch_Generate_opencv_test_stitching
[ 43%] Built target pch_Generate_opencv_phase_unwrapping
[ 43%] Built target pch_Generate_opencv_test_structured_light
[ 43%] Built target pch_Generate_opencv_perf_stitching
[ 43%] Built target pch_Generate_opencv_stitching
[ 43%] Built target pch_Generate_opencv_structured_light
CMakeFiles/Makefile2:2161: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

我认为这与英特尔TBB有关,但我已安装它(事实上它适用于RELEASE版本,我不知道如何解决这个问题。

1 个答案:

答案 0 :(得分:1)

就像@ Tsyvarev的评论提示一样,配置阶段确实无法获取调试库版本。

我已成功设置原始设置:

TBB_ENV_LIB_DEBUG:FILEPATH=TBB_ENV_LIB_DEBUG-NOTFOUND

TBB_ENV_LIB:FILEPATH

的值相同
//Path to a library.
TBB_ENV_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libtbb.so

//Path to a library.
TBB_ENV_LIB_DEBUG:FILEPATH=/usr/lib/x86_64-linux-gnu/libtbb.so