dpdk编译问题

下载了最新的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: 
                        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

你可能感兴趣的:(dpdk)