Index: docs/linux_build_instructions.md |
diff --git a/docs/linux_build_instructions.md b/docs/linux_build_instructions.md |
index 11a3b23e224ad6f5d3f1db94290b2a817b9a213f..4f97bf2ea3ead6ccf477679c17e7b5cbcef6d9ca 100644 |
--- a/docs/linux_build_instructions.md |
+++ b/docs/linux_build_instructions.md |
@@ -1,133 +1,152 @@ |
# Linux-specific build instructions |
-[TOC] |
+## Common checkout instructions |
-## Get the code |
- |
-[Get the Code](https://www.chromium.org/developers/how-tos/get-the-code). The |
-general instructions on the "Get the code" page cover basic Linux build setup |
-and configuration. |
- |
-This page documents some additional Linux-specific build issues. |
+This page covers Linux-specific setup and configuration. The |
+[general checkout |
+instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover |
+installing depot tools and checking out the code via git. |
## Overview |
-Due its complexity, Chromium uses a set of custom tools to check out and build. |
-Here's an overview of the steps you'll run: |
- |
-1. **gclient**. A checkout involves pulling nearly 100 different SVN |
- repositories of code. This process is managed with a tool called `gclient`. |
-1. **GN**. Cross-platform build configuration system. It generates ninja |
- build files. Running `gn` is analogous to the `./configure` step seen in |
- most other software. |
-1. **ninja**. The actual build itself uses `ninja`. A prebuilt binary is in |
- `depot_tools` and should already be in your path if you followed the steps |
- to check out Chromium. |
-1. We don't provide any sort of "install" step. |
-1. You may want to |
- [use a chroot](using_a_linux_chroot.md) to |
- isolate yourself from versioning or packaging conflicts (or to run the |
- layout tests). |
+Due its complexity, Chromium uses a set of custom tools to check out and build |
+rather than configure/make like most projects. You _must_ use gclient and |
+ninja, and there is no "install" step provided. |
-## Getting a checkout |
+### System requirements |
-[Prerequisites](linux_build_instructions_prerequisites.md): what you need before |
-you build. |
+* **64-bits**: x86 builds are not supported on Linux. |
+* **Memory**: >16GB is highly recommended. |
+* **Disk space**: Expect a full checkout and build to take nearly 100GB. |
+* **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 14.04 (Trusty Tahr); we expect you will have the most |
+ luck on this platform. |
-**Note**. If you are working on Chromium OS and already have sources in |
-`chromiumos/chromium`, you **must** run `chrome_set_ver --runhooks` to set the |
-correct dependencies. This step is otherwise performed by `gclient` as part of |
-your checkout. |
+## Software setup |
-## Compilation |
+Non-Ubuntu distributions are not officially supported for building and the |
+instructions below might be outdated. |
-The "`src/`" directory is an artifact of `gclient`. Start with: |
+### Ubuntu |
- $ cd src |
+Once you have checked out the code, run |
+[build/install-build-deps.sh](/build/install-build-deps.sh) The script only |
+supports current releases as listed on https://wiki.ubuntu.com/Releases. |
+This script is used to set up the canonical builders, and as such is the most |
+up to date reference for the required prerequisites. |
-### Faster builds |
+### Debian |
-See [Linux Faster Builds](linux_faster_builds.md) |
+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: |
-### Build every test |
+* libexpat-dev -> libexpat1-dev |
+* freetype-dev -> libfreetype6-dev |
+* libbzip2-dev -> libbz2-dev |
+* libcupsys2-dev -> libcups2-dev |
- $ ninja -C out/Debug |
+Additionally, if you're building Chromium components for Android, you'll need to |
+install the package: lib32z1 |
-The above builds all libraries and tests in all components. **It will take |
-hours.** |
+### openSUSE |
-Specifying other target names to restrict the build to just what you're |
-interested in. To build just the simplest unit test: |
+For openSUSE 11.0 and later, see |
+[Linux openSUSE Build Instructions](linux_open_suse_build_instructions.md). |
- $ ninja -C out/Debug base_unittests |
+### Fedora |
-### Clang builds |
+Recent systems: |
-Information about building with Clang can be found [here](clang.md). |
+ 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 httpd \ |
+ mod_ssl php php-cli wdiff' |
-### Output |
+The msttcorefonts packages can be obtained by following the instructions |
+present [here](http://www.fedorafaq.org/#installfonts). For the optional |
+packages: |
-Executables are written in `src/out/Debug/` for Debug builds, and |
-`src/out/Release/` for Release builds. |
+* 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 |
-### Release mode |
+### Arch Linux |
-Pass `-C out/Release` to the ninja invocation: |
+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. |
- $ ninja -C out/Release chrome |
+ 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 |
-### Seeing the commands |
+For the optional packages on Arch Linux: |
-If you want to see the actual commands that ninja is invoking, add `-v` to the |
-ninja invocation. |
+* 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. |
- $ ninja -v -C out/Debug chrome |
+### Mandriva |
-This is useful if, for example, you are debugging gyp changes, or otherwise need |
-to see what ninja is actually doing. |
+ 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 |
-### Clean builds |
+* msttcorefonts are not available, you will need to build your own (see |
+instructions, not hard to do, see |
+[mandriva_msttcorefonts.md](mandriva_msttcorefonts.md)) or use drakfont to |
+import the fonts from a windows installation |
+* These packages are for 64 bit, to download the 32 bit packages, |
+substitute lib64 with lib |
+* Some of these packages might not be explicitly necessary as they come as |
+ dependencies, there is no harm in including them however. |
-You can clean the build directory (`out/Default` in this example): |
+### Gentoo |
- gn clean out/Default |
+ emerge www-client/chromium |
-This will delete all files except a bootstrap ninja file necessary for |
-recreating the build. |
- |
-Ninja can also be used to clean a build with `ninja -C out/Debug -t clean` but |
-this will not be as complete as the above methods. |
+## Troubleshooting |
### Linker Crashes |
If, during the final link stage: |
- LINK(target) out/Debug/chrome |
+ LINK out/Debug/chrome |
You get an error like: |
-``` |
-collect2: ld terminated with signal 6 Aborted terminate called after throwing an |
-instance of 'std::bad_alloc' |
+ collect2: ld terminated with signal 6 Aborted terminate called after throwing an |
+ instance of 'std::bad_alloc' |
-collect2: ld terminated with signal 11 [Segmentation fault], core dumped |
-``` |
-you are probably running out of memory when linking. Try one of: |
+ collect2: ld terminated with signal 11 [Segmentation fault], core dumped |
-1. Use the `gold` linker |
-1. Build on a 64-bit computer |
-1. Build in Release mode (debugging symbols require a lot of memory) |
-1. Build as shared libraries (note: this build is for developers only, and may |
- have broken functionality) |
+you are probably running out of memory when linking. You *must* use a 64-bit |
+system to build. Try the following build settings (see [GN build |
+configuration](https://www.chromium.org/developers/gn-build-configuration) for |
+setting): |
-Most of these are described on the [Linux Faster Builds](linux_faster_builds.md) |
-page. |
+* Build in release mode (debugging symbols require more memory). |
+ `is_debug = false` |
+* Turn off symbols. `symbol_level = 0` |
+* Build in component mode (this is for developers only, it will be slower and |
+ may have broken functionality). `is_component_build = true` |
-## Advanced Features |
+## More links |
-* Want to use the (in development) GN build workflow? See |
- [GN Quick Start](../tools/gn/docs/quick_start.md). |
-* Building frequently? See [LinuxFasterBuilds](linux_faster_builds.md). |
+* [Faster builds on Linux](linux_faster_builds.md) |
+* Information about [building with Clang](clang.md). |
+* You may want to |
+ [use a chroot](using_a_linux_chroot.md) to |
+ isolate yourself from versioning or packaging conflicts (or to run the |
+ layout tests). |
* Cross-compiling for ARM? See [LinuxChromiumArm](linux_chromium_arm.md). |
* Want to use Eclipse as your IDE? See |
[LinuxEclipseDev](linux_eclipse_dev.md). |