dpdk编译问题

在尝试编译DPDK 17.08.1时遇到错误,make过程中提示'/lib/modules/3.10.0-693.11.6.el7.x86_64/build'不存在。发现该路径应为软链接到'/usr/src/kernels/3.10.0-693.11.6.el7.x86_64',但该目录实际不存在。解决方案是通过创建软链接指向已存在的kernel版本目录,如将3.10.0-693.17.1.el7.x86_64链接到3.10.0-693.11.6.el7.x86_64。若kernel版本不同,需根据实际情况调整。

下载了最新的dpdk dpdk-17.08.1,编译出现一个小问题

[root@test5 dpdk-stable-17.08.1]# make config help
No template specified. Use 'make defconfig' or use T=template from the following list:
  arm-armv7a-linuxapp-gcc
  arm64-armv8a-linuxapp-clang
  arm64-armv8a-linuxapp-gcc
  arm64-dpaa2-linuxapp-gcc
  arm64-thunderx-linuxapp-gcc
  arm64-xgene1-linuxapp-gcc
  i686-native-linuxapp-gcc
  i686-native-linuxapp-icc
  ppc_64-power8-linuxapp-gcc
  x86_64-native-bsdapp-clang
  x86_64-native-bsdapp-gcc
  x86_64-native-linuxapp-clang
  x86_64-native-linuxapp-gcc
  x86_64-native-linuxapp-icc
  x86_x32-native-linuxapp-gcc
Basic build
        make defconfig && make
        or
        make config T=x86_64-native-linuxapp-gcc && make
Build commands
        config           get configuration from target template (T=)
        defconfig        auto-select target template based on arch, OS, etc.
        all              same as build (default rule)
        build            build in a configured directory
        clean            remove files but keep configuration
        install T=       configure, build and install a target in DESTDIR
        install          install optionally staged in DESTDIR
        examples         build examples for given targets (T=)
        examples_clean   clean examples for given targets (T=)
        test             compile tests and run basic unit tests
        test-*           run specific subset of unit tests
        tags|etags|gtags generate tags database for given targets (T=)
        cscope           generate cscope database for given targets (T=)
Build variables
        EXTRA_CPPFLAGS   preprocessor options
        EXTRA_CFLAGS     compiler options
        EXTRA_LDFLAGS    linker options
        EXTRA_LDLIBS     linker library options
        RTE_KERNELDIR    linux headers path
        RTE_DEVEL_BUILD  stricter options (default: y in git tree)
        CROSS     toolchain prefix
        V         verbose
        D         debug dependencies
        O         build directory (default: build/ - install T= default: ./)
        DESTDIR   staging install directory (default: empty)
        prefix    root install directory (default: /usr/local)
        T         target template - used with config or install
                        format: <arch-machine-execenv-toolchain>
                        templates in config/defconfig_*
                                arm-armv7a-linuxapp-gcc
                                arm64-armv8a-linuxapp-clang
                                arm64-armv8a-linuxapp-gcc
                                arm64-dpaa2-linuxapp-gcc
                                arm64-thunderx-linuxapp-gcc
                                arm64-xgene1-linuxapp-gcc
                                i686-native-linuxapp-gcc
                                i686-native-linuxapp-icc
                                ppc_64-power8-linuxapp-gcc
                                x86_64-native-bsdapp-clang
                                x86_64-native-bsdapp-gcc
                                x86_64-native-linuxapp-clang
                                x86_64-native-linuxapp-gcc
                                x86_64-native-linuxapp-icc
                                x86_x32-native-linuxapp-gcc

然后make,出现这个错误。
== Build lib/librte_eal/linuxapp/igb_uio
make: * /lib/modules/3.10.0-693.11.6.el7.x86_64/build: No such file or directory. Stop.
make[5]: * [igb_uio.ko] Error 2
make[4]: * [igb_uio] Error 2
make[3]: * [linuxapp] Error 2
make[2]: * [librte_eal] Error 2
make[1]: * [lib] Error 2
make: * [all] Error 2

出现在这个错误后,发现
/lib/modules/3.10.0-693.11.6.el7.x86_64/build 是/usr/src/kernels/3.10.0-693.11.6.el7.x86_64的软连接

lrwxrwxrwx. 1 root root 43 Jan 9 16:10 build -> /usr/src/kernels/3.10.0-693.11.6.el7.x86_64
有个rpm包需要安装

 yum install kernel-devel
# ls /usr/src/kernels/    
3.10.0-693.17.1.el7.x86_64

但是3.10.0-693.11.6.el7.x86_64这个目录还是不存在?
可以升级kernel,最简单的方法是创建一个软链接
cd /usr/src/kernels
ln -s /usr/src/kernels/3.10.0-693.17.1.el7.x86_64/ 3.10.0-693.11.6.el7.x86_64

当然,上面编译过程和我的版本有关,如果不一致,还需要修改

# uname -a
Linux test5 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值