由于安装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. 17996 Daily Cool Run (dp)

    时间限制:1000MS  内存限制:65535K 提交次数:0 通过次数:0 题型: 编程题   语言: 不限定 Description Daily Cool Run is a popular gam ...

  2. hdu 1059 Dividing

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission( ...

  3. 实现点击不同的按钮加载不同的css

    这段时间做一个小网站发现有时候特别需要点击不同的按钮去加载不同的css,这样可以确定点击的是哪个,由于每个按钮都是从后端数据库加载过来的,不仅是简简单单的用id或者是类名,用过this也不行: 前端加 ...

  4. POJ3686 The Windy's(最小费用最大流)

    题目大概说要用m个工厂生产n个玩具,第i个玩具在第j个工厂生产要Zij的时间,一个工厂同一时间只能生成一个玩具,问最少的用时. 这题建的图不是很直观.. 源点向玩具连容量1费用0的边 将每个工厂拆成n ...

  5. POJ1815 Friendship(字典序最小最小割割边集)

    看了题解.当时也觉得用邻接矩阵挺好写的,直接memset:然而邻接矩阵不懂得改,于是就放开那个模板,写了Dinic.. 方法是,按字典序枚举每一条满流的边,然后令其容量减1,如果最大流改变了,这条边就 ...

  6. apache activemq 学习笔记

    0.activemq的概念 activemq实现了jms(java Message server),用于接收,发送,处理消息的开源消息总线. 1.activemq和jms的区别 jms说白了就是jav ...

  7. HDU 2851 (最短路)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2851 题目大意:给出N条路径,M个终点(是路径的编号) .重合的路径才算连通的,且路径是单向的.每条路 ...

  8. 【POJ】1739 Tony's Tour

    http://poj.org/problem?id=1739 题意:n×m的棋盘,'#'是障碍,'.'是空白,求左下角走到右下角且走过所有空白格子的方案数.(n,m<=8) #include & ...

  9. BZOJ4517: [Sdoi2016]排列计数

    Description 求有多少种长度为 n 的序列 A,满足以下条件: 1 ~ n 这 n 个数在序列中各出现了一次 若第 i 个数 A[i] 的值为 i,则称 i 是稳定的.序列恰好有 m 个数是 ...

  10. 在 Excel 工作簿中定义决策表(Oracle Policy Modeling-Define decision tables in Excel workbooks)

    要在 Excel 中编写规则,您只需在表中编写规则,并使用 Oracle Policy Modeling 样式标识单元格中的信息类型, 以便这些规则可以编译并在 Oracle Determinatio ...