My favorites | Sign in
Project Home Downloads Wiki Issues
Search
for
LinuxBuildInstructionsPrerequisites  
Prerequisites for building.
Linux
Updated Sep 1, 2011 by mcgra...@chromium.org

This page describes system requirements for building Chromium on Linux.

System Requirements

Linux distribution

You should be able to build Chromium on any reasonably modern Linux distribution, but there are a lot of distributions and we sometimes break things on one or another. Internally, our development platform has been a variant of Ubuntu 10.04 (Lucid Lynx); we expect you will have the most luck on this platform, although directions for other popular platforms are included below.

Disk space

It takes about 10GB or so of disk space to check out and build the source tree. This number grows over time.

Memory space

It takes about 8GB of swap file to link chromium and its tests. If you get an out-of-memory error during the final link, you will need to add swap space with swapon. It's recommended to have at least 4GB of memory available for building a statically linked debug build. Dynamic linking and/or building a release build lowers memory requirements. People with less than 8GB of memory may want to not build tests since they are quite large.

64-bit Systems

Chromium can be compiled as either a 32-bit or 64-bit application. Chromium requires several system libraries to compile and run. While it is possible to compile and run a 32-bit Chromium on 64-bit Linux, many distributions are missing the necessary 32-bit libraries, and will result in build or run-time errors.

Software Requirements

Building on Linux requires software not usually installed with the distributions.

Automated Setup

The script build/install-build-deps.sh (at least for Ubuntu) attempts to automate installing the required software. This script is used to set up the canonical builders, and as such is the most up to date reference for the required prerequisites.

Please update that script if you find it's incomplete.

(TODO: make this Linux-distribution independent)

This is an approximation of the requirements it verifies and/or installs.

  • Linux kernel >= 2.6.16
  • Python >= 2.4
  • python2.5-dev
  • Perl >= 5.x
  • gcc/g++ >= 4.2
  • g++-multilib >=4.2
  • bison >= 2.3
  • flex >= 2.5.34
  • gperf >= 3.0.4
  • pkg-config >= 0.20
  • libnss3-dev >= 3.12
  • libasound2-dev
  • libgconf2-dev
  • libglib2.0-dev
  • libgnome-keyring-dev
  • libgtk2.0-dev
  • libnspr4-0d >= 4.7.1+1.9-0ubuntu0.8.04.5 (ubuntu0.8.04.1 causes duplicate dtoa references)
  • libnspr4-dev >= 4.7.1+1.9-0ubuntu0.8.04.5
  • freetype-dev
  • libcairo2-dev
  • libcupsys2-dev
  • libdbus-1-dev
  • libbz2-dev
  • libjpeg62-dev
  • libpam0g-dev
  • libexpat-dev
  • libbzip2-dev
  • mesa-common-dev
  • libgl1-mesa-dev
  • libglu1-mesa-dev
  • libxss-dev
  • libxtst-dev
  • libcurl4-gnutls-dev
  • libcupsys2-dev
  • libelf-dev

Currently used by basic tests (in order to run swig):

  • libc6-i386
  • lib32stdc++6

Optional (currently, all of these are only used by layout tests):

  • apache2
  • libapache2-mod-php5
  • wdiff
  • msttcorefonts (Microsoft fonts)
  • lighttpd
  • php5-cgi
  • sun-java6-fonts (needed for Lucida-- you probably need to add the 'partner' repositories to /etc/apt/sources.list)
  • ttf-dejavu-core
  • ttf-kochi-gothic
  • ttf-kochi-mincho

NOTE: We currently want to support distributions that are as old as Ubuntu Hardy, so for example, we don't want to use features from newer versions that are not present in gtk 2.12.9 (the Hardy version).

Distribution-specific Notes

Ubuntu Setup

On a 32-bit Ubuntu 8.04, you can fetch all of the above as follows:

$ sudo apt-get install bison fakeroot flex g++ g++-multilib gperf \
  libapache2-mod-php5 libasound2-dev libbz2-dev libcairo2-dev \
  libdbus-glib-1-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev \
  libglib2.0-dev libgtk2.0-dev libjpeg62-dev libnspr4-dev libnss3-dev \
  libpam0g-dev libsqlite3-dev libxslt1-dev libxss-dev \
  mesa-common-dev msttcorefonts patch perl pkg-config python \
  python2.5-dev rpm subversion libcupsys2-dev libgnome-keyring-dev \
  libcurl4-gnutls-dev libelf-dev libc6-i386 lib32stdc++6

