blob: c42297a2e6de7f8c8e95ec770ea6b50827b5ef90 [file] [log] [blame] [view]
andybonsad92aa32015-08-31 02:27:441# Linux Build Instructions — Prerequisites
2
andybons3322f762015-08-24 21:37:093This page describes system requirements for building Chromium on Linux.
4
andybonsad92aa32015-08-31 02:27:445[TOC]
andybons3322f762015-08-24 21:37:096
andybonsad92aa32015-08-31 02:27:447## System Requirements
andybons3322f762015-08-24 21:37:098
andybonsad92aa32015-08-31 02:27:449### Linux distribution
andybons3322f762015-08-24 21:37:0910
andybonsad92aa32015-08-31 02:27:4411You should be able to build Chromium on any reasonably modern Linux
12distribution, but there are a lot of distributions and we sometimes break things
13on one or another. Internally, our development platform has been a variant of
14Ubuntu 14.04 (Trusty Tahr); we expect you will have the most luck on this
15platform, although directions for other popular platforms are included below.
andybons3322f762015-08-24 21:37:0916
andybonsad92aa32015-08-31 02:27:4417### Disk space
andybons3322f762015-08-24 21:37:0918
andybonsad92aa32015-08-31 02:27:4419It takes about 10GB or so of disk space to check out and build the source tree.
20This number grows over time.
andybons3322f762015-08-24 21:37:0921
andybonsad92aa32015-08-31 02:27:4422### Memory space
andybons3322f762015-08-24 21:37:0923
andybonsad92aa32015-08-31 02:27:4424It takes about 8GB of swap file to link chromium and its tests. If you get an
25out-of-memory error during the final link, you will need to add swap space with
26swapon. It's recommended to have at least 4GB of memory available for building a
27statically linked debug build. Dynamic linking and/or building a release build
28lowers memory requirements. People with less than 8GB of memory may want to not
29build tests since they are quite large.
andybons3322f762015-08-24 21:37:0930
andybonsad92aa32015-08-31 02:27:4431### 64-bit Systems
andybons3322f762015-08-24 21:37:0932
andybonsad92aa32015-08-31 02:27:4433Chromium can be compiled as either a 32-bit or 64-bit application. Chromium
34requires several system libraries to compile and run. While it is possible to
35compile and run a 32-bit Chromium on 64-bit Linux, many distributions are
36missing the necessary 32-bit libraries, and will result in build or run-time
37errors.
andybons3322f762015-08-24 21:37:0938
andybonsad92aa32015-08-31 02:27:4439### Depot tools
andybons3322f762015-08-24 21:37:0940
andybonsad92aa32015-08-31 02:27:4441Before setting up the environment, make sure you install the
42[depot tools](http://dev.chromium.org/developers/how-tos/depottools) first.
andybons3322f762015-08-24 21:37:0943
andybonsad92aa32015-08-31 02:27:4444## Software Requirements
45
46### Ubuntu Setup
47
nodira6074d4c2015-09-01 04:26:4548Run [build/install-build-deps.sh](/build/install-build-deps.sh) The script only
andybonsad92aa32015-08-31 02:27:4449supports current releases as listed on https://wiki.ubuntu.com/Releases.
50
51Building on Linux requires software not usually installed with the
52distributions.
53
54The script attempts to automate installing the required software. This script is
55used to set up the canonical builders, and as such is the most up to date
56reference for the required prerequisites.
57
58### Other distributions
59
60Note: Other distributions are not officially supported for building and the
61instructions below might be outdated.
62
63#### Debian Setup
andybons3322f762015-08-24 21:37:0964
65Follow the Ubuntu instructions above.
66
andybonsad92aa32015-08-31 02:27:4467If you want to install the build-deps manually, note that the original packages
68are for Ubuntu. Here are the Debian equivalents:
andybons3322f762015-08-24 21:37:0969
andybonsad92aa32015-08-31 02:27:4470* libexpat-dev -> libexpat1-dev
71* freetype-dev -> libfreetype6-dev
72* libbzip2-dev -> libbz2-dev
73* libcupsys2-dev -> libcups2-dev
andybons3322f762015-08-24 21:37:0974
andybonsad92aa32015-08-31 02:27:4475Additionally, if you're building Chromium components for Android, you'll need to
76install the package: lib32z1
andybons3322f762015-08-24 21:37:0977
andybonsad92aa32015-08-31 02:27:4478#### openSUSE Setup
andybons3322f762015-08-24 21:37:0979
andybonsad92aa32015-08-31 02:27:4480For openSUSE 11.0 and later, see
81[Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md).
82
83#### Fedora Setup
andybons3322f762015-08-24 21:37:0984
85Recent systems:
andybonsad92aa32015-08-31 02:27:4486
87```shell
andybons3322f762015-08-24 21:37:0988su -c 'yum install subversion pkgconfig python perl gcc-c++ bison \
89flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \
90atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \
91dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \
92dbus-glib-devel elfutils-libelf-devel libjpeg-devel \
93mesa-libGLU-devel libXScrnSaver-devel \
94libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel'
95```
96
andybonsad92aa32015-08-31 02:27:4497The msttcorefonts packages can be obtained by following the instructions present
98here: http://www.fedorafaq.org/#installfonts
andybons3322f762015-08-24 21:37:0999
100For the optional packages:
nodira6074d4c2015-09-01 04:26:45101
andybonsad92aa32015-08-31 02:27:44102* php-cgi is provided by the php-cli package
103* wdiff doesn't exist in Fedora repositories, a possible alternative would be
104 dwdiff
105* sun-java6-fonts doesn't exist in Fedora repositories, needs investigating
andybons3322f762015-08-24 21:37:09106
andybonsad92aa32015-08-31 02:27:44107 su -c 'yum install httpd mod_ssl php php-cli wdiff'
andybons3322f762015-08-24 21:37:09108
andybonsad92aa32015-08-31 02:27:44109#### Arch Linux Setup
110
111Most of these packages are probably already installed since they're often used,
112and the parameter --needed ensures that packages up to date are not reinstalled.
113
114```shell
nodira6074d4c2015-09-01 04:26:45115sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
andybonsad92aa32015-08-31 02:27:44116 nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \
andybons3322f762015-08-24 21:37:09117 libgnome-keyring
118```
119
120For the optional packages on Arch Linux:
andybons3322f762015-08-24 21:37:09121
andybonsad92aa32015-08-31 02:27:44122* php-cgi is provided with pacman
123* wdiff is not in the main repository but dwdiff is. You can get wdiff in
124 AUR/yaourt
125* sun-java6-fonts do not seem to be in main repository or AUR.
andybons3322f762015-08-24 21:37:09126
andybonsad92aa32015-08-31 02:27:44127For a successful build, add `'remove_webcore_debug_symbols': 1,` to the
128variables-object in include.gypi. Tested on 64-bit Arch Linux.
andybons3322f762015-08-24 21:37:09129
andybonsad92aa32015-08-31 02:27:44130TODO: Figure out how to make it build with the WebCore debug symbols. `make V=1`
131can be useful for solving the problem.
andybons3322f762015-08-24 21:37:09132
andybonsad92aa32015-08-31 02:27:44133#### Mandriva setup
andybons3322f762015-08-24 21:37:09134
andybonsad92aa32015-08-31 02:27:44135```shell
136urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \
137lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \
138lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \
139perl bison flex subversion gperf
andybons3322f762015-08-24 21:37:09140```
141
nodira6074d4c2015-09-01 04:26:45142*** note
andybonsad92aa32015-08-31 02:27:44143Note 1: msttcorefonts are not available, you will need to build your own (see
144instructions, not hard to do, see
145[mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to
146import the fonts from a windows installation
nodira6074d4c2015-09-01 04:26:45147***
andybons3322f762015-08-24 21:37:09148
nodira6074d4c2015-09-01 04:26:45149*** note
andybonsad92aa32015-08-31 02:27:44150Note 2: these packages are for 64 bit, to download the 32 bit packages,
151substitute lib64 with lib
nodira6074d4c2015-09-01 04:26:45152***
andybons3322f762015-08-24 21:37:09153
nodira6074d4c2015-09-01 04:26:45154*** note
andybonsad92aa32015-08-31 02:27:44155Note 3: some of these packages might not be explicitly necessary as they come as
156dependencies, there is no harm in including them however.
nodira6074d4c2015-09-01 04:26:45157***
andybons3322f762015-08-24 21:37:09158
andybonsad92aa32015-08-31 02:27:44159#### Gentoo setup
160
161 emerge www-client/chromium