在ubuntu上编译chrome

在ubuntu上编译chrome
红心地瓜
1.获取代码
1)下载tarball,http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html
2)   解压缩
3)安装dept_tools:
将dept_tools加到PATH里面
export PATH="$PATH":`pwd`/depot_tools或者加到~/.bashrc里面
2.安装dependency
进到chromium/src目录下
./build/install-build-deps.sh
3.同步代码
进到chromium/src目录下
gclient sync --force
如果不想同步,则必须执行
gclient runhooks --force
这一步会调用gyp来长生一些平台特定的代码,只要做一次就可以
4.配置
./build/gyp_chromium -Dflag1=value1 -Dflag2=value2

5.编译
make chrome
碰到问题及解决
1.bison: cannot open file `external/bison/data/m4sugar/m4sugar.m4': No such file or directory
看着像bison没有装好,又重新apt-get remove/install装了bison,还是不行,到网站下载最新的2.5编译安装,还是不行
于是bison -V
发现显示的是
bison (GNU Bison) 2.3
可是我用Whereis bison,显示的又是我刚装的2.5的地址
判断是哪里的bison预先执行了
于是
strace(bison),果然
execve("/home/tom/work/gingerbread/out/host/linux-x86/bin/bison", ["bison"], [/* 51 vars */]) = 0
原因是我将android out 的地址设定在path的前面,于是覆盖了/usr/local/bin,执行了android下面的bison
修改PATH变量,问题得到解决
2.link的时候内存不足退出
解决方法:
1)加大swap,我加到了8G
2)采用gold ld替代ld进行链接
 export
CC="gcc -B/usr/local/gold/bin"
或者将
/usr/local/gold/bin加到PATH变量中/usr/bin的前面
参考:

在ubuntu上编译chrome的更多相关文章

  1. 【转】Ubuntu 上编译Android出现cannot find -lstdc++解决办法

    [转]Ubuntu 上编译Android出现cannot find -lstdc++解决办法 在Ubuntu 12.04 x86_64机器上编译Android出现下面错误,是因为找不到32bit的li ...

  2. (原)ubuntu上编译PANet/Detectron.pytorch时-std=c99的错误

    转载请注明出处: https://www.cnblogs.com/darkknightzh/p/10494787.html 在ubuntu上编译PANet/Detectron.pytorch时,总提示 ...

  3. 在Ubuntu上安装Chrome Driver和Firefox Driver

    在Ubuntu上安装Chrome Driver和Firefox Driver 此文章只介绍Chrome Driver(Firefox Driver和该步骤相同) 下载链接:http://chromed ...

  4. .NET跨平台:在Linux Ubuntu上编译coreclr/corefx/dnx(20150617)

    编译时间:北京2015年6月17日上午 操作系统:Ubuntu 14.04.2 LTS Mono版本:Mono JIT compiler version 4.3.0 (master/3445ac5 T ...

  5. 在Ubuntu上安装Chrome浏览器和ChromeDriver

    启动脚本后报错 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have w ...

  6. Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示

    前言   在ubuntu上实现MPlayer播放器播放音乐.   Demo                Mplayer   MPlayer是一款开源多媒体播放器,以GNU通用公共许可证发布.此款软件 ...

  7. 在Linux Ubuntu上编译DNX

    DNX是.NET Execution Environment,前身是XRE,XRE的前身是KRuntime,项目网址:https://github.com/aspnet/DNX . 签出DNX的代码: ...

  8. Ubuntu 上编译opencv_contrib模块for Android

    https://blog.csdn.net/ipfpm/article/details/81132144 [ubuntu]Ubuntu中Android SDK下载跟配置 android24的版本 (1 ...

  9. 在Ubuntu上更新Chrome到最新的版本

    本操作只限于已经安装了Chrome的Ubuntu系统: Step 1: sudo apt-get update Step 2: sudo apt-get install google-chrome-s ...

随机推荐

  1. 032数值的整数次方(keep it up)

    剑指offer中题目:http://ac.jobdu.com/problem.php? pid=1514 题目描写叙述: 给定一个double类型的浮点数base和int类型的整数exponent. ...

  2. StarUML中时序图添加小人

    转载于 http://blog.csdn.net/longyuhome/article/details/9011629 在看时序图的例子的时候,发现有些的时序图上有小人的图标,可是一些UML工具却没有 ...

  3. Linux下查看显示器输出状态以及修改显示器工作模式(复制 or 扩展)

    //关闭显示器VGA1xrandr --output VGA1 --off //开启显示器VGA1xrandr --output VGA1 --auto //关闭显示器LVDS1xrandr --ou ...

  4. PV和并发

    几个概念 网站流量是指网站的访问量,用来描述访问网站的用户数量以及用户所浏览的网页数量等指标,常用的统计指标包括网站的独立用户数量.总用户数量(含重复访问者).网页浏览数量.每个用户的页面浏览数量.用 ...

  5. hdu 1870

    水题.... AC代码: #include <iostream> #include <queue> using namespace std; int main() { char ...

  6. java执行命令行

    List<String> command = new ArrayList<String>(); command.add("ping"); ProcessBu ...

  7. 【※索引】mysql索引常用命令

    索引分单列索引和组合索引.单列索引,即一个索引只包含单个列,一个表可以有多个单列索引,但这不是组合索引.组合索引,即一个索包含多个列. MySQL索引类型包括: (1)普通索引 这是最基本的索引,它没 ...

  8. jquery插件:点击拉出的右侧滑动菜单

    就是一个停留在页面右侧的滑动菜单,点击可以拉出,带回调函数.宽高位置可以参数指定.插件代码如下: (jquery的路径请自己修改) (function($){ $.fn.sideSwitch = fu ...

  9. hdu4976 贪心+dp

    A simple greedy problem. Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java ...

  10. 自定义窗口 mfc

    typedef struct _WNDCLASS { UINT style; //制定窗口的类型 WNDPROC lpfnWndProc; int cbClsExtra; //额外的数值 int cb ...