There are some optional extra packages that are only necessary to run tests. For example, sun-java6-fonts includes one font (along with a hefty JRE) that is used by a WebKit test.

$ sudo apt-get install apache2 wdiff lighttpd php5-cgi sun-java6-fonts \
   msttcorefonts ttf-dejavu-core ttf-kochi-gothic ttf-kochi-mincho

On Lucid I also needed these fonts for layout tests:

$ sudo apt-get install ttf-indic-fonts

Debian Setup

Follow the Ubuntu instructions above.

If you want to install the build-deps manually, note that the original packages are for Ubuntu. Here are the Debian equivalents:

  • libexpat-dev -> libexpat1-dev
  • freetype-dev -> libfreetype6-dev
  • libbzip2-dev -> libbz2-dev

openSUSE Setup

For openSUSE 11.0 and later, see Linux openSUSE Build Instructions.

Fedora Setup

Recent systems:

su -c 'yum install subversion pkgconfig python perl gcc-c++ bison \
flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \
atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \
dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \
dbus-glib-devel elfutils-libelf-devel libjpeg-devel \
mesa-libGLU-devel libXScrnSaver-devel \
libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel'

The msttcorefonts packages can be obtained by following the instructions present here: http://www.fedorafaq.org/#installfonts

For the optional packages:

  • php-cgi is provided by the php-cli package
  • wdiff doesn't exist in Fedora repositories, a possible alternative would be dwdiff
  • sun-java6-fonts doesn't exist in Fedora repositories, needs investigating

su -c 'yum install lighttpd php-cli dwdiff'

Arch Linux Setup

Most of these packages are probably already installed since they're often used, and the parameter --needed ensures that packages up to date are not reinstalled.

$ sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig nss \
  alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \
  libgnome-keyring

For the optional packages on Arch Linux:

  • php-cgi is provided with pacman
  • wdiff is not in the main repository but dwdiff is. You can get wdiff in AUR/yaourt
  • sun-java6-fonts do not seem to be in main repository or AUR.

For a successful build, add 'remove_webcore_debug_symbols': 1, to the variables-object in include.gypi. Tested on 64-bit Arch Linux.

TODO: Figure out how to make it build with the WebCore debug symbols. make V=1 can be useful for solving the problem.

Mandriva setup

urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel lib64GConf2-devel \
lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel lib64pango1.0-devel \
lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python perl bison flex subversion \
gperf

Note 1: msttcorefonts are not available, you will need to build your own (see instructions, not hard to do, see http://code.google.com/p/chromium/wiki/MandrivaMsttcorefonts ) or use drakfont to import the fonts from a windows installation

Note 2: these packages are for 64 bit, to download the 32 bit packages, substitute lib64 with lib

Note 3: some of these packages might not be explicitly necessary as they come as dependencies, there is no harm in including them however.

Note 4: to build on 64 bit systems use, instead of GYP_DEFINES=target_arch=x64 , as mentioned in the general notes for building on 64 bit:

export GYP_DEFINES="target_arch=x64"
gclient runhooks --force

Gentoo setup

emerge www-client/chromium 
Comment by musur...@gmail.com, 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 Internet...@gmail.com, Apr 4, 2009

You also need glibc-devel.i386

Comment by bobbypow...@gmail.com, Apr 7, 2009

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

Comment by bobbypow...@gmail.com, Apr 7, 2009

libX11-devel.i586 as well for fedora

Comment by edd...@gmail.com, Apr 26, 2009

need dbus-devel too on fedora 10

Comment by imagen.p...@gmail.com, May 30, 2009

for debian lenny = Ubuntu Setup?

Comment by drewst...@gmail.com, Feb 2, 2010

For mandriva, instead of g++ you want gcc-c++ The following is the correct command on 64 bit:

urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel gcc-c++ python perl bison flex subversion gperf

Comment by cod...@gmail.com, Feb 5, 2010

under memory space, add note to check your ulimit for process max memory and virtual memory, otherwise ld will fail with "failed to set dynamic section sizes: Memory exhausted"

Comment by motiur.r...@gmail.com, Mar 5, 2010

Hi guys its really a hectic to go all these hoopla's of building and creating . When will google release chrome os like any other software .

Comment by phamnaml...@gmail.com, Mar 10, 2010

"Package lib32readline-dev has no installation candidate"

I got this package missing in Ubuntu 64-bit 9.10 when running automated setup.

Comment by vladlosev, Mar 20, 2010

On 32-bit Ubuntu Karmic, package libdbus-glib-1-dev is also needed.

Comment by airchuc...@gmail.com, Apr 6, 2010

On Debian (or on testing/squeeze at least), the package dbus-glib-1-dev was also needed, but was not installed by the supplied script for Debian. Granted, that script is not declared to actually work, but it seems to except for that one exception. Nice work guys!

Comment by airchuc...@gmail.com, Apr 6, 2010

It appears the following packages are also required under Debian: mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev.

See http://www.mail-archive.com/chromium-dev@googlegroups.com/msg11951.html

Comment by airchuc...@gmail.com, Apr 6, 2010

I have found that libxss-dev is similarly required (at least on Debian testing) for compiling Chromium. (http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/d57148d3845de8c7)

Comment by rice....@gmail.com, Apr 27, 2010

there is no information about how to install depot_tools on slackware_13.0-x86_64 this a complete show stopper

Comment by 0fl...@gmail.com, Apr 28, 2010

Как установить на Debian Lenny ? последнюю версию хромиума? что нужно делать можно поподробнее и на русском язычке ))

