Hi Bruce, The issue has been fixed after I upgrade binutis to 2.38, thanks a lot.
Regards, Haifeng -----邮件原件----- 发件人: Bruce Richardson <bruce.richard...@intel.com> 发送时间: 2023年3月21日 19:54 收件人: h...@netitest.com 抄送: dev@dpdk.org 主题: Re: build dpdk error by gcc 8.4.0 On Tue, Mar 21, 2023 at 03:13:14PM +0800, h...@netitest.com wrote: > Hi Dev, > > When I build dpdk on CentOS7.9 and GCC 8.4.0, it throw “operand type > mismatch for `vpclmulqdq'”, how can I fix this? > > FAILED: lib/net/libnet_crc_avx512_lib.a.p/net_crc_avx512.c.o > ccache cc -Ilib/net/libnet_crc_avx512_lib.a.p -Ilib/net -I../lib/net -I. > -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include > -Ilib/eal/linux/include -I../lib/eal/linux/include > -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common > -I../lib/eal/common -Ilib/eal -I.. > /lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/metrics -I../lib/metrics > -Ilib/telemetry -I../lib/telemetry -fdiagnostics-color=always -pipe > -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-packed-not-aligned > -Wno-missing-field-initializers -D_GNU_SOURCE -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 > ../lib/net/net_crc_avx512.c {standard input}: Assembler messages: > {standard input}:66: 错误:operand type mismatch for `vpclmulqdq' > The assembler generally comes from the binutils package rather than with gcc, so it could be a mismatch between new compiler and older assembler. You could try getting a newer copy of binutils and see if that fixes it. Alternatively, you can just try building with a target instruction set which does not include vpcmulqdq (unless you need the code that uses that instruction). Try configuring a build with "-Dcpu_instruction_set=skylake-avx512", and see if that works. According to the man page for gcc, that should give you AVX512 support, but not the problematic instruction. /Bruce