注:此为2017年5月份的安装方法,最新的p4c安装方法见: Ubuntu14.04下 安装p4c

参考:

p4c README

Ubuntu 14.04 下 P4v16编译器 p4c的安装

系统要求

Ubuntu 14.04, 64bit

依赖安装

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

Documentation building:

sudo apt-get install -y doxygen graphviz texlive-full

Google Protobuf: Ubuntu 14.04 下 安装Protocol Buffers

p4c

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

$ ./bootstrap.sh

$ cd build

$ make -j4

$ make check -j4

HINT:

1.在执行./bootstrap.sh时遇到gcc版本过低问题:

checking if compiler is new enough... no
configure: error: compiler is too old; GCC 4.9 or later and Clang 3.3 or later are supported

解决方法:Ubuntu 14.04 更新gcc版本至4.9.2

2.在执行make -j4的时候遇到gcc编译器内联错误("make -j4" failed in the dir p4c/build)

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
make[1]: *** [unified-sources-p4c_bm2_ss-0.o] Error 4
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/wasdns/p4c/build'
make: *** [all] Error 2

原因:内存不足。

解决方法:将命令替换为

$ make -j2

3.执行make check的时候,会有大量的test failed,大多数是P4 14的test,目前尚未解决这个问题:

2017.5.13

【旧版本】Ubuntu 14.04 下 P416编译器 p4c的安装的更多相关文章

  1. Ubuntu - 14.04下,GO语言的安装!

    一,下载GO语言的安装文件,我直接下载GO语言的安装包(64位),并不是源码: 下载地址: 64位:https://storage.googleapis.com/golang/go1.6.linux- ...

  2. Ubuntu 14.04 下搭建SVN服务器 svn://

    Ubuntu 14.04 下搭建SVN服务器 svn:// 安装软件包: sudo apt-get install subversion 之后选择SVN服务文件及配置文件的放置位置.我放在了/srv下 ...

  3. Ubuntu 14.04 下搭建SVN服务器 (转载自 http://www.linuxidc.com/Linux/2015-01/111956.htm)-------------我所用到是红色字体

    http://www.linuxidc.com/Linux/2015-01/111956.htm Ubuntu 14.04 下搭建SVN服务器 svn:// 安装软件包: sudo apt-get i ...

  4. 解决ubuntu 14.04 下eclipse 3.7.2 不能启动,报Could not detect registered XULRunner to use 或 org.eclipse.swt.SWTError: XPCOM 等问题的处理

    对于eclipse 3.7.2在ubuntu 14.04下不能启动,需要在 eclipse/configuration 目录下的config.ini文件内增加一行org.eclipse.swt.bro ...

  5. Ubuntu 14.04下java开发环境的搭建--3--Tomcat及MySQL的安装

    前面两篇文章,已经说明了JDK和Eclipse 的安装方法,下面简单说一下,Tomcat及MySQL的安装方法. Tomcat的安装. 在合适的地方解压apache-tomcat-6.0.39.tar ...

  6. 分布式进阶(二)Ubuntu 14.04下安装Dockr图文教程(一)

    当前,完全硬件虚拟化技术(KVM.Xen.Hyper-V 等)能在一个物理主机上很好地运行多个互相独立的操作系统,但这也带来一些问题:性能不佳,资源浪费,系统反应迟缓等.有时候对用户来说,完全的硬件虚 ...

  7. Ubuntu 14.04下如何更换更新源(更新为163源)

    之前的安装ubuntu桌面版的之后安装yum,vim等会遇到一些问题, 比如:Ubuntu 14.04下如何更换更新源(更新为163源) 解决: http://jingyan.baidu.com/ar ...

  8. Ubuntu 14.04 下 android studio 安装 和 配置【转】

    本文转载自:http://blog.csdn.net/xueshanfeihu0/article/details/52979717 Ubuntu 14.04 下 android studio 安装 和 ...

  9. Ubuntu 14.04下超级终端Minicom连接ARM(转)

    转自:https://blog.csdn.net/ajianyingxiaoqinghan/article/details/70209765 笔者的工作环境: PC系统:Ubuntu 14.04 LT ...

随机推荐

  1. CSS分列等高

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  2. zkSNARK 零知识验证

    参考文献 ZCash7篇,有社区翻译版,但还是推荐看原汁原味的     https://z.cash/blog/snark-explain.html Vitalik3篇,小天才作者我就不介绍了,这三篇 ...

  3. AMR格式语音采集/编码/转码/解码/播放

    1.opencore-amr源码下载 https://sourceforge.net/projects/opencore-amr/files/opencore-amr/ 2.opencore-amr编 ...

  4. python中operator.itemgetter函数

    operator模块提供的itemgetter函数用于获取对象的哪些维的数据,参数为一些序号(即需要获取的数据在对象中的序号),下面看例子. k = [,,] b = ) print(b(k)) #输 ...

  5. ConcurrentModificationException

    //需求:如何集合中有给定的元素就在集合中在插入一个元素public class ListIteratorDemo2 { public static void main(String[] args) ...

  6. POJ:Dungeon Master(三维bfs模板题)

    Dungeon Master Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16748   Accepted: 6522 D ...

  7. poj2063 Investment

    http://poj.org/problem?id=2063 首先总结一下:总的来说通过这题我深深感觉到了自己的不足,比赛时思维很受限,...面对超时,没有想到好的解决方案. 题意:给出初始资金,还有 ...

  8. 在django项目中使用django-ckeditor

    安装django-ckeditor pip install django-ckeditor 安装Pillow Pillow是python的一个图像处理库,django-ckeditor需要依赖该库.最 ...

  9. meta 如何写

    阻止手机号加下划线,可拨打:<meta name="format-detection" content="telephone=no" />  (io ...

  10. OGNL mybatis

    http://www.mybatis.org/mybatis-3/zh/dynamic-sql.html 动态 SQL MyBatis 的强大特性之一便是它的动态 SQL.如果你有使用 JDBC 或其 ...