vpp之源码编译

服务器系统

[ych@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

$uname -a
Linux air5005 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

下载vpp

git clone https://gerrit.fd.io/r/vpp
cd vpp

编译vpp文档

使用virtualenv虚拟环境,编译vpp文件
1.virtualenv虚拟环境安装:

$ sudo python -m pip install --user virtualenv 
$ sudo python -m virtualenv env
$ sudo source env/bin/activate
$ sudo pip install -r docs/etc/requirements.txt

pip install -r docs/etc/requirements.txt的时候,如果出现某个软件安装失败,
需要手动安装:
Cannot uninstall ‘pyparsing’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

下面软件是安装时候出现异常,需要手动安装的

sudo pip install -I pyparsing==2.3.0
sudo pip install -I packaging==18.0
sudo pip install -I requests==2.21.0

2.编译html文件

(env) [ych@localhost vpp]$ cd docs/
(env) [ych@localhost docs]$ 
(env) [ych@localhost docs]$ make html
Running Sphinx v1.8.2
/usr/lib/python2.7/site-packages/sphinx/util/requests.py:72: UserWarning: Some links may return broken results due to being unable to check the Server Name Indication (SNI) in the returned SSL cert against the hostname in the url requested. Recommended to install requests-2.4.1+.
  'Some links may return broken results due to being unable to '
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 248 source files that are out of date
updating environment: 248 added, 0 changed, 0 removed
reading sources... [100%] usecases/vmxnet3                                                                                                                                                                        
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] usecases/vmxnet3                                                                                                                                                                         
generating indices... genindex
writing additional pages... search
copying images... [100%] _images/fib20fig6.png                                                                                                                                                                    
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.

在这里插入图片描述

编译vpp

# if vpp<08.10
make install-dep
make bootstrap
make build        # or `make build-release`

# vpp 08.10+ (cmake)
make install-dep
make install-ext-deps
make build        # or `make build-release`

make install-dep和 install-ext-deps主要是安装编译需要的依赖库
make build 编译出来的版本包含了调试符号,可用于调试debug用
make build-release 编译已经发布出来的版本,进过了优化,不会创建任何调试符号

猜你喜欢

转载自blog.csdn.net/yaochuh/article/details/88758101