install opencv-2.4-9 on centos 6.5 with cuda 5.5 support.

asked 2014-06-25 13:20:27 -0600

rica01 gravatar image

updated 2014-06-25 17:24:11 -0600

Hello.

I can't seem to install opencv 2.4.9 on centos 6.5 with cuda 5.5 support. this is my cmake output:

[root@cadejos-0 opencv]# cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/opencv -D WITH_CUDA=ON /opt/opencv-2.4.9/opencv/
    -- Detected version of GNU GCC: 44 (404)
    -- Looking for linux/videodev.h
    -- Looking for linux/videodev.h - found
    -- Looking for linux/videodev2.h
    -- Looking for linux/videodev2.h - found
    -- Looking for sys/videoio.h
    -- Looking for sys/videoio.h - not found
    -- Looking for libavformat/avformat.h
    -- Looking for libavformat/avformat.h - found
    -- Looking for ffmpeg/avformat.h
    -- Looking for ffmpeg/avformat.h - not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named numpy.distutils
    -- Found apache ant 1.7.1: /usr/bin/ant
    -- 
    -- General configuration for OpenCV 2.4.8.2 =====================================
    --   Version control:               2.4.8.2-dirty
    -- 
    --   Platform:
    --     Host:                        Linux 2.6.32-358.18.1.el6.x86_64 x86_64
    --     CMake:                       2.6.4
    --     CMake generator:             Unix Makefiles
    --     CMake build tool:            /usr/bin/gmake
    --     Configuration:               RELEASE
    -- 
    --   C/C++:
    --     Built as dynamic libs?:      YES
    --     C++ Compiler:                /usr/bin/c++  (ver 4.4.7)
    --     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
    --     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG
    --     C Compiler:                  /usr/bin/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 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
    --     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG
    --     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:                    world
    --     Disabled by dependency:      -
    --     Unavailable:                 androidcamera dynamicuda java python
    -- 
    --   GUI: 
    --     QT:                          NO
    --     GTK+ 2.x:                    YES (ver 2.20.1)
    --     GThread :                    YES (ver 2.26.1)
    --     GtkGlExt:                    NO
    --     OpenGL support:              NO
    -- 
    --   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:                   /usr/lib64/libjasper.so (ver 1.900.1)
    --     OpenEXR:                     build (ver 1.7.1)
    -- 
    --   Video I/O:
    --     DC1394 1.x:                  NO
    --     DC1394 2.x:                  YES (ver 2.1.2)
    --     FFMPEG:                      YES
    --       codec:                     YES (ver 52.72.2)
    --       format:                    YES (ver 52.64.2)
    --       util:                      YES (ver 50.15.1)
    --       swscale:                   YES (ver 0.11.0)
    --       gentoo-style:              YES
    --     GStreamer:                   
    --       base:                      YES (ver 0.10.29)
    --       app:                       YES (ver 0 ...
(more)
edit retag flag offensive close merge delete

Comments

so i take installing openCV on CentOS is IMPOSSIBLE?

rica01 gravatar imagerica01 ( 2014-07-18 10:30:34 -0600 )edit

I've been beating on the same setup for a few days without complete success also. I've gotten past the basic cmake issues, but now hit c++ compile/syntax errors (I'm presuming there's a particular version of gcc/g++ that might work with 2.4.9, though I've tried several to so far and each one has different compile issues. I've also tried backing up to 2.4.8 and 2.4.7, though not with all version of compiler yet (Hmm, I should write a script to hit a big matrix of gcc/g++ vs opencv versions). Hmm, I see you are using gcc 4.4.7, which I abondoned since it had many syntax/c++ compiler errors, and have moved up to gcc 4.8.?, which get compile more of the code but not all. Then gcc 4.9+ can't be used ...(more)

ChipNinja gravatar imageChipNinja ( 2014-08-03 14:08:21 -0600 )edit

Let me try to help. In order to make sure your CUDA is recognized by OpenCV, you need to make sure the following stuff is done correctly:

  • Is the CUDA path added to your PATH? In your bashrc you should have something like PATH="$PATH:/usr/local/cuda-6.0/bin"
  • Do you have a ld config for your CUDA? This can be done with sudo gedit /etc/ld.so.conf.d/cuda.conf and then adding the following in that file /usr/local/cuda-6.0/lib64 offcourse adapting it to your needs and running sudo ldconfig after it to reload.

Now OpenCV should recognize your CUDA installation, atleast it does here on Ubuntu.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-04 03:41:13 -0600 )edit

@StevenPuttemans:

Thanks for your input.

*CUDA is in the $PATH. It is shown in the original post.

*I didnt have an ldconfig file for CUDA. i created it and the results are the same.

*Apparently, OpenCV cannot be used under CentOS.

Any other ideas?

rica01 gravatar imagerica01 ( 2014-08-06 11:59:22 -0600 )edit

Maybe this topic can point you in the correct direction?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-07 03:33:53 -0600 )edit