参考:

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. 什么是ASCII

    以下内容是从百度百科学的 1)ASCII(American Standard Code for Information Interchange:美国信息交换标准代码) 2)产生原因 在计算机中,所有的 ...

  2. django -- 修改admin 密码问题

    1.python manage.py shell 2.from django.contrib.auth.models import User 3.user=User.objects.get(usern ...

  3. GoldenGate 12.3发布

    新特性: oracle db1. 支持12.2 oracle db2. 支持微服务架构, 可以使用restful api 管理OGG3. Parallel replicat,性能比integrated ...

  4. Let's Encrypt申请证书及使用

    Let's Encrypt是一个免费的.自动的,开放的CA. 形形色色有证书扩展名和类型,我是通过这篇文章明白个大体的:http://www.cnblogs.com/guogangj/p/411860 ...

  5. Linux下的Jmeter运行测试

    本文主要介绍Jmeter脚本如何在Linux通过no GUI的方式运行.总共分三部分: 1.Linux下JDK的安装及环境变量的配置 2.Linux下Jmeter的安装及环境变量的配置 3.运行结果的 ...

  6. pat 团体赛练习题集 L2-008. 最长对称子串

    对给定的字符串,本题要求你输出最长对称子串的长度.例如,给定"Is PAT&TAP symmetric?",最长对称子串为"s PAT&TAP s&quo ...

  7. shell 多行注释 块注释

    转自 https://www.cnblogs.com/emanlee/p/3749911.html 1 : ' 被注释的多行内容 ' 2 :<<eof 被注释的多行内容 eof 3 :&l ...

  8. JavaScript之BOM对象

    JavaScript bom对象 BOM对象 window对象 所有浏览器都支持 window 对象.概念上讲.一个html文档对应一个window对象.功能上讲: 控制浏览器窗口的.使用上讲: wi ...

  9. P2147 [SDOI2008]洞穴勘测(LCT)

    P2147 [SDOI2008]洞穴勘测 裸的LCT. #include<iostream> #include<cstdio> #include<cstring> ...

  10. Windows环境下ELK平台的搭建

    .背景 日志主要包括系统日志.应用程序日志和安全日志.系统运维和开发人员可以通过日志了解服务器软硬件信息.检查配置过程中的错误及错误发生的原因.经常分析日志可以了解服务器的负荷,性能安全性,从而及时采 ...