error in build OpenCv in CentOS with v4l library

asked 2015-05-07 11:03:45 -0600

nvlinh gravatar image

updated 2015-05-07 20:02:08 -0600

Hey all, I'm using CentOS 5.9 and trying to build OpenCv 2.4.10 for video processing. I got the error:

../../lib/libopencv_highgui.so.2.4.10: undefined reference to `cvCreateCameraCapture_V4L(int)'

This is the log of make command:

[  7%] Built target IlmImf
[  7%] Built target opencv_core_pch_dephelp
[  7%] Built target pch_Generate_opencv_core
[ 10%] Built target opencv_core
[ 10%] Built target opencv_ts_pch_dephelp
[ 10%] Built target pch_Generate_opencv_ts
[ 10%] Built target opencv_flann_pch_dephelp
[ 11%] Built target pch_Generate_opencv_flann
[ 12%] Built target opencv_flann
[ 12%] Built target opencv_imgproc_pch_dephelp
[ 12%] Built target pch_Generate_opencv_imgproc
[ 17%] Built target opencv_imgproc
[ 17%] Built target opencv_highgui_pch_dephelp
[ 17%] Built target pch_Generate_opencv_highgui
[ 19%] Built target opencv_highgui
[ 19%] Built target opencv_features2d_pch_dephelp
[ 19%] Built target pch_Generate_opencv_features2d
[ 21%] Built target opencv_features2d
[ 22%] Built target opencv_video_pch_dephelp
[ 22%] Built target pch_Generate_opencv_video
[ 23%] Built target opencv_video
[ 24%] Built target opencv_ts
[ 24%] Built target opencv_perf_core_pch_dephelp
[ 25%] Built target pch_Generate_opencv_perf_core
Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_highgui.so.2.4.10: undefined reference to `cvCreateCameraCapture_V4L(int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

And this is the log of cmake with v4l on option:

-- Detected version of GNU GCC: 44 (404)
-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "2.6.6")
-- 
-- General configuration for OpenCV 2.4.10 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 2.6.32-504.8.1.el6.x86_64 x86_64
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.4.7)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread ...
(more)
edit retag flag offensive close merge delete