Prakruti
Prakruti

Reputation: 301

Installing OpenCV in Raspberry Pi error while doing make

I am getting the following errors after doing running 'make' command.

[  0%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matmul.o
c++: error: -pg and -fomit-frame-pointer are incompatible
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/matmul.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2

I am following the tutorial on http://mitchtech.net/raspberry-pi-opencv/ link.

Following were missing when i did cmake before doing make:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
-- Detected version of GNU GCC: 46 (406)
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-video-0.10'
--   package 'gstreamer-video-0.10' not found
-- checking for module 'libswscale'
--   package 'libswscale' not found
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
--     Use NumPy headers from: /usr/lib/pymodules/python2.7/numpy/core/include
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sphinx
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "4.0")
-- Parsing 'cvconfig.h.cmake'

Can somebody please explain what is happening and what is the solution to it ? I am new to both OpenCV and R-Pi.

Upvotes: 0

Views: 1557

Answers (1)

Anoop K. Prabhu
Anoop K. Prabhu

Reputation: 5635

Following the link you refer "as is" will have solved the issue.

Some essential packages are missing and hence the error.

Install by entering the following commands before compiling OpenCV. You must have an active net connection!

sudo apt-get -y install build-essential cmake cmake-qt-gui pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools

sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev pkg-config

Upvotes: 1

Related Questions