Chowdhury-DSP / BYOD

Build-your-own guitar distortion!
GNU General Public License v3.0
436 stars 22 forks source link

[BUG] Fail to build on aarch64 #329

Closed hfiguiere closed 1 year ago

hfiguiere commented 1 year ago

Describe the bug Build fail on aarch64:

[1/302] Building CXX object src/CMakeFiles/rnn_accelerated_avx.dir/processors/drive/neural_utils/RNNAccelerated.cpp.o
FAILED: src/CMakeFiles/rnn_accelerated_avx.dir/processors/drive/neural_utils/RNNAccelerated.cpp.o 
/usr/bin/c++ -DBYOD_COMPILING_WITH_AVX=1 -DRTNEURAL_DEFAULT_ALIGNMENT=32 -DRTNEURAL_USE_XSIMD=1 -I/run/build/byod/src/../modules/RTNeural -I/run/build/byod/src/../modules/RTNeural/modules/xsimd/include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -O3 -DNDEBUG -std=gnu++20 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -mavx -mfma -Wno-unused-command-line-argument -flto -Wall -Wextra -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wsign-compare -Woverloaded-virtual -Wreorder -Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pedantic -Wno-ignored-qualifiers -Wno-unused-function -Wno-pessimizing-move -Wno-parentheses -Wno-deprecated-declarations -Wno-redundant-decls -Wno-zero-as-null-pointer-constant -Wno-redundant-move -Wno-attributes -Wno-strict-overflow -MD -MT src/CMakeFiles/rnn_accelerated_avx.dir/processors/drive/neural_utils/RNNAccelerated.cpp.o -MF src/CMakeFiles/rnn_accelerated_avx.dir/processors/drive/neural_utils/RNNAccelerated.cpp.o.d -o src/CMakeFiles/rnn_accelerated_avx.dir/processors/drive/neural_utils/RNNAccelerated.cpp.o -c /run/build/byod/src/processors/drive/neural_utils/RNNAccelerated.cpp
c++: error: unrecognized command-line option ‘-mavx’
c++: error: unrecognized command-line option ‘-mfma’

To Reproduce Steps to reproduce the behavior:

  1. build on aarch64

Expected behavior

that it builds

Additional context

See https://github.com/Chowdhury-DSP/BYOD/blob/main/modules/cmake/RuntimeSIMDLib.cmake#L11

hfiguiere commented 1 year ago

tl;dr it should check the options are valid for the compiler.

jatinchowdhury18 commented 1 year ago

Thanks for the report! Would you mind checking out the changes in #331 to see if that fixes the issue for you?

hfiguiere commented 1 year ago

That compiles.

jatinchowdhury18 commented 1 year ago

Awesome, I'll get it merged.