kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.64k stars 252 forks source link

"ARM builds require NEON support. “ in raspberry PI 4 #135

Closed zhang-ray closed 6 months ago

zhang-ray commented 3 years ago

when I running these commands:

mkdir build && cd build
cmake -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
make -- -j

I got:

[  1%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/convolution-impl.cpp.o
In file included from /home/pi/kfr/include/kfr/dft/impl/convolution-impl.cpp:26:
In file included from /home/pi/kfr/include/kfr/dft/impl/../convolution.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/filter.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/basic_expressions.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/operators.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/impl/operators.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/impl/function.hpp:25:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/impl/../../base/expression.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/platform.hpp:28:
In file included from /home/pi/kfr/include/kfr/dft/impl/../../base/../simd/types.hpp:28:
/home/pi/kfr/include/kfr/dft/impl/../../base/../simd/../kfr.h:82:2: error: "ARM builds require NEON support. Add -march=native
      for native build or skip the check with CMT_FORCE_GENERIC_CPU=1"
#error "ARM builds require NEON support. Add -march=native for native build or skip the check with CMT_FORCE_GENERIC_CPU=1"
 ^
1 error generated.
make[2]: *** [CMakeFiles/kfr_dft.dir/build.make:63: CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/convolution-impl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/kfr_dft.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

kfr version: commit 9fc73247f43b303617329294ae264613df4dce71

Raspbery PI 4 info:

Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

clang++ --version: clang version 7.0.1-8+rpi3+deb10u2 (tags/RELEASE_701/final)

paulh002 commented 3 years ago

Have the same issue

dancazarin commented 2 years ago

NEON is required for KFR to work and Raspberry Pi supports it. You can add -DCMAKE_CXX_FLAGS=-march=native to force compiler to use all cpu features, as warning suggests.