由于安装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. 学习 Message(5): 关于 TApplicationEvents.OnMessage 的第二个参数 可以屏蔽 TWebBrowser右键菜单:

    http://www.cnblogs.com/del/archive/2008/10/25/1319318.html TApplicationEvents.OnMessage 的第二个参数 Handl ...

  2. https://www.nginx.com/blog/introduction-to-microservices/

    https://www.nginx.com/blog/introduction-to-microservices/

  3. MySql 查询数据库中所有表名

    查询数据库中所有表名select table_name from information_schema.tables where table_schema='csdb' and table_type= ...

  4. BestCoder Round #66 (div.2)

    构造 1002 GTW likes gt 题意:中文题面 分析:照着题解做的,我们可以倒着做,记一下最大值,如果遇到了修改操作,就把最大值减1,然后判断一下这个人会不会被消灭掉,然后再更新一下最大值. ...

  5. underscore.js依赖库函数分析一(遍历)

    Underscore简介: underscore是一个非常简洁,实用的javascript库,和jQuery封装类型差不多,但underscore是backbone的依赖 库,想运行backbone就 ...

  6. WPF学习笔记(3):Path绘制命令zz

    WPF的XAML提供了一系列功能强大.用法复杂的 mini-language 来描述可扩展应用程序标记语言 (XAML) 中的几何路径.如下所示: XAML <Canvas>   < ...

  7. ural 1250. Sea Burial

    1250. Sea Burial Time limit: 1.0 secondMemory limit: 64 MB There is Archipelago in the middle of a s ...

  8. Storm命令详解

    在Linux终端直接输入storm,不带任何参数信息,或者输入storm help,可以查看storm命令行客户端(Command line client)提供的帮助信息.Storm 0.9.0.1版 ...

  9. Leetcode Partition List

    Given a linked list and a value x, partition it such that all nodes less than x come before nodes gr ...

  10. 洛谷 P1033 自由落体 Label:模拟&&非学习区警告

    题目描述 在高为 H 的天花板上有 n 个小球,体积不计,位置分别为 0,1,2,….n-1.在地面上有一个小车(长为 L,高为 K,距原点距离为 S1).已知小球下落距离计算公式为 d=1/2*g* ...