Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building opencv-2.4.6.1 on CentOS 5

I am trying to build opencv-2.4.6.1 on CentOS 5.

Here is my cmake command:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4.6.1 \
-D CMAKE_CXX_COMPILER=/usr/local/gcc-4.8.1/bin/g++ \
-D CMAKE_C_COMPILER=/usr/local/gcc-4.8.1/bin/gcc -D BUILD_opencv_python=OFF \
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5/ -D WITH_FFMPEG=YES -D BUILD_EXAMPLES=ON \
-D WITH_TBB=ON -D TBB_INCLUDE_DIRS=/opt/intel.2013.0.028/tbb/include/ \
-D TBB_LIB_DIR=/opt/intel.2013.0.028/tbb/lib/intel64/ -D WITH_IPP=ON -D WITH_OPENGL=ON ..

Here is the result of cmake:

-- General configuration for OpenCV 2.4.6.1 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 2.6.18-308.11.1.el5 x86_64
--     CMake:                       2.8.6
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/local/gcc-4.8.1/bin/g++  (ver 4.8.1)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/local/gcc-4.8.1/bin/gcc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu nonfree stitching superres ts videostab
--     Disabled:                    python world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java ocl
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.10.4)
--     GThread :                    YES (ver 2.12.3)
--     GtkGlExt:                    YES (ver 1.0.6)
--     OpenGL support:              YES (/usr/lib64/libGLU.so /usr/lib64/libGL.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so)
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib64/libjpeg.so (ver 62)
--     PNG:                         /usr/lib64/libpng.so (ver 1.2.10)
--     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.8.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.18.102)
--       format:                    YES (ver 55.12.100)
--       util:                      YES (ver 52.38.100)
--       swscale:                   YES (ver 2.3.100)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/NO
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     7.1.1 [7.1.1]
--          at:                     /opt/intel.2013.0.028/ipp
--     Use Eigen:                   NO
--     Use TBB:                     YES (ver 4.1 interface 6105)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 5.5)
--     Use OpenCL:                  NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             11 12 13 20 21 30
--     NVIDIA PTX archs:            20 30
--     Use fast math:               NO
-- 
--   Python:
--     Interpreter:                 /usr/local/bin/python (ver 2.6.4)
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           /usr/bin/pdflatex
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
-- 
--   Install path:                  /usr/local/opencv-2.4.6.1
-- 
--   cvconfig.h is in:              /usr/local/src/opencv-2.4.6.1/release
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/opencv-2.4.6.1/release

However, the build fails due to the following:

/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_get_font_cache'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_for_display'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_load'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_subfont_xlfd'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_unload'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_find_first_subfont'
collect2: error: ld returned 1 exit status

Does anyone have any ideas of how to fix this? If you need more information, please ask! Thanks in advance.

Building opencv-2.4.6.1 or 2.4.7 on CentOS 5

I am trying to build opencv-2.4.6.1 on CentOS 5.

Here is my cmake command:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4.6.1 \
-D CMAKE_CXX_COMPILER=/usr/local/gcc-4.8.1/bin/g++ \
-D CMAKE_C_COMPILER=/usr/local/gcc-4.8.1/bin/gcc -D BUILD_opencv_python=OFF \
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5/ -D WITH_FFMPEG=YES -D BUILD_EXAMPLES=ON \
-D WITH_TBB=ON -D TBB_INCLUDE_DIRS=/opt/intel.2013.0.028/tbb/include/ \
-D TBB_LIB_DIR=/opt/intel.2013.0.028/tbb/lib/intel64/ -D WITH_IPP=ON -D WITH_OPENGL=ON ..

Here is the result of cmake:

-- General configuration for OpenCV 2.4.6.1 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 2.6.18-308.11.1.el5 x86_64
--     CMake:                       2.8.6
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/local/gcc-4.8.1/bin/g++  (ver 4.8.1)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/local/gcc-4.8.1/bin/gcc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu nonfree stitching superres ts videostab
--     Disabled:                    python world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java ocl
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.10.4)
--     GThread :                    YES (ver 2.12.3)
--     GtkGlExt:                    YES (ver 1.0.6)
--     OpenGL support:              YES (/usr/lib64/libGLU.so /usr/lib64/libGL.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so)
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib64/libjpeg.so (ver 62)
--     PNG:                         /usr/lib64/libpng.so (ver 1.2.10)
--     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.8.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.18.102)
--       format:                    YES (ver 55.12.100)
--       util:                      YES (ver 52.38.100)
--       swscale:                   YES (ver 2.3.100)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/NO
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     7.1.1 [7.1.1]
--          at:                     /opt/intel.2013.0.028/ipp
--     Use Eigen:                   NO
--     Use TBB:                     YES (ver 4.1 interface 6105)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 5.5)
--     Use OpenCL:                  NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             11 12 13 20 21 30
--     NVIDIA PTX archs:            20 30
--     Use fast math:               NO
-- 
--   Python:
--     Interpreter:                 /usr/local/bin/python (ver 2.6.4)
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           /usr/bin/pdflatex
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
-- 
--   Install path:                  /usr/local/opencv-2.4.6.1
-- 
--   cvconfig.h is in:              /usr/local/src/opencv-2.4.6.1/release
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/opencv-2.4.6.1/release

However, the build fails due to the following:

/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_get_font_cache'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_for_display'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_load'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_subfont_xlfd'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_unload'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_find_first_subfont'
collect2: error: ld returned 1 exit status

Does anyone have any ideas of how to fix this? If you need more information, please ask! Thanks in advance.

Edit: This is also try if I try to build 2.4.7

Building opencv-2.4.6.1 or 2.4.7 on CentOS 5

I am trying to build opencv-2.4.6.1 on CentOS 5.

Here is my cmake command:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4.6.1 \
-D CMAKE_CXX_COMPILER=/usr/local/gcc-4.8.1/bin/g++ \
-D CMAKE_C_COMPILER=/usr/local/gcc-4.8.1/bin/gcc -D BUILD_opencv_python=OFF \
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5/ -D WITH_FFMPEG=YES -D BUILD_EXAMPLES=ON \
-D WITH_TBB=ON -D TBB_INCLUDE_DIRS=/opt/intel.2013.0.028/tbb/include/ \
-D TBB_LIB_DIR=/opt/intel.2013.0.028/tbb/lib/intel64/ -D WITH_IPP=ON -D WITH_OPENGL=ON ..

Here is the result of cmake:

-- General configuration for OpenCV 2.4.6.1 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 2.6.18-308.11.1.el5 x86_64
--     CMake:                       2.8.6
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/local/gcc-4.8.1/bin/g++  (ver 4.8.1)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/local/gcc-4.8.1/bin/gcc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu nonfree stitching superres ts videostab
--     Disabled:                    python world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java ocl
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.10.4)
--     GThread :                    YES (ver 2.12.3)
--     GtkGlExt:                    YES (ver 1.0.6)
--     OpenGL support:              YES (/usr/lib64/libGLU.so /usr/lib64/libGL.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so)
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib64/libjpeg.so (ver 62)
--     PNG:                         /usr/lib64/libpng.so (ver 1.2.10)
--     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.8.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       codec:                     YES (ver 55.18.102)
--       format:                    YES (ver 55.12.100)
--       util:                      YES (ver 52.38.100)
--       swscale:                   YES (ver 2.3.100)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/NO
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     7.1.1 [7.1.1]
--          at:                     /opt/intel.2013.0.028/ipp
--     Use Eigen:                   NO
--     Use TBB:                     YES (ver 4.1 interface 6105)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 5.5)
--     Use OpenCL:                  NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             11 12 13 20 21 30
--     NVIDIA PTX archs:            20 30
--     Use fast math:               NO
-- 
--   Python:
--     Interpreter:                 /usr/local/bin/python (ver 2.6.4)
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           /usr/bin/pdflatex
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
-- 
--   Install path:                  /usr/local/opencv-2.4.6.1
-- 
--   cvconfig.h is in:              /usr/local/src/opencv-2.4.6.1/release
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/opencv-2.4.6.1/release

However, the build fails due to the following:

/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_get_font_cache'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_map_for_display'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_load'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_subfont_xlfd'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_font_cache_unload'
/usr/lib64//libgdkglext-x11-1.0.so.0: undefined reference to `pango_x_find_first_subfont'
collect2: error: ld returned 1 exit status

Does anyone have any ideas of how to fix this? If you need more information, please ask! Thanks in advance.

Edit: This is also try true if I try to build 2.4.7