Comment by lerma08...@gmail.com, May 10, 2010

Hummmm, I am getting: E: Command line option 'l' -multilib? is not known when runing the command above?http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites#Ubuntu_Setup under ubuntu 9.10

Comment by cymraeg...@gmail.com, Jun 3, 2010

What does "a lot of memory" mean ? Is 2GB enough ? What can I expect to do with the build once I make it ?

Comment by cela0...@gmail.com, Jun 17, 2010

How can I do this on OpenSolaris??

Comment by tkjacob...@gmail.com, Jun 20, 2010

Missing cups-devel dependency for Fedora!

Comment by lmeye...@gmail.com, Jun 21, 2010

also missing 'curl-devel' for fedora 13... still trying to trying to make a build for a fresh system.

Comment by mele...@gmail.com, Jul 1, 2010

On Mandriva you must install libgnome-keyring-dev in order to compile

Comment by vladigu...@gmail.com, Jul 3, 2010

there will always be an iso image that will be outdated. if you want up to date real time software, you get it from source

Comment by phuneh...@gmail.com, Jul 8, 2010

curl-devel is needed for ubuntu 10.04 also (indeed what I had to install was libcurl4-gnutls-dev)

Comment by phuneh...@gmail.com, Jul 8, 2010

I also have to install libcups2-dev (ubuntu 10.04)

Comment by chadsow...@gmail.com, Aug 19, 2010

Hello - Please be more specific about "A lot of memory". Another comment above asks the same question but I don't see any answers.

Comment by xdunl...@gmail.com, Aug 21, 2010

The script for debian is missing. "The page you requested is invalid."

Comment by damien.l...@gmail.com, Sep 17, 2010

FWIW, my ld takes 2.6GB of resident memory to link chrome.

Comment by a.jans...@gmail.com, Sep 22, 2010

python2.5-dev -> python2.7-dev (x)Ubuntu 10.10 Maverick

Comment by abpil...@gmail.com, Oct 15, 2010

I have built chromium for rhel5, if someone wants help you can contact me, I can email detailed steps.

Comment by tjra...@gmail.com, Nov 16, 2010

This page needs updating.

Comment by patrik.w...@gmail.com, Nov 18, 2010

On Fedora 12 libgnome-keyring-devel should be gnome-keyring-devel

Comment by h...@google.com, Nov 24, 2010

Seems to be python2.5-dev -> python2.6-dev for Lucid.

Comment by g.fic...@gmail.com, Dec 10, 2010

Fedora 13 also requires libXtst-devel

Comment by sunn...@gmail.com, Dec 15, 2010

I think 'libcupsys2-dev' is a typo. 'libcups2-dev' is correct.

Comment by f...@web.de, Dec 24, 2010

how do i get it to stop intercepting everything i type into the url bar? requests to resolve URLs should only go to my DNS system.

thank you

Comment by wingle...@gmail.com, Jan 9, 2011

@abpillai,could you please email me winglet13@gmail.com the building steps for RHEL5?

