Hi,
On a weekend I noticed a following question on IRC:
<Guest68> Compiling openvswitch v2.16.0; stuck at ...#/bin/sh ./libtool
--tag=CC
--mode=compile gcc -DHAVE_CONFIG_H -I. -I ./include -I ./include -I ./lib -I
./lib
-mavx512f -mavx512bw -mavx512dq -mbmi -mbmi2 -fPIC -Wstrict-prototypes -Wall
-Wextra
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum
-Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes
-Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers
-fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses
-Wsizeof-array-argument
-Wbool-compare -Wshadow -g -O2 -MT
lib/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.lo -MD -MP -MF
lib/.deps/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.Tpo -c -o
lib/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.lo `test -f
'lib/dpif-netdev-lookup-avx512-gather.c' || echo './'`
lib/dpif-netdev-lookup-avx512-gather.c
getting libtool: compile: gcc -DHAVE_CONFIG_H -I. -I ./include -I ./include -I
./lib -I
./lib -mavx512f -mavx512bw -mavx512dq -mbmi -mbmi2 -fPIC -Wstrict-prototypes
-Wall -Wextra
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum
-Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes
-Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers
-fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses
-Wsizeof-array-argument
-Wbool-compare -Wshadow -g -O2 -MT
lib/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.lo -MD -MP -MF
lib/.deps/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.Tpo -c
lib/dpif-netdev-lookup-avx512-gather.c -o
lib/libopenvswitchavx512_la-dpif-netdev-lookup-avx512-gather.o
<Guest68> lib/dpif-netdev-lookup-avx512-gather.c:88:1: error:
attribute(target("avx512vpopcntdq")) is unknown
<Guest68> {
<Guest68> ^
<Guest68> lib/dpif-netdev-lookup-avx512-gather.c:356:47: error:
attribute(target("avx512vpopcntdq")) is unknown
<Guest68> struct dpcls_rule **rules)
\
<Guest68> ^
<Guest68> lib/dpif-netdev-lookup-avx512-gather.c:363:1: note: in expansion of
macro 'DECLARE_OPTIMIZED_LOOKUP_FUNCTION'
<Guest68> DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 4)
<Guest68> ^
<Guest68> lib/dpif-netdev-lookup-avx512-gather.c:356:47: error:
attribute(target("avx512vpopcntdq")) is unknown
<Guest68> struct dpcls_rule **rules)
\
<Guest68> ^
<Guest68> lib/dpif-netdev-lookup-avx512-gather.c:364:1: note: in expansion of
macro 'DECLARE_OPTIMIZED_LOOKUP_FUNCTION'
<Guest68> DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 1)
<Guest68> ^
<Guest68> DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4, 0)
<Guest68> ^
<Guest68> Any help ?
<Guest68> The closest I found is '[ovs-dev] [PATCH] dpcls: fix build on
compilers without AVX512-VPOPCNT',
<Guest68> but I can't see the patch. TIA, Jan
Unfortunately, I noticed only after a few hours after, and reporter seems
to disconnect before I asked for details. However, the case looks like
avx512 checks in ./configure passed, but compiler doesn't support the
attribute(target). I'm not sure why this happened though. But it seems
that not all copilers supports this attribute. Do we need to check that
at configuration time? Or do we need a knob to fully disable all avx512
stuff during configuration?
While googling things around attribute 'target' I also noticed that it's
not supported by some older versions of clang and gcc, but we do not
check that anywhere.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev