由于安装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. TCP/IP详解2 学习笔记---mbuf

    1,mbuf就是存储要发送数据的memery buf,类似于skb_buf.不过结构比较简单. /* header at beginning of each mbuf: */ 这个结构用来描述mbuf ...

  2. Java NIO示例:多人网络聊天室

    一个多客户端聊天室,支持多客户端聊天,有如下功能: 功能1: 客户端通过Java NIO连接到服务端,支持多客户端的连接 功能2:客户端初次连接时,服务端提示输入昵称,如果昵称已经有人使用,提示重新输 ...

  3. js公有、私有、静态属性和方法的区别

          现下,javascript大行其道,对于网站开发人员来说,javascript是必需掌据的一门语言,但随着jquery等框架的流行和使用,许多人对于原生javascript缺乏深入的理解, ...

  4. 安装和配置Tomcat

    今天第一个技术难题,说难也不难,被鄙视的彻彻底底. 理解上的问题纠正:Xftp里面我们看到的只是自己电脑上和所连接服务器里面的文件,集群里面有master  服务器和slaves 服务器 ,一个Nam ...

  5. sqlserver中创建链接服务器

    链接服务器在跨数据库/跨服务器查询时非常有用(比如分布式数据库系统中),本文将以图文方式详细说明如何利用SQL Server Management Studio在图形界面下创建链接服务器.     1 ...

  6. BZOJ2758 : [SCOI2012]Blinker的噩梦

    首先将包含关系建树. 方法是将每个图形拆成上半边和下半边,从左往右扫描线,用Splay从下到上维护扫描线上所有图形. 每次加入一个新的图形$x$的时候,看看它下方第一个图形$y$,如果$y$是上半边, ...

  7. 【转】SpringTest框架JUnit单元测试用例获取ApplicationContext实例的方法

    转自:http://www.coderli.com/junit-spring-test-applicationcontext JUnit单元测试用例中使用Spring框架,直接方式如下. @RunWi ...

  8. POJ 3276 (开关问题)

    题目链接: http://poj.org/problem?id=3276 题目大意:有一些牛,头要么朝前要么朝后,现在要求确定一个连续反转牛头的区间K,使得所有牛都朝前,且反转次数m尽可能小. 解题思 ...

  9. 20145304 Java第六周学习报告

    20145304<Java程序设计>第六周学习总结 教材学习内容总结 1.InputStream与OutputStream: 在Java中,输入串流的代表对象为java.io.InputS ...

  10. 在Linux中安装Tomcat

    带Linux的虚拟机中安装Tomcat 一.从官方网站上下载tomcat软件包.http://tomcat.apache.org/ apache-tomcat-7.0.33.tar.gz 二.下载到本 ...