scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.15k stars 1.53k forks source link

the workflow of "Tests (clang++-18, C++23, release, --enable-dpdk) fails due to dpdk build failure #2242

Closed tchaikov closed 1 month ago

tchaikov commented 1 month ago
[95/2455] Compiling C object lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o
FAILED: lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o 
/usr/lib/llvm-18/bin/clang -Ilib/net/libnet_crc_avx512_lib.a.p -Ilib/net -I../../../../../../dpdk/lib/net -I. -I../../../../../../dpdk -Iconfig -I../../../../../../dpdk/config -Ilib/eal/include -I../../../../../../dpdk/lib/eal/include -Ilib/eal/linux/include -I../../../../../../dpdk/lib/eal/linux/include -Ilib/eal/x86/include -I../../../../../../dpdk/lib/eal/x86/include -Ilib/eal/common -I../../../../../../dpdk/lib/eal/common -Ilib/eal -I../../../../../../dpdk/lib/eal -Ilib/kvargs -I../../../../../../dpdk/lib/kvargs -Ilib/metrics -I../../../../../../dpdk/lib/metrics -Ilib/telemetry -I../../../../../../dpdk/lib/telemetry -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-missing-field-initializers -D_GNU_SOURCE -Wno-error -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DCC_X86_64_SSE42_PCLMULQDQ_SUPPORT -DCC_X86_64_AVX512_VPCLMULQDQ_SUPPORT -mavx512f -mavx512bw -mavx512dq -mavx512vl -mvpclmulqdq -mavx2 -mavx -MD -MQ lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o -MF lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o.d -o lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o -c ../../../../../../dpdk/lib/net/net_crc_avx512.c
Error: ../../../../../../dpdk/lib/net/net_crc_avx512.c:324:22: error: always_inline function '_mm512_broadcast_i32x4' requires target feature 'evex512', but would be inlined into function 'crc32_load_init_constants' that is compiled without support for 'evex512'
  324 |         crc32_eth.rk1_rk2 = _mm512_broadcast_i32x4(a);
      |                             ^

there are more of similar failures where vector extensions are used, and we are not compiling with evex512 arch enabled.

avikivity commented 1 month ago

Likely due to some translation units compiled with -march=native and some not.

tchaikov commented 1 month ago

Likely due to some translation units compiled with -march=native and some not.

the building host is not able to execute AVX-10 instructions, so -march=native disables -mevex512. while the Clang used to build Seastar on the building host is able to emit AVX-10.512 instructions. so, when building intrinsics which require -mevex512 or equivalent options with -march=native, the compiler fails.

tchaikov commented 1 month ago

we can revert the fix of ba395a22e1951a1572be2a570092524d91996c67 if we can use clang 18.1.6. see https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.6

This patch fixes build failures when compiling AVX512 code using -march=native on machines without AVX512. The problem was introduced by https://github.com/llvm/llvm-project/commit/a7b8b890600a33e0c88d639f311f1d73ccb1c8d2 which is included in LLVM 18.1.5 release.