Build Linux version of Chrome

Source: Internet
Author: User
Tags config svn linux

Chromium compilation Instructions (Linux edition)

I want to see the Windows Edition Guide to compiling:

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.


$ SVN Co 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.


Compile the current Chromium Linux subset:

$ cd $CHROMIUM _root/src/chrome

$ .. /third_party/scons/ 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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.