Closed kuon closed 2 years ago
Yeah I noticed this happens with newer GCC versions (?) Seems to be an issue with the intrinsic headers but I have no idea why, I'll have to do some investigating. Clang should work in the meantime, if that's an option.
Clang produces another error:
[ 54%] Building CXX object CMakeFiles/waveform.dir/src/module.cpp.o
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:42:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:52:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:59:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:65:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:133:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:26:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/filter.hpp:177:1: error: '__target__' attribute takes one argument
DECORATE_AVX
^
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/build/include/waveform_config.hpp:7:38: note: expanded from macro 'DECORATE_AVX'
#define DECORATE_AVX __attribute__ ((__target__ ("avx", "fma")))
^
In file included from /home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/module.cpp:19:
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:146:24: warning: suggest braces around initialization of subobject [-Wmissing-braces]
vec4 m_color_base{ 1.0, 1.0, 1.0, 1.0 };
^~~~~~~~~~~~~~~~~~
{ }
/home/kuon/Repos/aur/obs-waveform/src/waveform-1.2.3/src/source.hpp:147:25: warning: suggest braces around initialization of subobject [-Wmissing-braces]
vec4 m_color_crest{ 1.0, 1.0, 1.0, 1.0 };
^~~~~~~~~~~~~~~~~~
{ }
2 warnings and 6 errors generated.
Actually it was easy to fix, I made a PR.
I had an older version checked out and mixed things up, clang build is working on master.
Turns out newer GCC versions don't seem to like using 256-bit intrinsics without enabling -mavx for the entire TU, regardless of function-level target attributes. The last non-AVX CPU is ancient enough now that I'm just going to target AVX as the baseline.
Current master branch should build with GCC 11.2 now.
I am trying to build this plugin on archlinux with gcc 11.2, but I have the following error.
The obs package I use is this one : https://aur.archlinux.org/packages/obs-studio-tytan652
Build logs: