<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 3.4.2</li>
<li>Operating System / Platform =&gt; Ubuntu 16.04</li>
<li>Compiler =&gt; CMAKE</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Hello I tried to reinstalling my opencv with TBB support, but when I tried to install it, there is error in the video_stab when I tried to run -make j8 in the command. The reason why I re install because I need TBB support in my code. Is there anyone has same problem with me and solved this problem? Thank you</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">cmake -D CMAKE_BUILD_TYPE=RELEASE <br>
-D CMAKE_INSTALL_PREFIX=/usr/local <br>
-D INSTALL_PYTHON_EXAMPLES=ON <br>
-D INSTALL_C_EXAMPLES=OFF <br>
-D WITH_CUDA=ON <br>
-D ENABLE_FAST_MATH=1 <br>
-D CUDA_FAST_MATH=1 <br>
-D WITH_CUBLAS=1 <br>
-D OPENCV_EXTRA_MODULES_PATH="/home/ee401_2/opencv_install/opencv_contrib-3.4.2/modules" <br>
-D BUILD_EXAMPLES=ON <br>
-D WITH_TBB=ON <br>
-D BUILD_opencv_xfeatures2d=ON ..</p>
<p dir="auto">make -j8</p>
<h4 dir="auto">Error</h4>
<p dir="auto">[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_generalized_hough.dir/generalized_hough.cpp.o<br>
[ 89%] Built target opencv_perf_superres<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_hog<br>
Scanning dependencies of target example_gpu_cascadeclassifier<br>
[ 89%] Built target example_gpu_stereo_match<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_cascadeclassifier.dir/cascadeclassifier.cpp.o<br>
Scanning dependencies of target example_gpu_super_resolution<br>
[ 89%] Built target opencv_test_superres<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_super_resolution.dir/super_resolution.cpp.o<br>
Scanning dependencies of target example_gpu_multi<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_multi.dir/multi.cpp.o<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_opticalflow_nvidia_api<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_generalized_hough<br>
[ 89%] Built target example_gpu_hog<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_stereo_multi<br>
Scanning dependencies of target example_gpu_video_writer<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_video_writer.dir/video_writer.cpp.o<br>
[ 89%] Built target example_gpu_opticalflow_nvidia_api<br>
Scanning dependencies of target example_gpu_morphology<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_video_writer<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_morphology.dir/morphology.cpp.o<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_super_resolution<br>
[ 89%] Built target example_gpu_generalized_hough<br>
Scanning dependencies of target example_gpu_bgfg_segm<br>
[ 89%] Built target example_gpu_stereo_multi<br>
[ 89%] Built target example_gpu_video_writer<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_bgfg_segm.dir/bgfg_segm.cpp.o<br>
Scanning dependencies of target example_gpu_pyrlk_optical_flow<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_multi<br>
[ 89%] Building CXX object samples/gpu/CMakeFiles/example_gpu_pyrlk_optical_flow.dir/pyrlk_optical_flow.cpp.o<br>
/usr/bin/ld: CMakeFiles/example_gpu_multi.dir/multi.cpp.o: undefined reference to symbol '_ZN3tbb18task_group_contextD1Ev'<br>
//usr/lib/x86_64-linux-gnu/libtbb.so.2: error adding symbols: DSO missing from command line<br>
collect2: error: ld returned 1 exit status<br>
samples/gpu/CMakeFiles/example_gpu_multi.dir/build.make:122: recipe for target 'bin/example_gpu_multi' failed<br>
make[2]: *** [bin/example_gpu_multi] Error 1<br>
CMakeFiles/Makefile2:48496: recipe for target 'samples/gpu/CMakeFiles/example_gpu_multi.dir/all' failed<br>
make[1]: *** [samples/gpu/CMakeFiles/example_gpu_multi.dir/all] Error 2<br>
make[1]: *** Waiting for unfinished jobs....<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_cascadeclassifier<br>
[ 89%] Built target example_gpu_super_resolution<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_morphology<br>
[ 89%] Built target example_gpu_cascadeclassifier<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_bgfg_segm<br>
[ 89%] Built target example_gpu_morphology<br>
[ 89%] Linking CXX executable ../../bin/example_gpu_pyrlk_optical_flow<br>
[ 89%] Built target example_gpu_bgfg_segm<br>
[ 89%] Built target example_gpu_pyrlk_optical_flow<br>
Scanning dependencies of target opencv_videostab<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/deblurring.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/frame_source.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/fast_marching.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/global_motion.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/wobble_suppression.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/motion_stabilizing.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/outlier_rejection.cpp.o<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/optical_flow.cpp.o<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because <code class="notranslate">OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because </code>OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because <code class="notranslate">OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because </code>OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because <code class="notranslate">OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because </code>OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because <code class="notranslate">OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because </code>OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/stabilizer.cpp.o<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because <code class="notranslate">OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch] [ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/log.cpp.o cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because </code>OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
[ 89%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab.dir/src/inpainting.cpp.o<br>
cc1plus: warning: /home/ee401_2/opencv_install/opencv-3.4.2/build2/modules/videostab/precomp.hpp.gch/opencv_videostab_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]<br>
[ 89%] Linking CXX shared library ../../lib/libopencv_videostab.so<br>
[ 89%] Built target opencv_videostab<br>
Makefile:160: recipe for target 'all' failed<br>
make: *** [all] Error 2</p>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 3.4</li>
<li>Operating System / Platform =&gt; Linux Ubuntu 16.04 64 bit</li>
<li>Compiler =&gt; GCC version 5.4.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">While installing  OpenCV 3.4 (using GCC 5.4.0, cuda 8, nvidia driver 378.1), the make command fails fails with the following errors:</p>
<p dir="auto">[ 87%] Linking CXX executable ../../bin/example_gpu_multi<br>
/usr/bin/ld: CMakeFiles/example_gpu_multi.dir/multi.cpp.o: undefined reference to symbol '_ZN3tbb18task_group_contextD1Ev'<br>
//usr/lib/x86_64-linux-gnu/libtbb.so.2: error adding symbols: DSO missing from command line<br>
collect2: error: ld returned 1 exit status<br>
samples/gpu/CMakeFiles/example_gpu_multi.dir/build.make:124: recipe for target 'bin/example_gpu_multi' failed<br>
make[2]: *** [bin/example_gpu_multi] Error 1<br>
CMakeFiles/Makefile2:48855: recipe for target 'samples/gpu/CMakeFiles/example_gpu_multi.dir/all' failed<br>
make[1]: *** [samples/gpu/CMakeFiles/example_gpu_multi.dir/all] Error 2<br>
make[1]: *** Waiting for unfinished jobs....<br>
[ 87%] Linking CXX executable ../../bin/opencv_perf_superres</p>
<p dir="auto">I am using cuda8 because that is what is required for the application I am installing</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev


cd ~/&lt;my_working_directory&gt;
sudo apt-get update
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git

cd ~/opencv
mkdir build
cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv3 -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules -D BUILD_EXAMPLES=ON -D BUILD_opencv_python2=OFF -D WITH_FFMPEG=1 -D WITH_CUDA=1 -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_IPP=ON -D PYTHON3_EXECUTABLE=/home/taylor/anaconda3/bin/python -D PYTHON3_INCLUDE_PATH=/home/taylor/anaconda3/include/python3.6m -D PYTHON3_LIBRARY=/home/taylor/anaconda3/lib/python3.6/site-packages -D CMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs ..

make -j8 -l8"><pre class="notranslate"><code class="notranslate">sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev


cd ~/&lt;my_working_directory&gt;
sudo apt-get update
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git

cd ~/opencv
mkdir build
cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv3 -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules -D BUILD_EXAMPLES=ON -D BUILD_opencv_python2=OFF -D WITH_FFMPEG=1 -D WITH_CUDA=1 -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_IPP=ON -D PYTHON3_EXECUTABLE=/home/taylor/anaconda3/bin/python -D PYTHON3_INCLUDE_PATH=/home/taylor/anaconda3/include/python3.6m -D PYTHON3_LIBRARY=/home/taylor/anaconda3/lib/python3.6/site-packages -D CMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs ..

make -j8 -l8
</code></pre></div>