No rule to make target 'TBB_ENV_LIB_DEBUG-NOTFOUND', needed by 'lib/libopencv_core.so.3.2.0

asked 2017-01-31 06:35:35 -0500

lovaj gravatar image

I'm trying to build opencv with the following CMAKE options:

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 ..

Notice that in RELEASE mode OpenCV is correctly compiled with all the other options. However, at 43% it returns this error:

[ 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

I think that this is Intel TBB related, but I've installed it (in fact it works with the RELEASE version and I don't know how to solve this.

edit retag flag offensive close merge delete

Comments

1

Did you run tbbvars.sh before cmake? Looks like not.

You can also use OpenCV's own TBB by adding cmake option -DBUILD_TBB=ON.

By the way, WITH_OPENMP and WITH_TBB are mutually exclusive options, you have to pick only one.

Finally, after adding/removing external libraries, you have to do a clean build (remove all files from build directory). Otherwise any strange errors can occur.

mshabunin gravatar imagemshabunin ( 2017-01-31 08:13:04 -0500 )edit

Lookin in OpenCVDetectTBB.cmake I found find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug" PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH so it seems that cmake is looking for a library called tbb_debug which I don't know how to find or if it's actually installed

lovaj gravatar imagelovaj ( 2017-01-31 08:37:51 -0500 )edit
1

No, I didn't run tbbvars.sh. From my understanding is used when building TBB from src, while I installed with apt-get

lovaj gravatar imagelovaj ( 2017-01-31 08:41:02 -0500 )edit

Since I want to try to improve the SURF code using openmp instead of TBB, I will just turn off TBB

lovaj gravatar imagelovaj ( 2017-01-31 08:43:24 -0500 )edit