| OLD | NEW |
| 1 # Linux Build Instructions — Prerequisites | 1 # Linux Build Instructions Prerequisites |
| 2 | 2 |
| 3 This page describes system requirements for building Chromium on Linux. | 3 The contents of this page have been folded into the |
| 4 [Linux build instructions](linux_build_instructions.md). |
| 4 | 5 |
| 5 [TOC] | 6 This file will be deleted in the future, please update your links. |
| 6 | 7 |
| 7 ## System Requirements | |
| 8 | |
| 9 ### Linux distribution | |
| 10 | |
| 11 You should be able to build Chromium on any reasonably modern Linux | |
| 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. | |
| 16 | |
| 17 ### Disk space | |
| 18 | |
| 19 It takes about 10GB or so of disk space to check out and build the source tree. | |
| 20 This number grows over time. | |
| 21 | |
| 22 ### Memory space | |
| 23 | |
| 24 It takes about 8GB of swap file to link chromium and its tests. If you get an | |
| 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. | |
| 30 | |
| 31 ### 64-bit Systems | |
| 32 | |
| 33 Chromium can be compiled as either a 32-bit or 64-bit application. Chromium | |
| 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. | |
| 38 | |
| 39 ### Depot tools | |
| 40 | |
| 41 Before setting up the environment, make sure you install the | |
| 42 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) first. | |
| 43 | |
| 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 | |
| 64 | |
| 65 Follow the Ubuntu instructions above. | |
| 66 | |
| 67 If you want to install the build-deps manually, note that the original packages | |
| 68 are for Ubuntu. Here are the Debian equivalents: | |
| 69 | |
| 70 * libexpat-dev -> libexpat1-dev | |
| 71 * freetype-dev -> libfreetype6-dev | |
| 72 * libbzip2-dev -> libbz2-dev | |
| 73 * libcupsys2-dev -> libcups2-dev | |
| 74 | |
| 75 Additionally, if you're building Chromium components for Android, you'll need to | |
| 76 install the package: lib32z1 | |
| 77 | |
| 78 #### openSUSE Setup | |
| 79 | |
| 80 For openSUSE 11.0 and later, see | |
| 81 [Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md). | |
| 82 | |
| 83 #### Fedora Setup | |
| 84 | |
| 85 Recent systems: | |
| 86 | |
| 87 ```shell | |
| 88 su -c 'yum install subversion pkgconfig python perl gcc-c++ bison \ | |
| 89 flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \ | |
| 90 atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \ | |
| 91 dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \ | |
| 92 dbus-glib-devel elfutils-libelf-devel libjpeg-devel \ | |
| 93 mesa-libGLU-devel libXScrnSaver-devel \ | |
| 94 libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel' | |
| 95 ``` | |
| 96 | |
| 97 The msttcorefonts packages can be obtained by following the instructions present | |
| 98 here: http://www.fedorafaq.org/#installfonts | |
| 99 | |
| 100 For the optional packages: | |
| 101 | |
| 102 * 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 | |
| 106 | |
| 107 su -c 'yum install httpd mod_ssl php php-cli wdiff' | |
| 108 | |
| 109 #### Arch Linux Setup | |
| 110 | |
| 111 Most of these packages are probably already installed since they're often used, | |
| 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 \ | |
| 117 libgnome-keyring | |
| 118 ``` | |
| 119 | |
| 120 For the optional packages on Arch Linux: | |
| 121 | |
| 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. | |
| 126 | |
| 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. | |
| 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. | |
| 132 | |
| 133 #### Mandriva setup | |
| 134 | |
| 135 ```shell | |
| 136 urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \ | |
| 137 lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \ | |
| 138 lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \ | |
| 139 perl bison flex subversion gperf | |
| 140 ``` | |
| 141 | |
| 142 *** note | |
| 143 Note 1: msttcorefonts are not available, you will need to build your own (see | |
| 144 instructions, not hard to do, see | |
| 145 [mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to | |
| 146 import the fonts from a windows installation | |
| 147 *** | |
| 148 | |
| 149 *** note | |
| 150 Note 2: these packages are for 64 bit, to download the 32 bit packages, | |
| 151 substitute lib64 with lib | |
| 152 *** | |
| 153 | |
| 154 *** note | |
| 155 Note 3: some of these packages might not be explicitly necessary as they come as | |
| 156 dependencies, there is no harm in including them however. | |
| 157 *** | |
| 158 | |
| 159 #### Gentoo setup | |
| 160 | |
| 161 emerge www-client/chromium | |
| OLD | NEW |