Article Title: Build a Linux version of Google Chrome. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Chromium compilation instructions (for Linux)
This page describes how to compile and build a Chromium browser on a Linux operating system. If you are testing chromium or want to port chromium to another platform, please continue reading.
TIPS: Currently, there is no Chromium browser running in Linux. Although the molecular modules of Chromium have been compiled in linux and tested in a small number of units, all those are just a command called "all tests pass!
Prerequisites
Note: Our idea is that you can compile and build Chromium in any applicable modern Linux release, and we try our best to list the system compilation prerequisites. Of course, please bear the fact that Linux porting is only at the beginning, and we have limited testing in most Linux releases. within Chromium, our development platform is a variant of Ubuntu8 (hard heron), and we hope you will have good luck on this system platform.
The Linux platform requires the following software to compile and build:
Subversion> = 1.4 (Note: if you are using the tarball (compressed package format), it is difficult to pay attention to code changes. You need version 1.5 and we will fix it later: subversion is a version control software that is more advanced than CVS)
Pkg-config> = 0.20 (TRANSLATOR: pkg-config is a library Configuration tool for development)
Python> = 2.4 (TRANSLATOR: Python programming language, which refers to the Python environment and Tool)
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 Ubuntu8, 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.
In this document, we will call this directory the variable $ CHROMIUM_ROOT.
2. Get the code library tool.
$ Cd $ CHROMIUM_ROOT
$ Svn co linux> http://src.chromium.org/svn/trunk/depot_tools/linux depot_tools
(Or download the compressed package file in .tar.gz format: depot_tools_linux.tar.gz)
To keep this Compilation instruction document independent and complete, assume that your depot_tools directory is under your compilation directory ($ CHROMIUM_ROOT), but it is not necessary, you can place it anywhere and add this PATH to your PATH environment variable or other variables,
3. because many people are highly interested in this, our temporary work server cannot be accessed. Please download the code snapshot from SVN, decompress it, and upgrade the code as instructed below, you will get the same result through gclient synchronization.
$ 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
Tip: by default, when you run the gclient synchronization tool, depot_tools will automatically update the code to the latest version (at any time). If you want to disable this operation, please refer to the depot_tools documentation page.
Build
Compile and build the current Chromium linux subset:
$ Cd $ CHROMIUM_ROOT/src/chrome
$ ../Third_party/scons. py Hammer
After compilation, the executable program is placed in the $ CHROMIUM_ROOT/src/chrome/Hammer directory.
Troubleshooting
Sh: d: not found while processing Hammer/webkit/WebCore/xml/XPathGrammar. y
You have not installed bison. We are repairing our compilation script to make it easier to use and friendly, but our code change records are not updated when you read this document!