Monday, October 20, 2014

Assembler messages: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'

I got the following errors while building RGBDSLAMv2 in ROS in my ubuntu 12.04 system. 

[ 62%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/qt_gui.o
[ 64%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/node.o
[ 66%] Building CXX object rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/glviewer.o
/tmp/ccgvJzxG.s: Assembler messages:
/tmp/ccgvJzxG.s:11194: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
/tmp/ccgvJzxG.s:12560: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/moc_graph_manager.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/cct3JxmG.s: Assembler messages:
/tmp/cct3JxmG.s:10798: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
/tmp/cct3JxmG.s:12164: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/moc_openni_listener.o] Error 1
Linking CXX executable /home/swagatika/catkin_ws/devel/lib/my_pcl_tutorial/example
[ 66%] Built target example
/tmp/ccELf8iw.s: Assembler messages:
/tmp/ccELf8iw.s:16630: Error: no such instruction: `vfmadd312ss 88(%rsp),%xmm1,%xmm2'
/tmp/ccELf8iw.s:16640: Error: no such instruction: `vfmadd312ss 96(%rsp),%xmm3,%xmm1'
/tmp/ccELf8iw.s:16641: Error: no such instruction: `vfmadd312ss 100(%rsp),%xmm3,%xmm0'
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/glviewer.o] Error 1
/tmp/ccslUlsc.s: Assembler messages:
/tmp/ccslUlsc.s:15733: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
/tmp/ccslUlsc.s:17099: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/main.o] Error 1
/tmp/ccAmx5la.s: Assembler messages:
/tmp/ccAmx5la.s:439309: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
/tmp/ccAmx5la.s:440675: Error: no such instruction: `vfmadd312ss (%r15),%xmm0,%xmm1'
make[2]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/src/openni_listener.o] Error 1
make[1]: *** [rgbdslam_v2-hydro/CMakeFiles/rgbdslam.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed



$ gcc -march=native -Q --help=target | grep march
  -march=                             corei7-avx

Solution:

In /home/swagatika/catkin_ws/src/rgbdslam_v2-hydro/CMakeLists.txt,

You can add -march=native -mno-avx This worked for me.
In my CMakeLists.txt, I added the above to the CMAKE_CXX_FLAGS :
SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++0x -march=native -mno-avx")
 
Ref:

http://stackoverflow.com/questions/17126593/compile-errors-with-assembler-messages

http://stackoverflow.com/questions/10327939/erroring-on-no-such-instruction-while-assembling-project-on-mac-os-x-lion

No comments:

Post a Comment