libfacedetection icon indicating copy to clipboard operation
libfacedetection copied to clipboard

c++: error: unrecognized command line option ‘-mavx2’ c++: error: unrecognized command line option ‘-mfma’

Open taotaohan opened this issue 4 years ago • 7 comments

taotaohan avatar May 26 '20 01:05 taotaohan

环境在英伟达TX2上编译 mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DDEMO=OFF cmake --build . --config Release 产生的错误

taotaohan avatar May 26 '20 01:05 taotaohan

R

1z2x3c4v5b6n7m8 avatar May 26 '20 01:05 1z2x3c4v5b6n7m8

树莓派4编译遇到同样的问题,不知该如何解决

freebog avatar May 27 '20 07:05 freebog

ARM不支持AVX,所以不能用这些选项。

On Wed, May 27, 2020 at 3:23 PM freebog [email protected] wrote:

树莓派4编译遇到同样的问题,不知该如何解决

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShiqiYu/libfacedetection/issues/255#issuecomment-634478660, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWR4HLM6J75Y4P7W3P2ETTRTS5W7ANCNFSM4NJ4G25Q .

--

Prof. Shiqi YU (于仕琪)

Department of Computer Science and Engineering,

Southern University of Science and Technology,

Shenzhen, China.

ShiqiYu avatar May 27 '20 08:05 ShiqiYu

如何在arm下编译使用?

taotaohan avatar May 28 '20 14:05 taotaohan

@taotaohan 禁用avx2可以用下面两种方法:

  1. 添加cmake命令参数,如下所示: cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DDEMO=OFF -DENABLE_AVX2=OFF
  2. 修改CMakeLists.txt脚本 option(ENABLE_AVX2 "use avx2" ON)修改为option(ENABLE_AVX2 "use avx2" OFF)

说明:第1种方式在jetson nano jetpack 4.4平台亲测,通过。

ZhangYouyi avatar Aug 24 '21 05:08 ZhangYouyi