问题描述
我正在尝试在KVM下运行的CentOS 6.4 VM中测试DPDK示例应用程序,但无法编译DPDK.
I am trying to test out the DPDK sample applications in a CentOS 6.4 VM running under KVM, but I can't get DPDK to compile.
尝试运行时
make install T=x86_64-default-linuxapp-gcc -n
从DPDK-2.0.0中,我得到以下输出:
from DPDK-2.0.0, I get the following output:
[...]
make S=lib/librte_eal/linuxapp -f /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/Makefile -C /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp all
[ -d /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio ] || mkdir -p /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio
echo "== Build lib/librte_eal/linuxapp/igb_uio"
make S=lib/librte_eal/linuxapp/igb_uio -f /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/Makefile -C /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio all
if [ ! -f igb_uio.c ]; then ln -nfs /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/igb_uio.c . ; fi
if [ ! -f Makefile ]; then ln -nfs /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/Makefile . ; fi
make -C /lib/modules/2.6.32-358.el6.x86_64/build M=/home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio O=/lib/modules/2.6.32-358.el6.x86_64/build \
CROSS_COMPILE=
make: *** /lib/modules/2.6.32-358.el6.x86_64/build: No such file or directory. Stop.
make[7]: *** [igb_uio.ko] Error 2
make[6]: *** [igb_uio] Error 2
make[5]: *** [linuxapp] Error 2
make[4]: *** [librte_eal] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_64-native-linuxapp-gcc_install] Error 2
make: *** [install] Error 2
我已经安装了此处指定的所有必需软件包:
I've installed all the required packages specified here:
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html
我已经在这里看到并尝试了解决方案:
and I've seen and attempted the solution here:
DPDK2-0.0和1.6.0均出现此问题.
The issue appears for both DPDK2-0.0 and 1.6.0.
此外,只是为了确保;正在运行
Also, just to make sure; running
ls /lib/modules/2.6.32-358.el6.x86_64/build
返回输出:
/lib/modules/2.6.32-358.el6.x86_64/build
因此目录肯定存在..
我设法在同一主机上的CentOS 6.6 KVM中编译DPDK,没有问题,但是这次我一直收到此错误.
I've managed to compile DPDK in a CentOS 6.6 KVM on the same host without issue, but this time around I keep getting this error.
不幸的是,它确实也必须是CentOS 6.4.
Also it does need to be CentOS 6.4, sadly.
更新:
在^上方添加了详细输出.
Added verbose output above ^
推荐答案
只需解决它:
我正在使用内核版本2.6.32-358.el6.x86_64,并且我不得不更新到版本2.6.32- 504.23.4 .el6.x86_64才能消除此错误.
I was using kernel version 2.6.32-358.el6.x86_64, and I had to update to version 2.6.32-504.23.4.el6.x86_64 to get rid of this error.
此外,在此之后,我遇到了另一个错误,其中包括该行
Additionally, I ran into another error after this which included the line
previous definition of ‘skb_set_hash’ was here
发生这种情况是因为我正在使用的DPDK版本(1.6)尝试2.0修复了该问题.
This happened because of an issue with the DPDK version I was using (1.6) Trying 2.0 fixed this.
然后,当运行setup.sh脚本中与模块相关的任何选项时,出现以下错误:
Then I got the following error when running any of the module-related options of the setup.sh script:
Traceback (most recent call last):
File "tools/dpdk_nic_bind.py", line 536, in <module>
main()
File "tools/dpdk_nic_bind.py", line 532, in main
get_nic_details()
File "tools/dpdk_nic_bind.py", line 225, in get_nic_details
dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
File "tools/dpdk_nic_bind.py", line 120, in check_output
stderr=stderr).communicate()[0]
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
此错误是因为我没有安装pciutils并且脚本找不到lspci.
THIS error was because I didn't have pciutils installed and the script couldn't find lspci.
希望这可以帮助其他遇到相同问题的人.
Hope this helps anyone else with the same issues.
这篇关于生成igb_uio时出现DPDK编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!