Repository: opencv
Issue: OpenCV protobuf error with CUDA8RC
Labels: bug,category: build/install,category: gpu/cuda (contrib)

With all the dependencies installed, I'm getting the following error while installing OpenCV in ubuntu 16.04:

```
[ 64%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_video_pos.cpp.o
[ 64%] Building CXX object modules/superres/CMakeFiles/opencv_test_superres.dir/test/test_main.cpp.o
[ 64%] Building CXX object modules/superres/CMakeFiles/opencv_perf_superres.dir/perf/perf_main.cpp.o
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::string*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::Message::GetTypeName() const'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::New()'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
modules/dnn/CMakeFiles/opencv_test_dnn.dir/build.make:260: recipe for target 'bin/opencv_test_dnn' failed
make[2]: *** [bin/opencv_test_dnn] Error 1
CMakeFiles/Makefile2:4905: recipe for target 'modules/dnn/CMakeFiles/opencv_test_dnn.dir/all' failed
make[1]: *** [modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 64%] Building CXX object modules/superres/CMakeFiles/opencv_perf_superres.dir/perf/perf_superres.cpp.o
[ 64%] Building CXX object modules/superres/CMakeFiles/opencv_test_superres.dir/test/test_superres.cpp.o
[ 64%] Building CXX object modules/highgui/CMakeFiles/opencv_test_highgui.dir/test/test_gui.cpp.o
[ 64%] Building CXX object modules/fuzzy/CMakeFiles/opencv_test_fuzzy.dir/test/test_image.cpp.o
[ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/test_cascadeandhog.cpp.o
[ 65%] Building CXX object modules/videoio/CMakeFiles/opencv_perf_videoio.dir/perf/perf_output.cpp.o
[ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_hogdetect.cpp.o
[ 65%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_main.cpp.o
[ 65%] Linking CXX executable ../../bin/opencv_perf_imgcodecs
[ 65%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_test_imgcodecs.dir/test/test_drawing.cpp.o
[ 65%] Building CXX object modules/highgui/CMakeFiles/opencv_test_highgui.dir/opencv_test_highgui_automoc.cpp.o
[ 65%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_test_imgcodecs.dir/test/test_grfmt.cpp.o
[ 65%] Linking CXX executable ../../bin/opencv_test_highgui
[ 65%] Built target opencv_perf_imgcodecs
[ 65%] Building CXX object modules/shape/CMakeFiles/opencv_test_shape.dir/test/test_main.cpp.o
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_positioning.cpp.o
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_video_io.cpp.o
[ 67%] Building CXX object modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o
[ 67%] Built target opencv_test_highgui
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_ffmpeg.cpp.o
[ 67%] Linking CXX executable ../../bin/opencv_test_fuzzy
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_framecount.cpp.o
[ 67%] Built target opencv_test_fuzzy
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_fourcc.cpp.o
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_basic_props.cpp.o
[ 67%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/opencl/test_hogdetector.cpp.o
[ 67%] Linking CXX executable ../../bin/opencv_test_superres
[ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_perf_videoio.dir/perf/perf_input.cpp.o
[ 67%] Linking CXX executable ../../bin/opencv_perf_superres
[ 67%] Linking CXX executable ../../bin/opencv_test_shape
[ 67%] Linking CXX executable ../../bin/opencv_test_videoio
[ 67%] Built target opencv_perf_superres
[ 67%] Built target opencv_test_superres
[ 67%] Built target opencv_test_shape
[ 67%] Built target opencv_test_videoio
[ 67%] Linking CXX executable ../../bin/opencv_perf_objdetect
[ 67%] Built target opencv_perf_objdetect
[ 67%] Linking CXX executable ../../bin/opencv_perf_videoio
[ 67%] Linking CXX executable ../../bin/opencv_test_objdetect
[ 67%] Built target opencv_perf_videoio
[ 67%] Built target opencv_test_objdetect
[ 67%] Linking CXX executable ../../bin/opencv_test_imgcodecs
[ 67%] Built target opencv_test_imgcodecs
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
```