Chromium compilation Instructions (Linux edition)
I want to see the Windows Edition Guide to compiling: http://www.yeeyan.com/articles/view/wangeguo/13524
This page describes if the build Chromium browser is compiled on a Linux operating system. If you are testing chromium or want to transplant chromium to another platform please continue reading.
Hint: There is no chromium browser running in Linux, although some of the chromium modules have been compiled in Linux and a small number of unit tests passed, all of which are just one command "all tests passes" executed!
Prerequisite conditions
Note: Our idea is that you can compile the build chromium in any applicable modern Linux distribution, and we try our best to list the prerequisites for system compilation. Of course, you can live with the fact that Linux porting is only at the beginning, and we have limited testing in most Linux distributions. Within chromium, our development platform is a variant of UBUNTU8 (Hardy Heron), We hope you will have a good luck in this system platform.
The Linux platform requires the following software to compile the build:
Subversion >= 1.4 (hint: If you are using Tarball (compressed package format), it is difficult to pay attention to the code changes, you need 1.5 version, we will fix it later) (translator: Subversion is a more advanced version control software than CVS)
Pkg-config >= 0.20 (translator: Pkg-config is a library configuration tool for development)
Python >= 2.4 (translator: Python programming language, here refers to the Python environment, tools)
Perl > 5.x
gcc/g++ >= 4.2
Bison >= 2.3 (translator: GNU Bison syntax analysis Conversion tool?)
Flex >= 2.5.34
Gperf >= 3.0.3
Libnss3-dev >= 3.12
In the UBUNTU8 system, you can use the following command to get all the software at once:
$ sudo apt-get install subversion pkg-config python perl g++ Bison flex Gperf Libnss3-dev
Get code
1. Select the compiled directory.
We will call this directory the variable $chromium_root in this document.
2. Get the Code library tool.
$CD $CHROMIUM _root
$ SVN Co http://src.chromium.org/svn/trunk/depot_tools/linux depot_tools
(or, download the. tar.gz format of the compressed package file: depot_tools_linux.tar.gz
To keep this compilation documentation separate and complete, let's assume that your Depot_tools directory is under your compiled directory ($CHROMIUM _root),
But it's not necessary, you can place it anywhere, and then add this path to your PATH environment variable or other variable,
3. Because a lot of people are so interested in our temporary work server that we can't access it, try downloading the code snapshot from SVN, unzip it,
and follow the instructions below to upgrade the update code, and you will get the same results through Gclient synchronization work.
$ cd $CHROMIUM _roo
$ Export Lang=c # Temp workaround for gclient behavior
$./depot_tools/gclient Config HTTP://SRC.CHROMIUM.ORG/SVN/TRUNK/SRC
$./depot_tools/gclient Sync
Hint: By default, run the Gclient Synchronization tool, Depot_tools will automatically update the code to the latest version (anytime),
If you want to turn off this behavior, check the contents of the Depot_tools document page.
Build
Compile the current Chromium Linux subset:
$ cd $CHROMIUM _root/src/chrome
$ .. /third_party/scons/scons.py Hammer
After compiling, the executable program is placed in the $chromium_root/src/chrome/hammer directory
Problem handling
Sh:d: Not found while processing hammer/webkit/webcore/xml/xpathgrammar.y
You did not install bison, we are patching our compiled script using it more user-friendly and friendly, but when you read this document, our code changes record has not been updated!