Comment by wingle...@gmail.com, Jan 15, 2011

Fedora 14 also needs libXt-devel

Comment by kotir...@gmail.com, Jan 27, 2011

Hi abpillai,

I am trying to build for RHEL 5. Could you e-mail me the steps (kotiravi@gmail.com).
I am unable to run build/install-build-deps.sh on RHEL.

Comment by poy...@gmail.com, Feb 5, 2011

Here is my complete apt-get command for Ubuntu 10.10, 64 bit:

sudo apt-get install bison fakeroot flex g++ g++-multilib gperf \
  libapache2-mod-php5 libasound2-dev libbz2-dev libcairo2-dev \
  libdbus-glib-1-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev \
  libglib2.0-dev libgtk2.0-dev libjpeg8-dev libnspr4-dev libnss3-dev \
  libpam0g-dev libsqlite3-dev libxslt1-dev libxss-dev \
  mesa-common-dev ttf-mscorefonts-installer patch perl pkg-config python \
  python2.6-dev rpm subversion libcups2-dev libgnome-keyring-dev \
  libcurl4-gnutls-dev libxtst-dev
Comment by dturv...@gmail.com, Feb 8, 2011

The build dependencies are a moving target. A good way to automate the prereq checking is to start with install-build-deps.sh It currently only supports Ubuntu (working well from 8.04 through 10.10) but is a confirmed starting point for other distros.

It will also help you understand some build options.

Comment by midna...@gmail.com, Feb 10, 2011

For Mint 10, use the Ubuntu listing

Comment by bdans...@gmail.com, Feb 25, 2011

Please drop PAM as a dependency and use something more secure instead. Slackware and its derivatives don't use PAM for security reasons (hasn't since v9.1), so they can't compile Chromium. I'm running Salix OS 13.1, which has Slackware 13.1.0 (according to /etc/slackware-version) running under the hood.

Here's a pastebin of the errors I'm getting: http://pastebin.com/TKHXTxJy

Comment by patrick....@gmail.com, Mar 2, 2011

Building on Fedora 14, I also had to install libXt-devel and pam-devel.

Comment by Ezrahmcc...@gmail.com, Mar 13, 2011

How can i co this on Windows (7) Starter

Comment by mxracer185@gmail.com, Mar 18, 2011

For arch linux, ttf-ms-fonts has been moved to the AUR and cannot be installed through pacman anymore.

Comment by xiaotian...@gmail.com, Apr 6, 2011

There are duplicate "libcupsys2-dev".

Comment by getp...@gmail.com, Jul 8, 2011

chromium 14 couldn't build on ubuntu jaunty. because of lacking of gtk_widget_get_allocation(). GTK+2.0 needed 2.18 or higher?

Comment by dirk.imp...@gmail.com, Aug 14, 2011

wdiff does exist in Fedora

Comment by max.ray...@me.com, Sep 20, 2011

after successfully execute 'make chrome'; how do you run chrome?

Comment by providen...@gmail.com, Sep 25, 2011

I'm using gcc-4.7-...alpha on gentoo (emerge -a www-client/chromium), with linux-3.1.0-rc4, chromium didn't compile until I had the following added in the sources:

#include <sys/types.h> ==> ipc/ipc_channel.h #include <unistd.h> ==> ipc/file_descriptor_set_posix.cc

Is that the dev teams haven't bumpted up to gcc-4.7 yet?

Comment by vils...@gmail.com, Oct 10, 2011

Modified prereqs for Ubuntu 10.04 LTS:

sudo apt-get install bison fakeroot flex g++ g++-multilib gperf libapache2-mod-php5 libasound2-dev libbz2-dev libcairo2-dev libdbus-glib-1-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev libglib2.0-dev libgtk2.0-dev libjpeg62-dev libnspr4-dev libnss3-dev libpam0g-dev libsqlite3-dev libxslt1-dev libxss-dev mesa-common-dev ttf-mscorefonts-installer patch perl pkg-config python python-dev rpm subversion libcups2-dev libgnome-keyring-dev libcurl4-gnutls-dev libelf-dev ttf-indic-fonts

Comment by nw...@detroitsci.com, Jan 5, 2012

On CentOS 6/64bit (and probably Red Hat) I needed:

yum install glibc.i686 libstdc++.so.6 libz.so.1


Sign in to add a comment
Powered by Google Project Hosting