OLD | NEW |
| 1 # Linux Build Instructions — Prerequisites |
| 2 |
1 This page describes system requirements for building Chromium on Linux. | 3 This page describes system requirements for building Chromium on Linux. |
2 | 4 |
| 5 [TOC] |
3 | 6 |
| 7 ## System Requirements |
4 | 8 |
5 # System Requirements | 9 ### Linux distribution |
6 | 10 |
7 ## Linux distribution | 11 You should be able to build Chromium on any reasonably modern Linux |
8 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 a
nother. Internally, our development platform has been a variant of Ubuntu 14.04
(Trusty Tahr); we expect you will have the most luck on this platform, although
directions for other popular platforms are included below. | 12 distribution, but there are a lot of distributions and we sometimes break things |
| 13 on one or another. Internally, our development platform has been a variant of |
| 14 Ubuntu 14.04 (Trusty Tahr); we expect you will have the most luck on this |
| 15 platform, although directions for other popular platforms are included below. |
9 | 16 |
10 ## Disk space | 17 ### Disk space |
11 It takes about 10GB or so of disk space to check out and build the source tree.
This number grows over time. | |
12 | 18 |
13 ## Memory space | 19 It takes about 10GB or so of disk space to check out and build the source tree. |
14 It takes about 8GB of swap file to link chromium and its tests. If you get an ou
t-of-memory error during the final link, you will need to add swap space with sw
apon. It's recommended to have at least 4GB of memory available for building a s
tatically linked debug build. Dynamic linking and/or building a release build lo
wers memory requirements. People with less than 8GB of memory may want to not bu
ild tests since they are quite large. | 20 This number grows over time. |
15 | 21 |
16 ## 64-bit Systems | 22 ### Memory space |
17 Chromium can be compiled as either a 32-bit or 64-bit application. Chromium requ
ires several system libraries to compile and run. While it is possible to compil
e 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. | |
18 | 23 |
19 ## Depot tools | 24 It takes about 8GB of swap file to link chromium and its tests. If you get an |
20 Before setting up the environment, make sure you install the [depot tools](http:
//dev.chromium.org/developers/how-tos/depottools) first. | 25 out-of-memory error during the final link, you will need to add swap space with |
| 26 swapon. It's recommended to have at least 4GB of memory available for building a |
| 27 statically linked debug build. Dynamic linking and/or building a release build |
| 28 lowers memory requirements. People with less than 8GB of memory may want to not |
| 29 build tests since they are quite large. |
21 | 30 |
22 # Software Requirements | 31 ### 64-bit Systems |
23 | 32 |
24 ## Ubuntu Setup | 33 Chromium can be compiled as either a 32-bit or 64-bit application. Chromium |
25 Run [build/install-build-deps.sh](https://chromium.googlesource.com/chromium/chr
omium/+/trunk/build/install-build-deps.sh) The script only supports current rele
ases as listed on https://wiki.ubuntu.com/Releases. | 34 requires several system libraries to compile and run. While it is possible to |
| 35 compile and run a 32-bit Chromium on 64-bit Linux, many distributions are |
| 36 missing the necessary 32-bit libraries, and will result in build or run-time |
| 37 errors. |
26 | 38 |
27 Building on Linux requires software not usually installed with the distributions
. | 39 ### Depot tools |
28 The script attempts to automate installing the required software. This script i
s used to set up the canonical builders, and as such is the most up to date refe
rence for the required prerequisites. | |
29 | 40 |
30 ## Other distributions | 41 Before setting up the environment, make sure you install the |
31 Note: Other distributions are not officially supported for building and the inst
ructions below might be outdated. | 42 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) first. |
32 | 43 |
33 ### Debian Setup | 44 ## Software Requirements |
| 45 |
| 46 ### Ubuntu Setup |
| 47 |
| 48 Run [build/install-build-deps.sh](build/install-build-deps.sh) The script only |
| 49 supports current releases as listed on https://wiki.ubuntu.com/Releases. |
| 50 |
| 51 Building on Linux requires software not usually installed with the |
| 52 distributions. |
| 53 |
| 54 The script attempts to automate installing the required software. This script is |
| 55 used to set up the canonical builders, and as such is the most up to date |
| 56 reference for the required prerequisites. |
| 57 |
| 58 ### Other distributions |
| 59 |
| 60 Note: Other distributions are not officially supported for building and the |
| 61 instructions below might be outdated. |
| 62 |
| 63 #### Debian Setup |
34 | 64 |
35 Follow the Ubuntu instructions above. | 65 Follow the Ubuntu instructions above. |
36 | 66 |
37 If you want to install the build-deps manually, note that the original packages
are for Ubuntu. Here are the Debian equivalents: | 67 If you want to install the build-deps manually, note that the original packages |
38 * libexpat-dev -> libexpat1-dev | 68 are for Ubuntu. Here are the Debian equivalents: |
39 * freetype-dev -> libfreetype6-dev | |
40 * libbzip2-dev -> libbz2-dev | |
41 * libcupsys2-dev -> libcups2-dev | |
42 | 69 |
43 Additionally, if you're building Chromium components for Android, you'll need to
install the package: lib32z1 | 70 * libexpat-dev -> libexpat1-dev |
| 71 * freetype-dev -> libfreetype6-dev |
| 72 * libbzip2-dev -> libbz2-dev |
| 73 * libcupsys2-dev -> libcups2-dev |
44 | 74 |
45 ### openSUSE Setup | 75 Additionally, if you're building Chromium components for Android, you'll need to |
| 76 install the package: lib32z1 |
46 | 77 |
47 For openSUSE 11.0 and later, see [Linux openSUSE Build Instructions](LinuxOpenSu
seBuildInstructions.md). | 78 #### openSUSE Setup |
48 | 79 |
49 ### Fedora Setup | 80 For openSUSE 11.0 and later, see |
| 81 [Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md). |
| 82 |
| 83 #### Fedora Setup |
50 | 84 |
51 Recent systems: | 85 Recent systems: |
52 ``` | 86 |
| 87 ```shell |
53 su -c 'yum install subversion pkgconfig python perl gcc-c++ bison \ | 88 su -c 'yum install subversion pkgconfig python perl gcc-c++ bison \ |
54 flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \ | 89 flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \ |
55 atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \ | 90 atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \ |
56 dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \ | 91 dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \ |
57 dbus-glib-devel elfutils-libelf-devel libjpeg-devel \ | 92 dbus-glib-devel elfutils-libelf-devel libjpeg-devel \ |
58 mesa-libGLU-devel libXScrnSaver-devel \ | 93 mesa-libGLU-devel libXScrnSaver-devel \ |
59 libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel' | 94 libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel' |
60 ``` | 95 ``` |
61 | 96 |
62 The msttcorefonts packages can be obtained by following the instructions present
here: http://www.fedorafaq.org/#installfonts | 97 The msttcorefonts packages can be obtained by following the instructions present |
| 98 here: http://www.fedorafaq.org/#installfonts |
63 | 99 |
64 For the optional packages: | 100 For the optional packages: |
65 * php-cgi is provided by the php-cli package | 101 * php-cgi is provided by the php-cli package |
66 * wdiff doesn't exist in Fedora repositories, a possible alternative would be
dwdiff | 102 * wdiff doesn't exist in Fedora repositories, a possible alternative would be |
67 * sun-java6-fonts doesn't exist in Fedora repositories, needs investigating | 103 dwdiff |
| 104 * sun-java6-fonts doesn't exist in Fedora repositories, needs investigating |
68 | 105 |
69 ``` | 106 su -c 'yum install httpd mod_ssl php php-cli wdiff' |
70 su -c 'yum install httpd mod_ssl php php-cli wdiff' | |
71 ``` | |
72 | 107 |
73 ### Arch Linux Setup | 108 |
74 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. | 109 #### Arch Linux Setup |
75 ``` | 110 |
76 $ sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig ns
s \ | 111 Most of these packages are probably already installed since they're often used, |
77 alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \ | 112 and the parameter --needed ensures that packages up to date are not reinstalled. |
| 113 |
| 114 ```shell |
| 115 $ sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \ |
| 116 nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \ |
78 libgnome-keyring | 117 libgnome-keyring |
79 ``` | 118 ``` |
80 | 119 |
81 For the optional packages on Arch Linux: | 120 For the optional packages on Arch Linux: |
82 * php-cgi is provided with pacman | |
83 * wdiff is not in the main repository but dwdiff is. You can get wdiff in AUR/
yaourt | |
84 * sun-java6-fonts do not seem to be in main repository or AUR. | |
85 | 121 |
86 For a successful build, add `'remove_webcore_debug_symbols': 1,` to the variable
s-object in include.gypi. Tested on 64-bit Arch Linux. | 122 * 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. |
87 | 126 |
88 TODO: Figure out how to make it build with the WebCore debug symbols. `make V=1`
can be useful for solving the problem. | 127 For a successful build, add `'remove_webcore_debug_symbols': 1,` to the |
| 128 variables-object in include.gypi. Tested on 64-bit Arch Linux. |
89 | 129 |
| 130 TODO: Figure out how to make it build with the WebCore debug symbols. `make V=1` |
| 131 can be useful for solving the problem. |
90 | 132 |
91 ### Mandriva setup | 133 #### Mandriva setup |
92 | 134 |
93 ``` | 135 ```shell |
94 urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel lib64GConf2-devel
\ | 136 urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \ |
95 lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel lib64pango1.0-devel
\ | 137 lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \ |
96 lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python perl bison flex subve
rsion \ | 138 lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \ |
97 gperf | 139 perl bison flex subversion gperf |
98 ``` | 140 ``` |
99 | 141 |
100 Note 1: msttcorefonts are not available, you will need to build your own (see in
structions, not hard to do, see http://code.google.com/p/chromium/wiki/MandrivaM
sttcorefonts ) or use drakfont to import the fonts from a windows installation | 142 Note 1: msttcorefonts are not available, you will need to build your own (see |
| 143 instructions, not hard to do, see |
| 144 [mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to |
| 145 import the fonts from a windows installation |
101 | 146 |
102 Note 2: these packages are for 64 bit, to download the 32 bit packages, substitu
te lib64 with lib | 147 Note 2: these packages are for 64 bit, to download the 32 bit packages, |
| 148 substitute lib64 with lib |
103 | 149 |
104 Note 3: some of these packages might not be explicitly necessary as they come as
dependencies, there is no harm in including them however. | 150 Note 3: some of these packages might not be explicitly necessary as they come as |
| 151 dependencies, there is no harm in including them however. |
105 | 152 |
106 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: | 153 Note 4: to build on 64 bit systems use, instead of |
| 154 `GYP_DEFINES=target_arch=x64`, as mentioned in the general notes for building on |
| 155 64 bit: |
107 | 156 |
108 ``` | 157 ```shell |
109 export GYP_DEFINES="target_arch=x64" | 158 export GYP_DEFINES="target_arch=x64" |
110 gclient runhooks --force | 159 gclient runhooks --force |
111 ``` | 160 ``` |
112 | 161 |
113 ### Gentoo setup | 162 #### Gentoo setup |
114 ``` | 163 |
115 emerge www-client/chromium | 164 emerge www-client/chromium |
116 ``` | |
OLD | NEW |