Ask Your Question
3

Building opencv-2.4.7 on CentOS 6

asked 2013-11-18 15:56:30 -0600

stuarta gravatar image

updated 2013-11-20 07:57:02 -0600

I was able to build opencv-2.4.7 on CentOS 6 but I had to edit /usr/local/src/opencv-2.4.7/cmake/cl2cpp.cmake and comment out string(MD5 hash "${lines}") on line 50. Otherwise I would get this error:

string does not recognize sub-command MD5

Are there any negative consequences from commenting out that line?

Edit: Here are configure options

-- General configuration for OpenCV 2.4.7 =====================================
--   Version control:               unknown
--
--   Platform:
--     Host:                        Linux 2.6.32-358.11.1.el6.x86_64 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  -msse -msse2 -msse3 -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  -msse -msse2 -msse3 -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  -msse -msse2 -msse3 -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  -msse -msse2 -msse3 -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):
--     Linker flags (Debug):
--     Precompiled headers:         YES
--
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
--     Disabled:                    python world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java
--
--   GUI:
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.18.9)
--     GThread :                    YES (ver 2.22.5)
--     GtkGlExt:                    YES (ver 1.2.0)
--     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:                        /usr/lib64/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib64/libjpeg.so (ver )
--     PNG:                         /usr/lib64/libpng.so (ver 1.2.49)
--     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.9.4)
--     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:
--       base:                      YES (ver 0.10.29)
--       app:                       YES (ver 0.10.29)
--       video:                     YES (ver 0.10.29)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    YES/YES
--     XIMEA:                       NO
--     Xine:                        NO
--
--   Other third-party libraries:
--     Use IPP:                     8.0.1 [8.0.1]
--          at:                     /opt/intel.2013.0.028 ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
3

answered 2013-12-18 02:05:18 -0600

mcarteaux gravatar image

updated 2013-12-18 02:27:17 -0600

It's normal with the default CMake on CentOS 6.5

$ cmake --version cmake version 2.6-patch 4

if you look the documentation[1] of CMake you will not see the function : string(< MD5|SHA1|SHA224|SHA256|SHA384|SHA512> < output variable> < input>)

one solution is to comment the line (what I did) or upgrade cmake to a newest version [2].

[1] http://www.cmake.org/cmake/help/cmake2.6docs.html#command:string

[2] http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:string

edit flag offensive delete link more
3

answered 2013-11-20 02:13:33 -0600

Robert Jobbagy gravatar image

I tried it on CentOS6 64 bit with cmake-2.8.5-3 and works fine without any error. What is your version ?

edit flag offensive delete link more

Comments

I added my cmake output in the first post so you can see all my version related information.

stuarta gravatar imagestuarta ( 2013-11-20 07:58:09 -0600 )edit
1

Got the same error when I built it (opencv-2.4.7 on CentOS 6.4) with cmake (2.6?) which I installed via yum. Passed without errors when I built it using the latest cmake (2.8.12) I installed from source.

ponta gravatar imageponta ( 2013-11-26 19:56:21 -0600 )edit

Worked for me when I moved to cmak 2.8

MohanNade gravatar imageMohanNade ( 2013-12-20 07:29:10 -0600 )edit
-1

answered 2013-12-07 09:56:21 -0600

CrackerJack9 gravatar image

After installing isomd5sum-devel this error stopped occurring for me

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-11-18 15:56:30 -0600

Seen: 11,360 times

Last updated: Dec 18 '13