gcc9.4 编译 dpdk20.11.3 avx512 flag引发的编译错误

1、error

[root@centos7 dpdk-stable-20.11.3]# /usr/bin/ninja -C build
ninja: Entering directory `build'
[153/2474] Compiling C object lib/librte_net.a.p/librte_net_net_crc_avx512.c.o
FAILED: lib/librte_net.a.p/librte_net_net_crc_avx512.c.o
cc -Ilib/librte_net.a.p -Ilib -I../lib -Ilib/librte_net -I../lib/librte_net -I. -I.. -Iconfig -I../config -Ilib/librte_eal/include -I../lib/librte_eal/include -Ilib/librte_eal/linux/include -I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../lib/librte_eal/x86/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics -Ilib/librte_telemetry -I../lib/librte_telemetry -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wextra -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-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 -MD -MQ lib/librte_net.a.p/librte_net_net_crc_avx512.c.o -MF lib/librte_net.a.p/librte_net_net_crc_avx512.c.o.d -o lib/librte_net.a.p/librte_net_net_crc_avx512.c.o -c ../lib/librte_net/net_crc_avx512.c
/tmp/cc0UifR7.s: Assembler messages:
/tmp/cc0UifR7.s:69: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:70: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:74: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:75: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:79: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:80: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:84: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:85: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:96: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:97: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:104: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:105: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:109: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:110: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:111: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:113: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:416: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:417: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:421: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:422: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:426: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:427: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:431: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:432: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:443: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:444: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:451: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:452: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:456: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:457: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:458: Error: operand type mismatch for `vpclmulqdq'
/tmp/cc0UifR7.s:460: Error: operand type mismatch for `vpclmulqdq'
[218/2474] Compiling C object lib/librte_ethdev.a.p/librte_ethdev_rte_ethdev.c.o
ninja: build stopped: subcommand failed.

2、fixed
(1)remove avx512,使得相关的变量meson不去添加avx512的相关flags。
gcc9.4 编译 dpdk20.11.3 avx512 flag引发的编译错误_第1张图片

在这里插入图片描述
(2)未尝试过,在使用meson生成build.ninja中增加flags。添加额外的 -m flag。
在这里插入图片描述

你可能感兴趣的:(DPDK,DPDK,c语言)