Ubuntu 14.04, x86_64 using:
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=ON -DINSTALL_PYTHON_EXAMPLES=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DWITH_V4L=ON -DWITH_OPENGL=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENEXR=ON -DBUILD_JPEG=ON ..
make -j$(getconf _NPROCESSORS_ONLN)
fails with:
Linking CXX executable ../../bin/opencv_test_flann
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::initialize(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task::note_affinity(unsigned short)'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::handle_perror(int, char const*)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::is_group_execution_cancelled() const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::terminate()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `typeinfo for tbb::task'
../../lib/libopencv_core.so.3.0.0: undefined reference to `vtable for tbb::task'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_root_with_context_proxy::free(tbb::task&) const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::init()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::default_num_threads()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::get_initial_auto_partitioner_divisor()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned long)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::~task_group_context()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_test_flann] Error 1
make[1]: *** [modules/flann/CMakeFiles/opencv_test_flann.dir/all] Error 2
If I disable TBB build makes it 100%.