Ask Your Question
1

SIGILL, illegal instruction cvtps2pd

asked 2013-12-07 20:53:32 -0600

Ivan Costa gravatar image

updated 2013-12-07 21:05:05 -0600

Hi, I'm new to OpenCV and I'm giving it a try.

I had compiled OpenCV 2.4.7 source in an old AMD Athlon 2.2 Ghz machine with Ubuntu.

The examples don't work, I receive SIGILL, illegal instruction for instruction cvtps2pd .

Is this an issue with cmake or anything related in the building process?

I've followed the instructions from http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html

wich lead to:

cd ~/opencv mkdir release cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make sudo make install

Here is the stack from GDB and some info on the machine.

====================================================
This GDB was configured as "i686-linux-gnu".

(gdb) r
Starting program: /home/usuario/opencv-2.4.7/release/bin/c-example-contours
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0xb7bbe891 in cv::initInterTab2D(int, bool) ()
   from /home/usuario/opencv-2.4.7/release/lib/libopencv_imgproc.so.2.4

(gdb) bt

#0  0xb7bbe891 in cv::initInterTab2D(int, bool) ()
   from /home/usuario/opencv-2.4.7/release/lib/libopencv_imgproc.so.2.4
#1  0xb7b10b05 in _GLOBAL__sub_I_imgwarp.cpp ()
   from /home/usuario/opencv-2.4.7/release/lib/libopencv_imgproc.so.2.4
#2  0xb7fed206 in call_init (env=0xbffff2dc, argv=0xbffff2d4, argc=1,
    l=<optimized out>) at dl-init.c:84
#3  call_init (l=<optimized out>, argc=1, argv=0xbffff2d4, env=0xbffff2dc)
    at dl-init.c:34
#4  0xb7fed2ec in _dl_init (main_map=0xb7fff938, argc=1, argv=0xbffff2d4,
    env=0xbffff2dc) at dl-init.c:133
#5  0xb7fdf1cf in _dl_start_user () from /lib/ld-linux.so.2

(gdb) x/i 0xb7bbe891

=> 0xb7bbe891 <_ZN2cvL14initInterTab2DEib+1041>:        cvtps2pd %xmm0,%xmm7
====================================================

cat /proc/version

Linux version 3.11.0-14-generic (buildd@akateko) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #21-Ubuntu SMP Tue Nov 12 17:07:40 UTC 2013

===================================================

cat /proc/cpuinfo

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Sempron(TM) 2600+
stepping        : 1
cpu MHz         : 2200.131
cache size      : 256 KB
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips        : 4400.26
clflush size    : 32
cache_alignment : 32
address sizes   : 34 bits physical, 32 bits virtual
power management: ts

===============================================

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-12-08 13:20:06 -0600

updated 2013-12-08 13:22:01 -0600

cvtps2pd is instruction from SSE2 instruction set. As I can see from your /proc/cpuinfo your machine does not support SSE2. You need to disable such optimizations using -DENABLE_SSE2=OFF key in cmake command line.

edit flag offensive delete link more

Comments

Is not cmake job to be aware of this in the build process? That bugs me.

But I'm going through a hell of a nightmare to build OpenCV in this machine. 'make' command breaks too often, giving me SEGFAULT and now I'm an not able to compile the source with your -DENABLE_SSE2=OFF suggestion.

I'll start all over again...

Ivan Costa gravatar imageIvan Costa ( 2013-12-09 12:40:08 -0600 )edit

make

Segmentation fault in program cc1

SegvAnalysis: Segfault happened at: 0x8957599: cmpw $0xb858,(%edx) PC (0x08957599) ok source "$0xb858" ok destination "(%edx)" (0x80000000) not located in a known VMA region (needed writable region)! SegvReason: writing unknown VMA SourcePackage: gcc-4.8 Title: cc1 crashed with SIGSEGV in __GI__IO_fwrite()

I have more trace but there are not enough space for them here :(

Ivan Costa gravatar imageIvan Costa ( 2013-12-09 13:50:13 -0600 )edit

This message means that your version of GCC has some bug. Try to update it or use more stable compiler version.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-12-10 00:06:26 -0600 )edit

I've managed do get gcc back to work (uninstalling / reinstalling), and ok, -DENABLE_SSE2=OFF made the trick for me.

Thank you so much Alexander!

Ivan Costa gravatar imageIvan Costa ( 2013-12-10 18:19:04 -0600 )edit

Actually ENABLE_SSE2 is one of the group of OpenCV cmake keys that controls hardware optimizations. The full list of the keys and default values you can find in CMakeLists.txt in the root of OpenCV source code.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-12-10 23:54:29 -0600 )edit

Good one, guys. I've just encountered this error myself. Very pleasant experience to see a fix for it. Cheers.

firstwitness gravatar imagefirstwitness ( 2013-12-18 19:20:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-07 20:53:32 -0600

Seen: 1,657 times

Last updated: Dec 18 '13