Not able to install OpenCV?

asked 2015-02-11 07:14:36 -0500

aj_nikhil gravatar image

updated 2015-02-11 07:46:28 -0500

Installation steps I followed

  1. Downloaded the 2.4.10 version of OpenCV (zip file) from the official website.
  2. Unzipped the file
  3. Installed all the dependencies for OpenCV

    sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

  4. Then used these commands

    mkdir build cd build cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..

It starts building. After the build when I give the make command the following error comes

/home/nikhil/Downloads/opencv-
2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an ‘asm’
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2

My OS is Ubuntu 12.04

Please can anyone suggest me what wrong I am doing here. Been stuck on this since 2 days. TIA.

edit retag flag offensive close merge delete

Comments

berak gravatar imageberak ( 2015-02-11 07:20:08 -0500 )edit
1

There has been a fix for this normally. Instead of downloading 2.4.10 from the website, please use the 2.4 branch of the github repository, which already contains this fix!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-02-11 07:48:04 -0500 )edit

I had the same issue with the 2.4.10 zip file. But for my cmake I just did this -> cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

and it worked.

Potato gravatar imagePotato ( 2015-02-11 11:13:48 -0500 )edit

That is not the solution. Debug is more interesting when running into problems. Just download the latest git 2.4 branch.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-02-11 12:26:15 -0500 )edit