Problem in installing opencv in ubntu 12.04 32 bit system

asked 2014-10-29 02:12:42 -0600

shalini gravatar image

updated 2014-10-29 03:07:38 -0600

When I try it compile opencv on ubuntu 12.04 it dumps the following error

**/home/ubuntu/opencv/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**

Please help as m struggling very much

edit retag flag offensive close merge delete

Comments

Here is a link to the exact line generating the error. Looking at errors in similar packages it seems that this bug is system specific. Will take a look if I can find a fix!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-29 03:12:26 -0600 )edit

It seems that it has to do with your gcc compiler version that is unable to treat inline assembly code. This topic mentions GCC 4.6.3. Could you try updating your GCC compiler to like 4.8.2 and see if it still persists?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-29 03:15:46 -0600 )edit
1

Hi Thanks a lot for d reply. The link was very useful. I copied the file from the link and replaced the one that i had. Compilation is going through. Hope i can install. Meanwhile if i get stuck will post my problem. Thank u so much.

shalini gravatar imageshalini ( 2014-10-29 03:48:51 -0600 )edit

Yeah fixing the file is one thing, but moving on to a better supported GCC compiler would be the best way! Also made an issue report here since I think this is a crutial problem in the repo.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-29 04:25:05 -0600 )edit
1

ok.. will look into it. Thanks !

shalini gravatar imageshalini ( 2014-10-29 04:44:50 -0600 )edit
1

I ran into the same problem. Replacing the file worked. However, I was using 14.04 and the default gcc version is 4.8. I'm wondering why there is still problems with asm. I also upgraded to gcc 4.9 but the problem persisted.

timtianyang gravatar imagetimtianyang ( 2014-11-30 15:40:13 -0600 )edit

I had gcc 4.8.2 and had the same problem while installing OpenCV 2.4.10 on Ubuntu 14.04, so I followed shalini and replaced the original file "system.cpp" by system.cpp in the opencv folder (opencv-2.4.10/modules/core/src). Installation is going on!

Why don't opencv's developers update this file? I can't understand this.

Bernardo Biesseck gravatar imageBernardo Biesseck ( 2015-02-21 06:54:48 -0600 )edit