Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

The output of CMAKE is:

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

The output of CMAKE is:

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

EDIT 2: I updated libv4l to the 1.6.0 version and the issue persists.

--    V4L/V4L2:                    Using libv4l (ver 1.6.0)

I can see that some headers files are missing (sys/videoio.h, libavformat/avformat.h, ffmpeg/avformat.h):

-- 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
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found

Do you think it has something to do?

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

EDIT 2: I updated libv4l to the 1.6.0 version and the issue persists.

--    V4L/V4L2:                    Using libv4l (ver 1.6.0)

I can see that some headers files are missing (sys/videoio.h, libavformat/avformat.h, ffmpeg/avformat.h):

-- 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
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found

Do you think it has something to do?

EDIT 3: I compiled opencv-3.0.0 in a fedora 21 alpha (fresh installation and inside of vbox machine). I installed these packages:

yum groupinstall 'Development Tools'  
yum groupinstall 'Development Libraries'
yum install cmake gtk2-devel python3-devel numpy python3-numpy gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-bad-nonfree gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools updates gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 x264 gstreamer-devel gstreamer-plugins-bad-free-devel gstreamer1-devel gstreamer1-plugins-bad-free-devel libtiff-devel libjpeg-devel jasper jasper-devel libdc1394-devel libv4l-devel tbb tbb-devel ffmpeg ffmpeg-devel ant sphinx

The issue persists and log shows the same error that in the "EDIT 2" of this post.

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

EDIT 2: I updated libv4l to the 1.6.0 version and the issue persists.

--    V4L/V4L2:                    Using libv4l (ver 1.6.0)

I can see that some headers files are missing (sys/videoio.h, libavformat/avformat.h, ffmpeg/avformat.h):

-- 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
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found

Do you think it has something to do?

EDIT 3: I compiled opencv-3.0.0 in a fedora 21 alpha (fresh installation and inside of vbox machine). I installed these packages:

yum groupinstall 'Development Tools'  
yum groupinstall 'Development Libraries'
yum install cmake gtk2-devel python3-devel numpy python3-numpy gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-bad-nonfree gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools updates gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 x264 gstreamer-devel gstreamer-plugins-bad-free-devel gstreamer1-devel gstreamer1-plugins-bad-free-devel libtiff-devel libjpeg-devel jasper jasper-devel libdc1394-devel libv4l-devel tbb tbb-devel ffmpeg ffmpeg-devel ant sphinx

The issue persists and log shows the same error that in the "EDIT 2" of this post.error.

build error: undefined reference to 'v4l2_munmap'

I am compiling the latest version of opencv from github under fedora 20 x86_64. A few weeks ago I built opencv-2.4.9 in the same machine so I think I have all the libraries installed properly or at least that i thought...

The cmake command that I used is:

cmake -DBUILD_SHARED_LIBS=OFF -DWITH_TBB=on -DWITH_JAVA=on ..

But in the building process I get this error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_munmap'
/usr/bin/ld: note: 'v4l2_munmap' is defined in DSO /lib64/libv4l2.so.0 so try adding it to the linker command line
/lib64/libv4l2.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_perf_videoio] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2

Does anybody know about this?

EDIT:

General configuration for opencv-3.0.0 is:

