Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile errors with Assembler messages

I'm working with Point Cloud Library. It's mostly in C++ When I compile it, gives such error:

[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/intersections.cpp.o
In file included from /home/lv/pcl-trunk/common/include/pcl/point_types.h:301:0,
                 from /home/lv/pcl-trunk/common/include/pcl/common/impl/common.hpp:41,
                 from /home/lv/pcl-trunk/common/include/pcl/common/common.h:186,
                 from /home/lv/pcl-trunk/common/include/pcl/common/intersections.h:41,
                 from /home/lv/pcl-trunk/common/src/intersections.cpp:38:
/home/lv/pcl-trunk/common/include/pcl/impl/point_types.hpp:1009:68: warning: ‘SHOT’ is deprecated [-Wdeprecated-declarations]
/tmp/ccRLy4Re.s: Assembler messages:
/tmp/ccRLy4Re.s:2488: Error: no such instruction: `vfmadd312ss (%r9),%xmm2,%xmm1'
/tmp/ccRLy4Re.s:2638: Error: no such instruction: `vfmadd312ss (%rdx),%xmm2,%xmm1'
/tmp/ccRLy4Re.s:3039: Error: no such instruction: `vfmadd312ss (%rax,%r11,4),%xmm5,%xmm1'
/tmp/ccRLy4Re.s:3402: Error: no such instruction: `vfmadd312ss (%rax,%r11,4),%xmm5,%xmm1'
/tmp/ccRLy4Re.s:3534: Error: no such instruction: `vfmadd312ss (%rax,%rdx,4),%xmm1,%xmm2'
/tmp/ccRLy4Re.s:3628: Error: no such instruction: `vfmadd312ss (%rax,%rdx,4),%xmm1,%xmm2'
/tmp/ccRLy4Re.s:6103: Error: no such instruction: `vfmadd312ss (%r11),%xmm0,%xmm4'
/tmp/ccRLy4Re.s:6121: Error: no such instruction: `vfmadd312ss (%r11,%rbx,4),%xmm0,%xmm3'
/tmp/ccRLy4Re.s:6131: Error: no such instruction: `vfmadd312ss (%r11,%rbp,4),%xmm0,%xmm2'
/tmp/ccRLy4Re.s:6135: Error: no such instruction: `vfmadd312ss (%r11,%r13,4),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:6344: Error: no such instruction: `vfmadd312ss (%r10),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:11760: Error: no such instruction: `vfnmadd312ss (%rdx),%xmm0,%xmm0'
/tmp/ccRLy4Re.s:13976: Error: no such instruction: `vfmadd312ss (%rdi),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:14125: Error: no such instruction: `vfmadd312ss (%rdx),%xmm0,%xmm1'
make[2]: *** [common/CMakeFiles/pcl_common.dir/src/intersections.cpp.o] Error 1
make[1]: *** [common/CMakeFiles/pcl_common.dir/all] Error 2
make: *** [all] Error 2

Could anyone tell me how to read these errors and give me some suggestions to solve?

like image 258
Lv Zhaoyang Avatar asked Dec 15 '22 09:12

Lv Zhaoyang


1 Answers

You can use the command below to see what is your CPU (for the compiler): gcc -march=native -Q --help=target | grep march

Then you can add your cpu type in the ccmake CMAKE_CXX_FLAGS option, for me: CMAKE_CXX_FLAGS = -march=corei7-avx

like image 79
RobertaRavanelli Avatar answered Jan 03 '23 16:01

RobertaRavanelli