zoukankan      html  css  js  c++  java
  • vpp 编译netlink

    ln -s /root/vppsb/vppsb/router/router.mk  build-data/packages/router.mk
     ln -s /root/vppsb/vppsb/router/netlink.mk  build-data/packages/netlink.mk
     find ./ -name 'dpdk*'
      ln -s /root/vppsb/vppsb/router/ ./build-root/build-vpp_debug-native/external/router
     ln -s /root/vppsb/vppsb/netlink/ ./build-root/build-vpp_debug-native/external/netlink
     make build netlink router -j96
    编译后没有netlik router

      

    [root@localhost netlink]# libtoolize
    libtoolize: putting auxiliary files in `.'.
    libtoolize: linking file `./ltmain.sh'
    libtoolize: You should add the contents of the following files to `aclocal.m4':
    libtoolize:   `/usr/share/aclocal/libtool.m4'
    libtoolize:   `/usr/share/aclocal/ltoptions.m4'
    libtoolize:   `/usr/share/aclocal/ltversion.m4'
    libtoolize:   `/usr/share/aclocal/ltsugar.m4'
    libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
    libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
    libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
    libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    [root@localhost netlink]# 
    [root@localhost netlink]# 
    [root@localhost netlink]# aclocal
    [root@localhost netlink]# autoconf
    [root@localhost netlink]# automake --add-missing
    configure.ac:7: installing './compile'
    configure.ac:2: installing './config.guess'
    configure.ac:2: installing './config.sub'
    configure.ac:3: installing './install-sh'
    configure.ac:3: installing './missing'
    Makefile.am: installing './depcomp'
    [root@localhost netlink]# ls
    aclocal.m4      compile       config.sub  configure.ac  install-sh  LICENSE    Makefile.am  missing     README.md
    autom4te.cache  config.guess  configure   depcomp       librtnl     ltmain.sh  Makefile.in  netlink.mk  test
    [root@localhost netlink]# ./configure VPP_DIR=/root/vpp/vpp/
    checking build system type... aarch64-unknown-linux-gnu
    checking host system type... aarch64-unknown-linux-gnu
    checking how to print strings... printf
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s
    
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking for gawk... gawk
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking whether make supports nested variables... yes
    checking dependency style of gcc... gcc3
    checking dependency style of gcc... gcc3
    checking for gcc... (cached) gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking whether gcc and cc understand -c and -o together... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: executing libtool commands
    config.status: executing depfiles commands
    [root@localhost netlink]# 
    [root@localhost netlink]# make 
    depbase=`echo librtnl/netns.lo | sed 's|[^/]*$|.deps/&|;s|.lo$||'`;
    /bin/sh ./libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME="netlink" -DPACKAGE_TARNAME="netlink" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="netlink 1.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DPACKAGE="netlink" -DVERSION="1.0" -I.    -Wall -I. -g -O2 -MT librtnl/netns.lo -MD -MP -MF $depbase.Tpo -c -o librtnl/netns.lo librtnl/netns.c &&
    mv -f $depbase.Tpo $depbase.Plo
    libtool: compile:  gcc -DPACKAGE_NAME="netlink" -DPACKAGE_TARNAME="netlink" -DPACKAGE_VERSION="1.0" "-DPACKAGE_STRING="netlink 1.0"" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DPACKAGE="netlink" -DVERSION="1.0" -I. -Wall -I. -g -O2 -MT librtnl/netns.lo -MD -MP -MF librtnl/.deps/netns.Tpo -c librtnl/netns.c  -fPIC -DPIC -o librtnl/.libs/netns.o
    In file included from librtnl/netns.c:16:0:
    ./librtnl/netns.h:19:23: fatal error: vlib/vlib.h: No such file or directory
     #include <vlib/vlib.h>
                           ^
    compilation terminated.
    make: *** [librtnl/netns.lo] Error 1

    在vpp目录下查看

    [root@localhost vpp]# find ./ -name vlib.h
    ./src/vlib/vlib.h
    ./build-root/rpmbuild/vpp-20.01/src/vlib/vlib.h
    ./build-root/install-vpp_debug-native/vpp/include/vlib/vlib.h
    [root@localhost vpp]# 

     

    ln -s  /root/vpp/vpp/src/vlib/  /usr/include/vlib
    ln -s  /root/vpp/vpp/src/vppinfra /usr/include/vppinfra
    
    cp  /root/vpp/vpp/src/vppinfra/config.h.in /root/vpp/vpp/src/vppinfra/config.h
    cp  /root/vpp/vpp/src/vlib/config.h.in  /root/vpp/vpp/src/vlib/config.h

    编译仍然报错

    ln -s  /root/vpp/vpp/build-root/install-vpp_debug-native/vpp/include/vlib/ /usr/include/vlib

    ln -s  /root/vpp/vpp/build-root/install-vpp_debug-native/vpp/include/vppinfra /usr/include/vppinfra

    librtnl/mapper.c: At top level:
    librtnl/mapper.c:19:24: fatal error: vnet/ip/ip.h: No such file or directory
     #include <vnet/ip/ip.h>
                            ^
    compilation terminated.
    librtnl/netns.c: At top level:
    librtnl/netns.c:18:28: fatal error: vnet/ip/format.h: No such file or directory
     #include <vnet/ip/format.h>
                                ^
    compilation terminated.
    make: *** [test/test.lo] Error 1
    make: *** [librtnl/mapper.lo] Error 1
    make: *** [librtnl/netns.lo] Error 1
    [root@localhost netlink]# 

    https://blog.csdn.net/turbock/article/details/105076811

  • 相关阅读:
    序列化
    输入输出流——字符流部分
    输入输出流——字节流部分
    GitHub10岁之际HanLP自然语言处理包用户量跃居榜首
    hadoop大数据处理平台与案例
    dkhadoop的自然语言处理技术介绍
    hadoop大数据技术架构详解
    hadoop框架结构介绍
    Hadoop集群环境搭建步骤说明
    快速了解掌握中文自然语言处理
  • 原文地址:https://www.cnblogs.com/dream397/p/12753016.html
Copyright © 2011-2022 走看看