building OpenCV 2.4.2 on Centos 5.10

asked 2014-11-12 04:25:10 -0600

Hi,

I'm trying to build OpenCV 2.4.2 on Centos 5.10.

. packages installed :

gcc gcc-c++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel gstreamer-plugins-base-devel gstreamer-devel gtk2-devel numpy cmake28 autoconf automake nasm ruby

. ffmpeg version 0.10.15
libavutil      51. 35.100 / 51. 35.100
libavcodec     53. 61.100 / 53. 61.100
libavformat    53. 32.100 / 53. 32.100
libavdevice    53.  4.100 / 53.  4.100
libavfilter     2. 61.100 /  2. 61.100
libswscale      2.  1.100 /  2.  1.100
libswresample   0.  6.100 /  0.  6.100
libpostproc    52.  0.100 / 52.  0.100

. CMAKE command =

cmake28 -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/OpenCV-2.4.2/ -D WITH_CUDA=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO  -D OPENCV_EXTRA_MODULES_PATH="/usr/local/src/OpenCV-2.4.2/modules"  ..

. result :

-- Detected version of GNU GCC: 41 (401)
-- Extracting svn version, please wait...
-- SVNVERSION: exported
-- checking for module 'gtkglext-1.0'
--   package 'gtkglext-1.0' not found
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named sphinx
--
-- General configuration for OpenCV 2.4.2 =====================================
--
--   Platform:
--     Host:                        Linux 2.6.18-371.12.1.el5 i686
--     CMake:                       2.8.11.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++ (ver 4.1.2)
--     C++ flags (Release):         -W -Wall -Wformat -Wundef -Winit-self -Wpointer-arith -Wshadow     -Wsign-promo -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections   -DNDEBUG
--     C++ flags (Debug):           -W -Wall -Wformat -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections   -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -W -Wall -Wformat -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections   -DNDEBUG
--     C flags (Debug):             -W -Wall -Wformat -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections   -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):
--     Linker flags (Debug):
--     Precompiled headers:         NO
--
--   OpenCV modules:
--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect     contrib nonfree gpu legacy photo stitching ts videostab
--     Disabled:                    python
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java world
--
--   GUI:
--     QT 4.x:                      NO
--     GTK+ 2.x:                    YES (ver 2.10.4)
--     GThread :                    YES (ver 2.12.3)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--
--   Media I/O:
--     ZLib:                        /lib/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib/libjpeg.so (ver 62)
--     PNG:                         /usr/lib/libpng.so (ver 1.2.10)
--     TIFF:                        /usr/lib/libtiff.so (ver 42 - 3.8.2)
--     JPEG 2000:                   /usr/lib/libjasper.so (ver 1.900.1)
--     OpenEXR:                     NO
--
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2 ...
(more)
edit retag flag offensive close merge delete

Comments

hmm, if you take the trouble building opencv, why not 2.4.10 ?

also, those are only warnings, not errors. the real error will be a few lines up from there.

berak gravatar imageberak ( 2014-11-12 04:38:27 -0600 )edit

Thanks for you response. Yes, I tried building opencv 2.4.10 but I encountered this error : opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an ‘asm’ ); ^

gloufiglou gravatar imagegloufiglou ( 2014-11-13 04:39:15 -0600 )edit

http://code.opencv.org/issues/3983 // might need a compiler upgrade

berak gravatar imageberak ( 2014-11-13 04:58:59 -0600 )edit