在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. 站内信DB设计实现

    两年前,万仓一黍在博客园发了两篇关于站内信的设计实现博文,<群发"站内信"的实现>.<群发"站内信"的实现(续)>,其中阐述了他关于站内 ...

  2. Eclipse、MyEclipse使用git插件(egit)

    在开发Java.JavaEE等相关程序时,我们会用到Eclipse或者MyEclipse,同时使用到git作为版本控制软件,所以我们需要在这些IDE上集成git插件,而egit正是Eclipse基金会 ...

  3. codevs 1028 花店橱窗布置 (KM)

    /*裸地KM*/ #include<iostream> #include<cstdio> #include<cstring> #define maxn 110 #d ...

  4. Swift中可选型的Optional Chaining 和 Nil-Coalesce(Swift2.1)

    /* 下面是介绍Optional Chaining 和 Nil-Coalesce */ // Optional Chaining (可选链) if let errorMessage = errorMe ...

  5. Php ORM 对象关系映射

    ORM的全称是Object Relational Mapping,即对象关系映射.它的实质就是将关系数据(库)中的业务数据用对象的形式表示出来,并通过面向对象(Object-Oriented)的方式将 ...

  6. 使用nw.js将html项目打包为桌面程序

    首先需要确保电脑已经布置好node.js环境 1.下载并全局安装nw.js npm install nw -g 2.安装nw-builder模块 npm install nw-builder -g 3 ...

  7. VC++6.0 下配置 pthread库2010年12月12日 星期日 13:14VC下的pthread多线程编程 转载

    VC++6.0 下配置 pthread库2010年12月12日 星期日 13:14VC下的pthread多线程编程     转载 #include <stdio.h>#include &l ...

  8. sql查询语句心得

    1)where 有多个用in ,一个用= 2)自身链接 select A.Sno from S A,S B where A.Sname='a' AND A.City=B.City)) 3)外链接(同时 ...

  9. sql语法图

  10. static和const关键字的作用

    static关键字至少有下列n个作用: (1)函数体内static变量的作用范围为该函数体,不同于auto变量,该变量的内存只被分配一次,因此其值在下次调用时仍维持上次的值: (2)在模块内的stat ...