On 11/6/20 4:25 AM, Ben Pfaff wrote:
> Numan, during the OVN meeting today, you reported that building current
> master of OVS, on a machine that supports AVX512, and then building OVN
> based on that, caused the following build failure:
> 
>     depbase=`echo northd/ovn-northd-ddlog.o | sed 
> 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>     gcc -DHAVE_CONFIG_H -I.   -I ./include  -I ./include -I ./ovn -I 
> ./include -I ./lib -I ./lib -I /mnt/alt_home/numans/workspace_cpp/ovs/include 
> -I /mnt/alt_home/numans/workspace_cpp/ovs/include -I 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib -I 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib -I 
> /mnt/alt_home/numans/workspace_cpp/ovs -I 
> /mnt/alt_home/numans/workspace_cpp/ovs    -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 -Wshift-negative-value 
> -Wduplicated-cond -Wshadow -Wmultistatement-macros -Wcast-align=strict   -g 
> -O2 -MT northd/ovn-northd-ddlog.o -MD -MP -MF $depbase.Tpo -c -o 
> northd/ovn-northd-ddlog.o northd/ovn-northd-ddlog.c &&\
>     mv -f $depbase.Tpo $depbase.Po
>     LIBOVN_DEPS=`. lib/libovn.la && echo "$dependency_libs"` && \
>     LIBOPENVSWITCH_DEPS=`. 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib/libopenvswitch.la && echo 
> "$dependency_libs"` && \
>     cd northd/ovn_northd_ddlog && \
>     RUSTC='rustc' RUSTFLAGS="-L ../../lib/.libs -L 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib/.libs $LIBOPENVSWITCH_DEPS 
> $LIBOVN_DEPS -Awarnings -C opt-level=z" \
>         cargo build --release --verbose --lib --no-default-features 
> --features ovsdb
>     error: failed to run `rustc` to learn about target-specific information
> 
>     Caused by:
>       process didn't exit successfully: `rustc - --crate-name ___ 
> --print=file-names -L ../../lib/.libs -L 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib/.libs -lssl -lcrypto -lcap-ng 
> /mnt/alt_home/numans/workspace_cpp/ovs/lib/libopenvswitchavx512.la -lpthread 
> -lrt -lm -lunbound -lpthread -lrt -lm -lunbound -Awarnings -C opt-level=z 
> --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib 
> --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` 
> (exit code: 1)
>       --- stderr
>       error: multiple input filenames provided (first two filenames are `-` 
> and `/mnt/alt_home/numans/workspace_cpp/ovs/lib/libopenvswitchavx512.la`)
> 
>     make[1]: *** [Makefile:3527: 
> northd/ovn_northd_ddlog/target/release/libovn_northd_ddlog.la] Error 101
>     make[1]: Leaving directory '/mnt/alt_home/numans/workspace_cpp/ovn'
>     make: *** [Makefile:1401: all] Error 2
> 
> However, I tried this myself just now (on a laptop that does indeed have
> AVX512), and I can't see the failure.  Do you have any suggestions on
> what else I might need to cause it?

Hi Ben,

You need also check your version of binutils.  Assembler from some versions
of binutils (2.30 and 2.31) generates incorrect avx512 instructions, so OVS
disables build of avx512 code on these systems.  See OVS_CHECK_BINUTILS_AVX512
function in m4/openvswitch.m4.  Some distributions might have fix backported,
so OVS checks the actual behavior by compiling a reproducer.

To manually check if your binutils broken:

1. echo 'vpgatherqq 0x8(,%ymm1,1),%ymm0{%k2}' | as --64 -
2. objdump -d  --no-show-raw-insn a.out | grep vpgatherqq

Bad results:
   0:   vpgatherqq 0x1(,%ymm1,1),%ymm0{%k2}

Correct results:
   0:   vpgatherqq 0x8(,%ymm1,1),%ymm0{%k2}

Related bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to