参考:

Github p4c README

Ubuntu14.04下 安装p4c

这里提供一个直接安装p4c的脚本:install_p4c.sh

1.git clone下来p4c:

$ git clone --recursive https://github.com/p4lang/p4c.git

注意, 如果没有使用--recursive, 则需要再将submodule clone下来:

[option] $ git submodule update --init --recursive

2.安装依赖:

依赖(原文):

  • A C++11 compiler. GCC 4.9 or later or Clang 3.3 or later is required.
  • git for version control
  • GNU autotools for the build process
  • CMake 3.0.2 or higher
  • Boehm-Weiser garbage-collector C++ library
  • GNU Bison and Flex for the parser and lexical analyzer generators.
  • Google Protocol Buffers 3.0 for control plane API generation
  • GNU multiple precision library GMP
  • C++ boost library (minimally used)
  • Python 2.7 for scripting and running tests
  • Optional: Documentation generation (enabled when configuring with --enable-doxygen-doc) requires Doxygen (1.8.10 or higher) and Graphviz (2.38.0 or higher).
$ sudo apt-get install g++ git automake libtool libgc-dev bison flex libfl-dev libgmp-dev libboost-dev libboost-iostreams-dev pkg-config python python-scapy python-ipaddr tcpdump cmake

可选, 用于生成文档:

[option] $ sudo apt-get install -y doxygen graphviz texlive-full

GCC4.9升级方法: ubuntu 14.04 更新 gcc/g++ 4.9.2

安装protobuf: Ubuntu 14.04 下 安装Protocol Buffers

更新cmake: Ubuntu14.04下 升级 cmake

3.构建:

$ mkdir build
$ cd build
$ cmake .. [-DCMAKE_BUILD_TYPE=RELEASE|DEBUG] [-DCMAKE_INSTALL_PREFIX=<path>] [-DENABLE_DOCS=ON (default off)] [-DENABLE_P4RUNTIME_TO_PD=OFF (default on)]
$ make -j4
$ make -j4 check

4.安装:

$ sudo make install

2017.9

Ubuntu14.04下 安装p4c的更多相关文章

  1. Ubuntu14.04下安装Hadoop2.5.1 (单机模式)

    本文地址:http://www.cnblogs.com/archimedes/p/hadoop-standalone-mode.html,转载请注明源地址. 欢迎关注我的个人博客:www.wuyudo ...

  2. 二、Ubuntu14.04下安装Hadoop2.4.0 (伪分布模式)

    在Ubuntu14.04下安装Hadoop2.4.0 (单机模式)基础上配置 一.配置core-site.xml /usr/local/hadoop/etc/hadoop/core-site.xml ...

  3. Ubuntu14.04下安装Flash Player

    Ubuntu14.04下安装Flash Player youhaidong@youhaidong:~$ sudo apt-get install flashplugin-nonfree [sudo] ...

  4. Ubuntu14.04下安装Libsvm,并使用Libsvm

    (1)Ubuntu14.04下安装Libsvm 转载:https://blog.csdn.net/katrinawj/article/details/78915874 一.下载: 网址:http:// ...

  5. ubuntu14.04下安装ffmpeg

    ubuntu14.04下安装ffmpeg 一.安装各种依赖包 1.yasm(libx264需要依赖yasm) sudo apt-get install yasm 2.libx264 sudo apt- ...

  6. ubuntu14.04下安装cudnn5.1.3,opencv3.0,编译caffe及配置matlab和python接口过程记录

    已有条件: ubuntu14.04+cuda7.5+anaconda2(即python2.7)+matlabR2014a 上述已经装好了,开始搭建caffe环境. 1. 装cudnn5.1.3,参照: ...

  7. 在Ubuntu14.04下安装Docker CE(1) - repository篇

    从2017年3月开始,Docker开始分为社区版本和企业版,也就是Docker CE和Docker EE, 原来Ubuntu14.04下,通过sudo apt-get install docker.i ...

  8. ubuntu14.04下安装爬虫工具scrapy

    scrapy是目前准备要学习的爬虫框架,其在ubuntu14.04下的安装过程如下: ubuntu14.04下默认安装了2.7的python以及setuptools,若未安装,可通过下面指令安装: s ...

  9. ubuntu14.04 下安装有道词典

    安装步骤 1.ubuntu14.04.1版本下是不能直接安装有道词典的,首先需要把14.04.版升级为14.04.2版. 在终端窗口中输入以下命令: sudo apt-get update sudo ...

随机推荐

  1. 蒙特卡洛(Monte Carlo)法求定积分

    https://blog.csdn.net/baimafujinji/article/details/53869358

  2. python练习:一行搞定-统计一句话中每个单词出现的个数

    一行搞定-统计一句话中每个单词出现的个数 >>> s'i am a boy a bood boy a bad boy' 方式一:>>> dict([(i,s.spl ...

  3. There is no session with id XXX

    系统采用 shiro + redis + spring来做的权限控制系统.   登录时报 there is no session with XXX 跟踪断点发现,系统查询session时,查不到red ...

  4. CSR8670的A2DP与AVRCP的应用笔记

    1. A2DP1.1. 基本概念阅读A2DP SPEC V12的1.1章,可知: Advanced Audio Distribution Profile(A2DP)典型应用是立体声音乐播放器的音乐到耳 ...

  5. nodejs核心技术

    一.知识结构: http模块:配置简单 的web服务,npm/cnpm工具 express框架:express中间件进行服务配置:路由:请求处理: DB服务:学习使用mysql关系型数据库: web接 ...

  6. vue生产环境清除console.log

    npm run build 后的生产环境的代码,会有很多开发时留下的console.log(),不可能每个页面不停地删除 在build/webpack.prod.conf.js文件里加上这样一段代码即 ...

  7. python初学者必看的学习路线

    Python是近几年比较火的编程语言之一,因为人工智能的火爆,让很多人都想从事python开发.很多零基础学员在学习python的时候都会走一些弯路,下面小编就为大家分享python学习路线图,帮助零 ...

  8. 怎样从外网访问内网php-fpm?

    本地安装了一个php-fpm,只能在局域网内访问,怎样从外网也能访问到本地的php-fpm呢?本文将介绍具体的实现步骤. 准备工作 安装并启动php-fpm 默认安装的php-fpm端口是9000. ...

  9. sqlalchemy多对多查询

    # coding:utf-8 from sqlalchemy import create_engine, Column, String, Integer, ForeignKey, Table from ...

  10. Eureka-zookeeper的服务发现替代方案

    参考: https://my.oschina.net/thinwonton/blog/1622905 http://www.open-open.com/lib/view/open14269407225 ...