My favorites | Sign in
Google
             
Search
for
Updated Jun 18, 2009 by sverrir@chromium.org
Labels: Linux
LinuxBuildInstructions  
Build instructions for Linux

This page describes how to build the Chromium code on Linux. Read this if you're interested in testing the build or porting code.

Please note that chrome on Linux is not at all complete, so reporting Linux bugs is not helpful at this stage.


Before Starting

Note: do not get the code before you have installed the prerequisites, otherwise the gclient sync command may generate incorrect build files.

Compilation

Build the current Linux subset of Chromium in debug mode:

$ cd $CHROMIUM_ROOT/src/build
$ hammer

The above builds all libraries and tests in all components. Specifying other target names to restrict the build to just what you're interested in.

Example: to build just chrome:

$ cd $CHROMIUM_ROOT/src/build
$ hammer chrome

or to build just the simplest unit test:

$ cd $CHROMIUM_ROOT/src/build
$ hammer base_unittests

Or you can specify the explicit file you want to build:

$ cd $CHROMIUM_ROOT/src/build
$ hammer ../sconsbuild/Debug/chrome

Executables

Executables are written in $CHROMIUM_ROOT/src/sconsbuild/Debug.

Release mode

Add the --mode=Release command line flag:

$ cd $CHROMIUM_ROOT/src/build
$ hammer --mode=Release

Building from src

You can specify -C build to invoke the build while staying in the src/ directory. You may find this more convenient when dealing with the output files in the sconsbuild directory. So to build and run the browser from src/:

$ cd $CHROMIUM_ROOT/src
$ hammer -C build chrome
$ sconsbuild/Debug/chrome

Troubleshooting

  • hammer is part of depot_tools, which you will have installed if you followed the "Before Starting" steps above.
  • 64-Bit Architecture Support: See LinuxBuild64Bit
  • SCons complaining about implicit dependency not found: it's using stale dependency information from its database. To force SCons to re-scan for current dependency information:
  • $ hammer --implicit-deps-changed

Advanced Features

Next Steps

If you want to contribute to the effort toward a Chromium-based browser for Linux, please check out the Linux Development page for more information.


Comment by musuruan, Mar 19, 2009

Lucida font should be in the bitmap-fonts package in Fedora.

Maybe liberation-fonts can be used instead of Microsoft proprietary fonts: https://fedorahosted.org/liberation-fonts/

Comment by InternetBummer, Apr 04, 2009

You also need glibc-devel.i386

Comment by bobbypowers, Apr 07, 2009

for Fedora rawhide and F11, those packages will be .586, not .386

Comment by bobbypowers, Apr 07, 2009

libX11-devel.i586 as well for fedora

Comment by eddi2k, Apr 26, 2009

need dbus-devel too on fedora 10

Comment by rpg.314, May 21, 2009

It's 32 bit only ATM in 2009, what's going on? Why is the dev team even bothering to develop and fix a 32 bit only code base so early in the development???

Comment by imagen.patagonica, May 30, 2009

for debian lenny = Ubuntu Setup?

Comment by alangley, Dec 15, 2008

This is not a support forum

We do not pay attention to the comments posted here. Obviously we only have finite time, but we can generally be found on #chromium on Freenode for quick stuff.

For more detailed issues, there is the bug tracker, but please consider that there are so many obvious, huge missing pieces that bugs get relatively little precedence at this time.

Comment by aydinakdeniz, Apr 22, 2009

good

Comment by posteingang33, May 19, 2009

This tutotial doesn't works any longer with acutual builds. I always get "SConscript not found". Could anybody fix that?

Comment by timurrrr, May 26, 2009

Everything works ok if you set up all the prerequisites...

Comment by markus.woschank, Jun 01, 2009

maybe it would be useful to mention the 'gclient runhooks --force' command. (gclient sync/update failed for some reason to run all the hooks, and they did not rerun on following syncs/updates)