由于安装p4factory的步骤需要OF的支持,我需要下载p4的行为模型BMV2;

thrift是支持BMV2的软件框架;nanomsg是一个实现了几种“可扩展协议”的高性能通信库,可扩展协议的任务是定义多个应用系统如何通信,从而组成一个大的分布式系统。

nnpy 是 nanomsg 的 Python 语言实现版本,基于 CFFI。

安装thrift

首先都是Git clone下来,具体操作是先fork到自己的仓库,再在自己的仓库复制下载链接。

Git thrift

If you are building from the first time out of the source repository, you will need to generate the configure scripts. (This is not necessary if you downloaded a tarball.) From the top directory, do:

./bootstrap.sh

形成配置文件。

Once the configure scripts are generated, thrift can be configured. From the top directory, do:

./configure

You may need to specify the location of the boost files explicitly. If you installed boost in /usr/local, you would run configure as follows:

./configure --with-boost=/usr/local

指定boost文件位置。

Note that by default the thrift C++ library is typically built with debugging symbols included. If you want to customize these options you should use the CXXFLAGS option in configure, as such:

./configure CXXFLAGS='-g -O2'
./configure CFLAGS='-g -O2'
./configure CPPFLAGS='-DDEBUG_MY_FEATURE'

貌似是更改 thrift C++库 的头文件,不是必选。

To enable gcov required options -fprofile-arcs -ftest-coverage enable them:

./configure  --enable-coverage

开启gcov支持的选项

有问题可以执行:./configure --help

Please be aware that the Python library will ignore the --prefix option and just install wherever Python's distutils puts it (usually along the lines of /usr/lib/pythonX.Y/site-packages/). If you need to control where the Python modules are installed, set the PY_PREFIX variable. (DESTDIR is respected for Python and C++.)

大意是,python库会默认忽略--prefix选项,不管python的distutils模块在哪里安装都会进行,如果想要控制python模型安装的位置,要设置PY_PREFIX变量。

Make thrift:

make

From the top directory, become superuser and do:

make install

Test

There are a large number of client library tests that can all be run from the top-level directory.

make -k check

This will make all of the libraries (as necessary), and run through the unit tests defined in each of the client libraries. If a single language fails, the make check will continue on and provide a synopsis at the end.

跑客户端库的例子,最后会提供make信息。

To run the cross-language test suite, please run:

make cross

This will run a set of tests that use different language clients and servers.

交叉语言环境测试。

安装nanomsg

Git nanomsg

这个安装比较简单,按照步骤来就好。

Go to the root directory of the local source repository.
To perform an out-of-source build, run:
mkdir build
cd build
cmake ..
(You can add -DCMAKE_INSTALL_PREFIX=/usr/local or some other directory.)
cmake --build .
ctest -C Debug .
cmake --build . --target install
NB: This may have to be done as a privileged user. (Linux only)
ldconfig
(As a privileged or root user.)

安装nnpy

Git nnpy

clone完之后进入nnpy目录。

$ sudo pip install .

2016/9/25

P4行为模型BMV2依赖关系安装:thrift nanomsg nnpy安装的更多相关文章

  1. P4行为模型BMV2安装

    前提:依赖关系请移步上篇博客.P4行为模型BMV2依赖关系安装:thrift nanomsg nnpy安装 以及,要把下面这些东西装好. On Ubuntu 14.04, the following ...

  2. linux(ubuntu) 安装composer(PHP用来管理依赖关系的工具 ) 和安装中国全量镜像

    https://www.phpcomposer.com/  composer中文网 1:进入安装目录   cd /usr/local/bin 2:下载并安装     sudo curl -s http ...

  3. 解决安装rpm包依赖关系的烦恼 - yum工具介绍及本地源配置方法

    版权声明:本文发布于http://www.cnblogs.com/yumiko/,版权由Yumiko_sunny所有,欢迎转载.转载时,请在文章明显位置注明原文链接.若在未经作者同意的情况下,将本文内 ...

  4. Linux系统手动安装rpm包依赖关系分析(以Kernel升级为例)

    有在Linux系统中安装软件的经历的人都知道,在Linux系统中手动安装软件不想在Windows下安装软件那么方便,直接双击,然后下一步下一步就可以把软件成功的装入到系统中,而在Linux系统中,安装 ...

  5. 保姆级别的RabbitMQ教程!一看就懂!(有安装教程,送安装需要的依赖包,送Java、Golang两种客户端教学Case)

    保姆级别的RabbitMQ教程!一看就懂!(有安装教程,送安装需要的依赖包,送Java.Golang两种客户端教学Case)   目录 什么是AMQP 和 JMS? 常见的MQ产品 安装RabbitM ...

  6. 阿里云ECS服务器 java JDK安装和配置 mysql安装和配置

    最近配置了一下阿里云ecs服务的服务器环境,主要对java jdk环境的安装和配置,以及数据库mysql的安装和配置,趁着热乎,记录一下! 服务器用的系统是ubuntu_16_04_64的,版本16. ...

  7. windows 如何将安装Anaconda之前已经安装的python版本(中已安装的库)移动到 Anaconda中

    题目]如何将安装Anaconda之前已经安装的python版本(中已安装的库)移动到 Anaconda中 一.概述 之前安装tensorflow的安装了anaconda并用它进行安装,anaconda ...

  8. Ubuntu安装SSH服务器故障分析及解决办法(错误1:E:软件包 openssh-server 还没有可供安装的候选者,错误2:E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系)

    •    微博: 小样儿老师2015 Windows下做Linux开发需要SSH强大功能的支持.安装SSH的过程会出现了很多问题,看完这篇文章可以让你少走些弯路,PS:折腾一下午的成果. Ubuntu ...

  9. Mint Linux 安装 DotnetCore 遭遇无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系

    evlon@evlon-ThinkPad-T530 ~ $ apt install dotnet-dev-1.0.0-preview2-003121 正在读取软件包列表... 完成 正在分析软件包的依 ...

随机推荐

  1. Web Service \restful web services\WCF Service\ServiceStack

    http://www.cnblogs.com/jfzhu/p/4025448.html http://www.cnblogs.com/jfzhu/p/4022139.html#3043243

  2. qq邮箱邮我组件

    http://openmail.qq.com/cgi-bin/qm_help_mailme?sid=uvkgSu7e0aOrc0Qc&t=open_mailme 邮我 使用"邮我&q ...

  3. Codeforces 675E Trains and Statistic(DP + 贪心 + 线段树)

    题目大概说有n(<=10W)个车站,每个车站i卖到车站i+1...a[i]的票,p[i][j]表示从车站i到车站j所需买的最少车票数,求所有的p[i][j](i<j)的和. 好难,不会写. ...

  4. HDU3157 Crazy Circuits(有源汇流量有上下界网络的最小流)

    题目大概给一个电路,电路上有n+2个结点,其中有两个分别是电源和负载,结点们由m个单向的部件相连,每个部件都有最少需要的电流,求使整个电路运转需要的最少电流. 容量网络的构建很容易,建好后就是一个有源 ...

  5. Eclipse: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

    Link: http://stackoverflow.com/questions/22756153/the-superclass-javax-servlet-http-httpservlet-was- ...

  6. flex设置成1和auto有什么区别

    首先明确一点是, flex 是 flex-grow.flex-shrink.flex-basis的缩写.故其取值可以考虑以下情况: flex 的默认值是以上三个属性值的组合.假设以上三个属性同样取默认 ...

  7. ACM: 强化训练-Inversion Sequence-线段树 or STL·vector

    Inversion Sequence Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%lld & %llu D ...

  8. HDU-敌兵布阵

    Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了.A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任 ...

  9. js中的this关键字详解

    this是Javascript语言的一个关键字. 它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用.比如, 复制代码 代码如下: function test(){ this.x = 1; ...

  10. osg中遇到的问题

    osg中遇到的问题 今天写程序的时候, 需要把键盘和鼠标消息转发出来, 就直接写了接口用signal丢出来了. 程序写的很多, 测试的时候却崩溃了.... 在场景中拖拽鼠标左键的时候, 会发现在扔出鼠 ...