在ubuntu上编译chrome

红心地瓜

1.获取代码

1)下载tarball,http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html

2)   解压缩

3)安装dept_tools:

http://www.chromium.org/developers/how-tos/install-depot-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

http://www.ylmf.net/ubuntu/tips/2010123119690.html

2)采用gold ld替代ld进行链接

export
CC="gcc -B/usr/local/gold/bin"

或者将

/usr/local/gold/bin加到PATH变量中/usr/bin的前面

参考:

1)get-the-code,http://www.chromium.org/developers/how-tos/get-the-code

2)linux build instruction,http://code.google.com/p/chromium/wiki/LinuxBuildInstructions

3) LinuxFasterBuilds, http://code.google.com/p/chromium/wiki/LinuxFasterBuilds

时间: 2024-08-26 04:19:38

在ubuntu上编译chrome的相关文章

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

[转]Ubuntu 上编译Android出现cannot find -lstdc++解决办法 在Ubuntu 12.04 x86_64机器上编译Android出现下面错误,是因为找不到32bit的libstdc++.so库. /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.so when searching for -lstdc++ /usr/bin/ld: skipping incom

.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 Tue Jun 16 20:43:48 CST 2015) 一.编译coreclr 成功! Repo successfully built. Product binaries are available at /data/git/coreclr/bin/Product/Linux.x64.Debug

在Linux Ubuntu上编译DNX

DNX是.NET Execution Environment,前身是XRE,XRE的前身是KRuntime,项目网址:https://github.com/aspnet/DNX . 签出DNX的代码: git clone https://github.com/aspnet/DNX.git --recursive 安装Mono: apt-get install mono-complete 运行./build.sh命令进行编译,出现错误: WARNING: Invalid certificate r

在Ubuntu上安装Chrome Driver和Firefox Driver

首先下载Chrome Driver(Firefox Driver的安装与该步骤相同) 链接: http://chromedriver.storage.googleapis.com/index.html 接下来在控制台(terminal)上操作一下红色字体的指令: Install Unzip sudo apt-get install unzip Assuming you're running a 64-bit OS, download the latest version of chromedri

在Windows7和Ubuntu上编译安装MICO

MICO是CORBA标准的一个实现.开源并且被广泛使用. 首先的首先,看用户手册,在页面"http://www.mico.org/docu.html"找到一本教材"MICO: An Open Source CORBA Implementation",去Google搜一下,有PDF下载 然后,选择一个正确的下载包 打开www.mico.org,点击"download" 可以看到下图所示 这里不要去选择第一项"Complete source

菜鸟起飞:第一次在ubuntu上编译android源码

算一算自己干android开发,还差那么几个月就要满两年了,可是自己连android源码都没有编译过一次,想想真是说不过去,就想想编译一次,中间还真是遇见了不少的问题,在此写一篇博客供大家参考. 切记:每个人的环境都不相同,可能我的编译过程可以成功,但是对于你的就不成功,在遇到问题的时候要具体对待,具体解决,关键就在于恒心与毅力. -----------------------------------------------------------------------------------

ubuntu上编译安装R

1.在下载R的源码包 我下载的是这个版本   R-2.15.3.tar.gz 2.解压 我的文件在/home/vobile目录下,也解压在一个/home/obile 目录下 cd /home/obile tar -xf   R-2.15.3.tar.gz 3.编译安装 cd cd R-2.15.3/ ./configure --prefix=./configure --prefix=/home/liyistat/Desktop/R-3.0.2 --enable-R-shlib 其中 --pref

Ubuntu 上把 Chrome 拔掉 RC4 連線的方法

首先先看「 SSL Cipher Suite Details of Your Browser 」這個網站,會列出你目前瀏覽器支援的 cipher suite,會需要知道要拔掉哪些號碼. 接下來的資料是參考「 Remove RC4 from SSL/TLS ciphers in Chromium 」這篇的方法. Ubuntu 的使用者可以到 /usr/share/applications/google-chrome.desktop 這邊修改,本來是: Exec=/usr/bin/google-ch

ubuntu上编译和使用easy_profiler对C++程序进行性能分析

本文首发于个人博客https://kezunlin.me/post/91b7cf13/,欢迎阅读最新内容! tutorial to compile and use esay profiler with c++ on ubuntu 16.04 Guide compile git clone https://github.com/yse/easy_profiler.git cd easy_profiler && mkdir build && cd build &&