ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.26k stars 3.05k forks source link

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

Open taotaohan opened 4 years ago

taotaohan commented 4 years ago

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

1z2x3c4v5b6n7m8 commented 4 years ago

R

freebog commented 4 years ago

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

ShiqiYu commented 4 years ago

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

On Wed, May 27, 2020 at 3:23 PM freebog notifications@github.com 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.

taotaohan commented 4 years ago

如何在arm下编译使用?

ZhangYouyi commented 3 years ago

@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平台亲测,通过。

yixiaoyao1998 commented 1 week ago

可以尝试如下方案解决: 1.打开apollo/scripts/apollo_base.sh 2.找到job_args="--copt=-mavx2 --host_copt=-mavx2 --jobs=${count} --local_ram_resources=HOST_RAM0.7" 3.将2修改成job_args="--jobs=${count} --local_ram_resources=HOST_RAM0.7" 4.进入docker重新编译 即可成功 本人基于Nvidia Jetson Orin 亲测,通过