-- The CXX compiler identification is GNU 4.8.3
-- The C compiler identification is GNU 4.8.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found TIFF: /lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /lib64/libjpeg.so  
-- Found WebP: /lib64/libwebp.so  
-- Found Jasper: /lib64/libjasper.so (found version "1.900.1") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found PNG: /lib64/libpng.so (found version "1.6.6") 
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- Found OpenEXR: /lib64/libIlmImf.so
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.9
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.38.2
-- 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
-- checking for module 'gstreamer-base-0.10'
--   found gstreamer-base-0.10, version 0.10.36
-- checking for module 'gstreamer-video-0.10'
--   found gstreamer-video-0.10, version 0.10.36
-- checking for module 'gstreamer-app-0.10'
--   found gstreamer-app-0.10, version 0.10.36
-- checking for module 'gstreamer-riff-0.10'
--   found gstreamer-riff-0.10, version 0.10.36
-- checking for module 'gstreamer-pbutils-0.10'
--   found gstreamer-pbutils-0.10, version 0.10.36
-- checking for module 'libdc1394-2'
--   found libdc1394-2, version 2.2.2
-- checking for module 'libv4l1'
--   found libv4l1, version 1.0.0
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   found tbb, version 4.1.3
-- ICV: Downloading ippicv_linux_20140513.tgz...
-- ICV: Unpacking ippicv_linux_20140513.tgz to /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack...
-- ICV: Package successfully downloaded
-- found IPP (ICV version): 8.1.1 [8.1.1]
-- at: /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.5") 
-- Found PythonInterp: /home/leo/.pyenv/shims/python3.4 (found suitable version "3.4.2", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.4m.a (found suitable exact version "3.4.2") 
-- Found Sphinx 1.1.3: /usr/bin/sphinx-build
-- Found apache ant 1.9.2: /bin/ant
-- Found JNI: /usr/java/latest/jre/lib/amd64/libjawt.so  
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               3.0.0-alpha-634-g4de9605
-- 
--   Platform:
--     Host:                        Linux 3.16.6-200.fc20.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?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.3)
--     C++ flags (Release):         -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc imgcodecs videoio highgui ml features2d calib3d objdetect photo video java shape stitching superres videostab python2 python3 ts
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera cuda cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaoptflow cudastereo cudawarping cudev viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 3.x:                    YES (ver 3.10.9)
--     GThread :                    YES (ver 2.38.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0201)
--     PNG:                         /lib64/libpng.so (ver 1.6.6)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 1.7.1)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.2)
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.39.101)
--       format:                    YES (ver 55.19.104)
--       util:                      YES (ver 52.48.101)
--       swscale:                   YES (ver 2.5.101)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       riff:                      YES (ver 0.10.36)
--       pbutils:                   YES (ver 0.10.36)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l (ver 1.0.0)
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     8.1.1 [8.1.1]
--          at:                     /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use Eigen:                   YES (ver 3.2.2)
--     Use TBB:                     YES (ver 4.1 interface 6103)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.5)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.5)
--     numpy:                       /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.8.2)
--     packages path:               lib/python2.7/site-packages
-- 
--   Python 3:
--     Interpreter:                 /home/leo/.pyenv/shims/python3.4 (ver 3.4.2)
--     Libraries:                   /lib64/libpython3.4m.a (ver 3.4.2)
--     numpy:                       /home/leo/.pyenv/versions/3.4.2/lib/python3.4/site-packages/numpy/core/include (ver 1.9.0)
--     packages path:               lib/python3.4/site-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/java/latest/include /usr/java/latest/include/linux /usr/java/latest/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES
--     Sphinx:                      /usr/bin/sphinx-build (ver 1.1.3)
--     PdfLaTeX compiler:           /usr/bin/pdflatex
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/leo/Pruebas/OpenCV/opencv-git-last/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done

EDIT 2: I updated libv4l to the 1.6.0 version and the issue persists.

--    V4L/V4L2:                    Using libv4l (ver 1.6.0)

I can see that some headers files are missing (sys/videoio.h, libavformat/avformat.h, ffmpeg/avformat.h):

-- 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
-- checking for module 'libavcodec'
--   found libavcodec, version 55.39.101
-- checking for module 'libavformat'
--   found libavformat, version 55.19.104
-- checking for module 'libavutil'
--   found libavutil, version 52.48.101
-- checking for module 'libswscale'
--   found libswscale, version 2.5.101
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found

Do you think it has something to do?

EDIT 3: I compiled opencv-3.0.0 in a fedora 21 alpha (fresh installation and inside of vbox machine). I installed these packages:

yum groupinstall 'Development Tools'  
yum groupinstall 'Development Libraries'
yum install cmake gtk2-devel python3-devel numpy python3-numpy gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-bad-nonfree gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools updates gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 x264 gstreamer-devel gstreamer-plugins-bad-free-devel gstreamer1-devel gstreamer1-plugins-bad-free-devel libtiff-devel libjpeg-devel jasper jasper-devel libdc1394-devel libv4l-devel tbb tbb-devel ffmpeg ffmpeg-devel ant sphinx

The issue persists and log shows the same error.error:

/usr/bin/ld: ../../lib/libopencv_videoio.a(cap_libv4l.cpp.o): referencia sin definir al símbolo 'v4l2_munmap'
/lib64/libv4l2.so.0: error adding symbols: DSO missing from command line
collect2: error: ld devolvió el estado de salida 1
modules/videoio/CMakeFiles/opencv_perf_videoio.dir/build.make:167: recipe for target 'bin/opencv_perf_videoio' failed
make[2]: *** [bin/opencv_perf_videoio] Error 1
CMakeFiles/Makefile2:2373: recipe for target 'modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_perf_videoio.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2