【发布时间】:2021-03-26 16:59:28
【问题描述】:
通过带有选项-Dexamples= 的DPDK 介子构建示例应用程序skeleton 或l2fwd 或l3fwd,创建二进制可执行文件而不会出现任何警告或错误。但是执行与独立构建相同的示例会导致 DPDK 构建错误
C:\dpdk\dpdk-21.02\examples\skeleton>gcc basicfwd.c -include rte_config.h -march=native -IC:/include -Wl,--as-needed -LC:/lib -lrte_cfgfile -lrte_hash -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs
In file included from C:/include/rte_eal.h:21,
from basicfwd.c:7:
C:/include/rte_bus.h:22:10: fatal error: sys/queue.h: No such file or directory
#include <sys/queue.h>
^~~~~~~~~~~~~
compilation terminated.
期望:
C:\dpdk\dpdk-21.02\examples\skeleton>dir
Directory of C:\dpdk\dpdk-21.02\examples\skeleton
<DIR> .
<DIR> ..
163,348 a.exe
5,458 basicfwd.c
1,511 Makefile
322 meson.build
重现错误的步骤
- 平台:x86_64,Intel E5 2680 Xeon
- 操作系统:windows server 2019
- DPDK 版本:21.02
- 介子版本:0.57.1
- 忍者版本:1.10.2
- 包配置版本:0.26
- 后续步骤:http://doc.dpdk.org/guides/windows_gsg/index.html
- 编译器标志:执行
pkg-config --cflags --libs libdpdk
【问题讨论】:
-
@stackinside 感谢您的建议,发现包含缺失。通过添加缺少的内容,我们能够创建二进制文件,正如问题中所解释的,“为什么使用
pkg-config --cflags --libs libdpdk的独立二进制编译不会生成正确的标志为meson -Dexamples=[application] build
标签: windows compilation dpdk