blob: 8eefade2eab0c30c39e01d4fdfb6912499fa791e [file] [log] [blame] [view]
dpranke0ae7cad2016-11-30 07:47:581# Checking out and building Chromium on Linux
andybons3322f762015-08-24 21:37:092
Victor Costan44af72b2017-11-13 20:01:303There are instructions for other platforms linked from the
Nicolas Norvezba040062020-01-15 01:17:264[get the code](../get_the_code.md) page.
dpranke1a70d0c2016-12-01 02:42:295
dpranke1a70d0c2016-12-01 02:42:296## Instructions for Google Employees
7
8Are you a Google employee? See
9[go/building-chrome](https://goto.google.com/building-chrome) instead.
andybons8c02a1f2015-09-04 17:02:3210
dpranke0ae7cad2016-11-30 07:47:5811[TOC]
andybonsad92aa32015-08-31 02:27:4412
dpranke0ae7cad2016-11-30 07:47:5813## System requirements
andybonsad92aa32015-08-31 02:27:4414
Bruce Dawsonc2661722024-06-12 19:44:2915* An x86-64 machine with at least 8GB of RAM. More than 16GB is highly
Omar Shawky971848ce2024-04-17 21:47:3016 recommended. If your machine has an SSD, it is recommended to have
17 \>=32GB/>=16GB of swap for machines with 8GB/16GB of RAM respectively.
18* At least 100GB of free disk space. It does not have to be on the same drive;
19 Allocate ~50-80GB on HDD for build.
20* You must have Git and Python v3.8+ installed already (and `python3` must point
Dirk Pranke8766b622c2023-08-30 23:19:3621 to a Python v3.8+ binary). Depot_tools bundles an appropriate version
22 of Python in `$depot_tools/python-bin`, if you don't have an appropriate
23 version already on your system.
Peter Kastingbeb265c2024-10-31 20:22:5624* `libc++` is currently the only supported STL. `clang` is the only
25 officially-supported compiler, though external community members generally
26 keep things building with `gcc`. For more details, see the
27 [supported toolchains doc](../toolchain_support.md).
Ben Pastened89a45b2023-06-28 22:57:3428
29Most development is done on Ubuntu (Chromium's build infrastructure currently
30runs 22.04, Jammy Jellyfish). There are some instructions for other distros
Omar Shawky08b259c2024-03-27 19:52:1731below, but they are mostly unsupported, but installation instructions can be found in [Docker](#docker).
andybons3322f762015-08-24 21:37:0932
dpranke0ae7cad2016-11-30 07:47:5833## Install `depot_tools`
andybonsad92aa32015-08-31 02:27:4434
sdy93387fa2016-12-01 01:03:4435Clone the `depot_tools` repository:
andybons3322f762015-08-24 21:37:0936
sdy93387fa2016-12-01 01:03:4437```shell
38$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
39```
andybonsad92aa32015-08-31 02:27:4440
mark a. foltz89670afb2023-08-20 18:14:0741Add `depot_tools` to the beginning of your `PATH` (you will probably want to put
42this in your `~/.bashrc` or `~/.zshrc`). Assuming you cloned `depot_tools` to
sdy93387fa2016-12-01 01:03:4443`/path/to/depot_tools`:
andybonsad92aa32015-08-31 02:27:4444
sdy93387fa2016-12-01 01:03:4445```shell
mark a. foltz89670afb2023-08-20 18:14:0746$ export PATH="/path/to/depot_tools:$PATH"
sdy93387fa2016-12-01 01:03:4447```
andybons3322f762015-08-24 21:37:0948
Claudio DeSouzaae44ac12018-02-13 16:11:4549When cloning `depot_tools` to your home directory **do not** use `~` on PATH,
50otherwise `gclient runhooks` will fail to run. Rather, you should use either
51`$HOME` or the absolute path:
52
53```shell
mark a. foltz89670afb2023-08-20 18:14:0754$ export PATH="${HOME}/depot_tools:$PATH"
Claudio DeSouzaae44ac12018-02-13 16:11:4555```
56
dpranke0ae7cad2016-11-30 07:47:5857## Get the code
andybonsad92aa32015-08-31 02:27:4458
sdy93387fa2016-12-01 01:03:4459Create a `chromium` directory for the checkout and change to it (you can call
60this whatever you like and put it wherever you like, as long as the full path
61has no spaces):
62
63```shell
64$ mkdir ~/chromium && cd ~/chromium
65```
andybons3322f762015-08-24 21:37:0966
dpranke0ae7cad2016-11-30 07:47:5867Run the `fetch` tool from depot_tools to check out the code and its
68dependencies.
andybonsad92aa32015-08-31 02:27:4469
sdy93387fa2016-12-01 01:03:4470```shell
71$ fetch --nohooks chromium
72```
andybonsad92aa32015-08-31 02:27:4473
Delan Azabani43eefa3d2024-05-09 03:39:3374*** note
75**NixOS users:** tools like `fetch` wont work without a Nix shell. Clone [the
76tools repo](https://chromium.googlesource.com/chromium/src/tools) with `git`,
77then run `nix-shell tools/nix/shell.nix`.
78***
79
dpranke0ae7cad2016-11-30 07:47:5880If you don't want the full repo history, you can save a lot of time by
sdy93387fa2016-12-01 01:03:4481adding the `--no-history` flag to `fetch`.
andybons3322f762015-08-24 21:37:0982
dpranke0ae7cad2016-11-30 07:47:5883Expect the command to take 30 minutes on even a fast connection, and many
84hours on slower ones.
andybonsad92aa32015-08-31 02:27:4485
dpranke0ae7cad2016-11-30 07:47:5886If you've already installed the build dependencies on the machine (from another
sdy93387fa2016-12-01 01:03:4487checkout, for example), you can omit the `--nohooks` flag and `fetch`
dpranke0ae7cad2016-11-30 07:47:5888will automatically execute `gclient runhooks` at the end.
andybons3322f762015-08-24 21:37:0989
sdy93387fa2016-12-01 01:03:4490When `fetch` completes, it will have created a hidden `.gclient` file and a
91directory called `src` in the working directory. The remaining instructions
92assume you have switched to the `src` directory:
andybons3322f762015-08-24 21:37:0993
sdy93387fa2016-12-01 01:03:4494```shell
95$ cd src
96```
andybons3322f762015-08-24 21:37:0997
dpranke0ae7cad2016-11-30 07:47:5898### Install additional build dependencies
andybons3322f762015-08-24 21:37:0999
dpranke0ae7cad2016-11-30 07:47:58100Once you have checked out the code, and assuming you're using Ubuntu, run
101[build/install-build-deps.sh](/build/install-build-deps.sh)
andybons3322f762015-08-24 21:37:09102
Aaron Gable3bc93682019-01-11 02:16:07103```shell
104$ ./build/install-build-deps.sh
105```
106
dpranke2989a782016-12-02 02:57:12107You may need to adjust the build dependencies for other distros. There are
Omar Shawky971848ce2024-04-17 21:47:30108some [notes](#notes-for-other-distros) at the end of this document, but we make no guarantees
dpranke2989a782016-12-02 02:57:12109for their accuracy.
andybonsad92aa32015-08-31 02:27:44110
dpranke0ae7cad2016-11-30 07:47:58111### Run the hooks
andybons3322f762015-08-24 21:37:09112
dpranke0ae7cad2016-11-30 07:47:58113Once you've run `install-build-deps` at least once, you can now run the
sdy93387fa2016-12-01 01:03:44114Chromium-specific hooks, which will download additional binaries and other
dpranke0ae7cad2016-11-30 07:47:58115things you might need:
andybonsad92aa32015-08-31 02:27:44116
sdy93387fa2016-12-01 01:03:44117```shell
118$ gclient runhooks
119```
andybonsad92aa32015-08-31 02:27:44120
sdy93387fa2016-12-01 01:03:44121*Optional*: You can also [install API
122keys](https://www.chromium.org/developers/how-tos/api-keys) if you want your
123build to talk to some Google services, but this is not necessary for most
124development and testing purposes.
andybons3322f762015-08-24 21:37:09125
dpranke1a70d0c2016-12-01 02:42:29126## Setting up the build
andybonsad92aa32015-08-31 02:27:44127
Tom Bridgwatereef401542018-08-17 00:54:43128Chromium uses [Ninja](https://ninja-build.org) as its main build tool along with
Andrew Williamsbbc1a1e2021-07-21 01:51:22129a tool called [GN](https://gn.googlesource.com/gn/+/main/docs/quick_start.md)
Tom Bridgwatereef401542018-08-17 00:54:43130to generate `.ninja` files. You can create any number of *build directories*
131with different configurations. To create a build directory, run:
andybons8c02a1f2015-09-04 17:02:32132
sdy93387fa2016-12-01 01:03:44133```shell
134$ gn gen out/Default
135```
dpranke0ae7cad2016-11-30 07:47:58136
sdy93387fa2016-12-01 01:03:44137* You only have to run this once for each new build directory, Ninja will
138 update the build files as needed.
139* You can replace `Default` with another name, but
140 it should be a subdirectory of `out`.
141* For other build arguments, including release settings, see [GN build
142 configuration](https://www.chromium.org/developers/gn-build-configuration).
dpranke0ae7cad2016-11-30 07:47:58143 The default will be a debug component build matching the current host
144 operating system and CPU.
145* For more info on GN, run `gn help` on the command line or read the
Andrew Williamsbbc1a1e2021-07-21 01:51:22146 [quick start guide](https://gn.googlesource.com/gn/+/main/docs/quick_start.md).
dpranke0ae7cad2016-11-30 07:47:58147
Omar Shawky971848ce2024-04-17 21:47:30148### Faster builds
dpranke0ae7cad2016-11-30 07:47:58149
dpranke2989a782016-12-02 02:57:12150This section contains some things you can change to speed up your builds,
151sorted so that the things that make the biggest difference are first.
152
Andrew Williams54da9cc2024-01-09 17:32:23153#### Use Reclient
Takuto Ikuta66f5de82023-09-08 03:55:44154
Takuto Ikuta776547282023-11-10 01:42:33155*** note
Philipp Wollermann43f9cb82023-11-27 05:33:19156**Warning:** If you are a Google employee, do not follow the instructions below.
Andrew Williams54da9cc2024-01-09 17:32:23157See
158[go/chrome-linux-build#setup-remote-execution](https://goto.google.com/chrome-linux-build#setup-remote-execution)
Philipp Wollermann43f9cb82023-11-27 05:33:19159instead.
Takuto Ikuta776547282023-11-10 01:42:33160***
161
Philipp Wollermann43f9cb82023-11-27 05:33:19162Chromium's build can be sped up significantly by using a remote execution system
163compatible with [REAPI](https://github.com/bazelbuild/remote-apis). This allows
164you to benefit from remote caching and executing many build actions in parallel
165on a shared cluster of workers.
166
Takuto Ikuta1b118a82023-11-28 05:55:25167For contributors who have
168[tryjob access](https://www.chromium.org/getting-involved/become-a-committer/#try-job-access)
169, please ask a Googler to email [email protected] on your behalf to access
170RBE backend paid by Google. Note that reclient for external contributors is a
171best-effort process. We do not guarantee when you will be invited. Reach out to
172[[email protected]](https://groups.google.com/a/chromium.org/g/reclient-users)
Andrew Williams54da9cc2024-01-09 17:32:23173if you have any questions about reclient usage.
Takuto Ikuta1b118a82023-11-28 05:55:25174
Philipp Wollermann43f9cb82023-11-27 05:33:19175To get started, you need access to an REAPI-compatible backend. The following
176instructions assume that you received an invitation from Google to use
177Chromium's RBE service and were granted access to it. However, you are welcome
178to use any of the
179[other compatible backends](https://github.com/bazelbuild/remote-apis#servers),
180in which case you will have to adapt the following instructions regarding the
181authentication method, instance name, etc. to work with your backend.
182
183Chromium's build uses a client developed by Google called
184[reclient](https://github.com/bazelbuild/reclient) to remotely execute build
185actions. If you would like to use `reclient` with RBE, you'll first need to:
186
1871. [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install). You can
188 pick any installation method from that page that works best for you.
1892. Run `gcloud auth login --update-adc` and login with your authorized
190 account. Ignore the message about the `--update-adc` flag being deprecated.
191
192Next, you'll have to specify your `rbe_instance` in your `.gclient`
193configuration to use the correct one for Chromium contributors:
194
Michael Savigny95600992024-04-10 13:59:10195*** note
196**Warning:** If you are a Google employee, do not follow the instructions below.
197See
198[go/chrome-linux-build#setup-remote-execution](https://goto.google.com/chrome-linux-build#setup-remote-execution)
199instead.
200***
201
Takuto Ikuta66f5de82023-09-08 03:55:44202```
203solutions = [
204 {
205 ...,
206 "custom_vars": {
Philipp Wollermann43f9cb82023-11-27 05:33:19207 # This is the correct instance name for using Chromium's RBE service.
208 # You can only use it if you were granted access to it. If you use your
209 # own REAPI-compatible backend, you will need to change this accordingly
210 # to its requirements.
211 "rbe_instance": "projects/rbe-chromium-untrusted/instances/default_instance",
Takuto Ikuta66f5de82023-09-08 03:55:44212 },
213 },
214]
215```
Philipp Wollermann43f9cb82023-11-27 05:33:19216
Omar Shawky971848ce2024-04-17 21:47:30217And run `gclient sync`. This will regenerate the config files in
Philipp Wollermann43f9cb82023-11-27 05:33:19218`buildtools/reclient_cfgs` to use the `rbe_instance` that you just added to your
219`.gclient` file.
220
221Then, add the following GN args to your `args.gn`:
222
Takuto Ikuta66f5de82023-09-08 03:55:44223```
Philipp Wollermann43f9cb82023-11-27 05:33:19224use_remoteexec = true
Junji Watanabe4164a6f2024-05-24 03:33:49225reclient_cfg_dir = "../../buildtools/reclient_cfgs/linux"
Takuto Ikuta66f5de82023-09-08 03:55:44226```
227
Brendon Tiszka62a800b2024-05-27 10:25:38228*** note
229If you are building an older version of Chrome with reclient you will need to
230use `rbe_cfg_dir = "../../buildtools/reclient_cfgs_linux"`
231***
232
Philipp Wollermann43f9cb82023-11-27 05:33:19233That's it. Remember to always use `autoninja` for building Chromium as described
234below, which handles the startup and shutdown of the reproxy daemon process
235that's required during the build, instead of directly invoking `ninja`.
236
dpranke2989a782016-12-02 02:57:12237#### Disable NaCl
238
239By default, the build includes support for
240[Native Client (NaCl)](https://developer.chrome.com/native-client), but
Victor Costan44af72b2017-11-13 20:01:30241most of the time you won't need it. You can set the GN argument
dpranke2989a782016-12-02 02:57:12242`enable_nacl=false` and it won't be built.
243
244#### Include fewer debug symbols
245
246By default GN produces a build with all of the debug assertions enabled
247(`is_debug=true`) and including full debug info (`symbol_level=2`). Setting
248`symbol_level=1` will produce enough information for stack traces, but not
249line-by-line debugging. Setting `symbol_level=0` will include no debug
250symbols at all. Either will speed up the build compared to full symbols.
251
Bruce Dawson63e0be72021-11-29 20:34:41252#### Disable debug symbols for Blink and v8
dpranke2989a782016-12-02 02:57:12253
254Due to its extensive use of templates, the Blink code produces about half
255of our debug symbols. If you don't ever need to debug Blink, you can set
Bruce Dawson63e0be72021-11-29 20:34:41256the GN arg `blink_symbol_level=0`. Similarly, if you don't need to debug v8 you
257can improve build speeds by setting the GN arg `v8_symbol_level=0`.
dpranke2989a782016-12-02 02:57:12258
259#### Use Icecc
260
261[Icecc](https://github.com/icecc/icecream) is the distributed compiler with a
262central scheduler to share build load. Currently, many external contributors use
Ho Cheung7c53eaf2024-05-31 00:31:26263it. e.g. Intel, Opera, Samsung (this is not useful if you're using Reclient).
dpranke2989a782016-12-02 02:57:12264
265In order to use `icecc`, set the following GN args:
266
267```
dpranke2989a782016-12-02 02:57:12268use_debug_fission=false
269is_clang=false
dpranke2989a782016-12-02 02:57:12270```
271
Victor Costan44af72b2017-11-13 20:01:30272See these links for more on the
dpranke2989a782016-12-02 02:57:12273[bundled_binutils limitation](https://github.com/icecc/icecream/commit/b2ce5b9cc4bd1900f55c3684214e409fa81e7a92),
274the [debug fission limitation](http://gcc.gnu.org/wiki/DebugFission).
275
276Using the system linker may also be necessary when using glibc 2.21 or newer.
277See [related bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808181).
278
279#### ccache
280
David Sandersddc9a7f2022-01-28 03:19:19281You can use [ccache](https://ccache.dev) to speed up local builds (again,
Ho Cheung7c53eaf2024-05-31 00:31:26282this is not useful if you're using Reclient).
dpranke2989a782016-12-02 02:57:12283
284Increase your ccache hit rate by setting `CCACHE_BASEDIR` to a parent directory
285that the working directories all have in common (e.g.,
286`/home/yourusername/development`). Consider using
287`CCACHE_SLOPPINESS=include_file_mtime` (since if you are using multiple working
288directories, header times in svn sync'ed portions of your trees will be
289different - see
David Sandersddc9a7f2022-01-28 03:19:19290[the ccache troubleshooting section](https://ccache.dev/manual/latest.html#_troubleshooting)
dpranke2989a782016-12-02 02:57:12291for additional information). If you use symbolic links from your home directory
292to get to the local physical disk directory where you keep those working
293development directories, consider putting
294
Omar Shawky971848ce2024-04-17 21:47:30295```
296alias cd="cd -P"
297```
dpranke2989a782016-12-02 02:57:12298
299in your `.bashrc` so that `$PWD` or `cwd` always refers to a physical, not
300logical directory (and make sure `CCACHE_BASEDIR` also refers to a physical
301parent).
302
303If you tune ccache correctly, a second working directory that uses a branch
304tracking trunk and is up to date with trunk and was gclient sync'ed at about the
305same time should build chrome in about 1/3 the time, and the cache misses as
306reported by `ccache -s` should barely increase.
307
Song Fangzhen4b68a6e32021-07-14 05:53:40308This is especially useful if you use
309[git-worktree](http://git-scm.com/docs/git-worktree) and keep multiple local
dpranke2989a782016-12-02 02:57:12310working directories going at once.
311
312#### Using tmpfs
313
314You can use tmpfs for the build output to reduce the amount of disk writes
315required. I.e. mount tmpfs to the output directory where the build output goes:
316
317As root:
Omar Shawky971848ce2024-04-17 21:47:30318```
319mount -t tmpfs -o size=20G,nr_inodes=40k,mode=1777 tmpfs /path/to/out
320```
dpranke2989a782016-12-02 02:57:12321
322*** note
323**Caveat:** You need to have enough RAM + swap to back the tmpfs. For a full
324debug build, you will need about 20 GB. Less for just building the chrome target
325or for a release build.
326***
327
328Quick and dirty benchmark numbers on a HP Z600 (Intel core i7, 16 cores
329hyperthreaded, 12 GB RAM)
330
Omar Shawky971848ce2024-04-17 21:47:30331* With tmpfs:
332 * 12m:20s
333* Without tmpfs
334 * 15m:40s
dpranke2989a782016-12-02 02:57:12335
Bruce Dawsonbe823202022-03-10 23:40:50336### Smaller builds
337
338The Chrome binary contains embedded symbols by default. You can reduce its size
339by using the Linux `strip` command to remove this debug information. You can
Peter Boström38748962023-05-08 21:24:26340also reduce binary size and turn on all optimizations by enabling official build
341mode, with the GN arg `is_official_build = true`.
Bruce Dawsonbe823202022-03-10 23:40:50342
dpranke0ae7cad2016-11-30 07:47:58343## Build Chromium
344
345Build Chromium (the "chrome" target) with Ninja using the command:
346
sdy93387fa2016-12-01 01:03:44347```shell
Max Morozf5b31fcd2018-08-10 21:55:48348$ autoninja -C out/Default chrome
sdy93387fa2016-12-01 01:03:44349```
dpranke0ae7cad2016-11-30 07:47:58350
Dirk Pranke8bd55f22018-10-24 21:22:10351(`autoninja` is a wrapper that automatically provides optimal values for the
352arguments passed to `ninja`.)
Max Morozf5b31fcd2018-08-10 21:55:48353
sdy93387fa2016-12-01 01:03:44354You can get a list of all of the other build targets from GN by running `gn ls
355out/Default` from the command line. To compile one, pass the GN label to Ninja
Max Morozf5b31fcd2018-08-10 21:55:48356with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
sdy93387fa2016-12-01 01:03:44357out/Default chrome/test:unit_tests`).
dpranke0ae7cad2016-11-30 07:47:58358
Junji Watanabe7037b95f2024-04-22 06:14:15359## Compile a single file
360
361Ninja supports a special [syntax `^`][ninja hat syntax] to compile a single object file specyfing
362the source file. For example, `autoninja -C out/Default ../../base/logging.cc^`
363compiles `obj/base/base/logging.o`.
364
365[ninja hat syntax]: https://ninja-build.org/manual.html#:~:text=There%20is%20also%20a%20special%20syntax%20target%5E%20for%20specifying%20a%20target%20as%20the%20first%20output%20of%20some%20rule%20containing%20the%20source%20you%20put%20in%20the%20command%20line%2C%20if%20one%20exists.%20For%20example%2C%20if%20you%20specify%20target%20as%20foo.c%5E%20then%20foo.o%20will%20get%20built%20(assuming%20you%20have%20those%20targets%20in%20your%20build%20files)
366
367In addition to `foo.cc^`, Siso also supports `foo.h^` syntax to compile
368the corresponding `foo.o` if it exists.
369
dpranke0ae7cad2016-11-30 07:47:58370## Run Chromium
371
372Once it is built, you can simply run the browser:
373
sdy93387fa2016-12-01 01:03:44374```shell
375$ out/Default/chrome
376```
dpranke0ae7cad2016-11-30 07:47:58377
Victor Viannaeda6fcc42023-03-14 17:18:22378If you're using a remote machine that supports Chrome Remote Desktop, you can
379add this to your .bashrc / .bash_profile.
380
381```shell
382if [[ -z "${DISPLAY}" ]]; then
Victor Hugo Vianna Silva451142c22024-07-08 21:37:41383 # In reality, Chrome Remote Desktop starts with 20 and increases until it
384 # finds an available ID [1]. So this isn't guaranteed to always work, but
385 # should work on the vast majoriy of cases.
386 #
387 # [1] https://source.chromium.org/chromium/chromium/src/+/main:remoting/host/linux/linux_me2me_host.py;l=112;drc=464a632e21bcec76c743930d4db8556613e21fd8
388 export DISPLAY=:20
Victor Viannaeda6fcc42023-03-14 17:18:22389fi
390```
391
392This means if you launch Chrome from an SSH session, the UI output will be
393available in Chrome Remote Desktop.
394
dpranke0ae7cad2016-11-30 07:47:58395## Running test targets
396
Andrew Williamsfa9b7d62023-03-20 15:48:28397Tests are split into multiple test targets based on their type and where they
398exist in the directory structure. To see what target a given unit test or
399browser test file corresponds to, the following command can be used:
400
401```shell
402$ gn refs out/Default --testonly=true --type=executable --all chrome/browser/ui/browser_list_unittest.cc
403//chrome/test:unit_tests
404```
405
406In the example above, the target is unit_tests. The unit_tests binary can be
407built by running the following command:
Fred Shih865fb8f2022-02-03 03:54:19408
409```shell
410$ autoninja -C out/Default unit_tests
411```
412
413You can run the tests by running the unit_tests binary. You can also limit which
414tests are run using the `--gtest_filter` arg, e.g.:
dpranke0ae7cad2016-11-30 07:47:58415
sdy93387fa2016-12-01 01:03:44416```shell
Andrew Williamsfa9b7d62023-03-20 15:48:28417$ out/Default/unit_tests --gtest_filter="BrowserListUnitTest.*"
sdy93387fa2016-12-01 01:03:44418```
dpranke0ae7cad2016-11-30 07:47:58419
420You can find out more about GoogleTest at its
421[GitHub page](https://github.com/google/googletest).
422
423## Update your checkout
424
425To update an existing checkout, you can run
426
sdy93387fa2016-12-01 01:03:44427```shell
428$ git rebase-update
429$ gclient sync
430```
dpranke0ae7cad2016-11-30 07:47:58431
432The first command updates the primary Chromium source repository and rebases
sdy93387fa2016-12-01 01:03:44433any of your local branches on top of tip-of-tree (aka the Git branch
Andrew Williamsbbc1a1e2021-07-21 01:51:22434`origin/main`). If you don't want to use this script, you can also just use
sdy93387fa2016-12-01 01:03:44435`git pull` or other common Git commands to update the repo.
dpranke0ae7cad2016-11-30 07:47:58436
sdy93387fa2016-12-01 01:03:44437The second command syncs dependencies to the appropriate versions and re-runs
438hooks as needed.
dpranke0ae7cad2016-11-30 07:47:58439
440## Tips, tricks, and troubleshooting
andybons3322f762015-08-24 21:37:09441
442### Linker Crashes
andybonsad92aa32015-08-31 02:27:44443
andybons3322f762015-08-24 21:37:09444If, during the final link stage:
andybonsad92aa32015-08-31 02:27:44445
sdy93387fa2016-12-01 01:03:44446```
447LINK out/Debug/chrome
448```
andybonsad92aa32015-08-31 02:27:44449
andybons3322f762015-08-24 21:37:09450You get an error like:
andybons3322f762015-08-24 21:37:09451
sdy93387fa2016-12-01 01:03:44452```
453collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc'
454collect2: ld terminated with signal 11 [Segmentation fault], core dumped
455```
andybonsad92aa32015-08-31 02:27:44456
Song Qinglin5ac3cf922022-11-09 04:12:22457or:
458
459```
460LLVM ERROR: out of memory
461```
462
brettwc25693b32016-05-26 01:11:52463you are probably running out of memory when linking. You *must* use a 64-bit
464system to build. Try the following build settings (see [GN build
465configuration](https://www.chromium.org/developers/gn-build-configuration) for
sdy93387fa2016-12-01 01:03:44466other settings):
andybonsad92aa32015-08-31 02:27:44467
Omar Shawky971848ce2024-04-17 21:47:30468* Build in release mode (debugging symbols require more memory):
brettwc25693b32016-05-26 01:11:52469 `is_debug = false`
Omar Shawky971848ce2024-04-17 21:47:30470* Turn off symbols: `symbol_level = 0`
471* Build in component mode (this is for development only, it will be slower and
sdy93387fa2016-12-01 01:03:44472 may have broken functionality): `is_component_build = true`
Omar Shawky971848ce2024-04-17 21:47:30473* For official (ThinLTO) builds on Linux, increase the vm.max_map_count kernel
Song Qinglin5ac3cf922022-11-09 04:12:22474 parameter: increase the `vm.max_map_count` value from default (like 65530)
475 to for example 262144. You can run the `sudo sysctl -w vm.max_map_count=262144`
476 command to set it in the current session from the shell, or add the
477 `vm.max_map_count=262144` to /etc/sysctl.conf to save it permanently.
andybons3322f762015-08-24 21:37:09478
dpranke0ae7cad2016-11-30 07:47:58479### More links
andybons3322f762015-08-24 21:37:09480
Omar Shawky971848ce2024-04-17 21:47:30481* Information about [building with Clang](../clang.md).
482* You may want to [use a chroot](using_a_chroot.md) to
dpranke0ae7cad2016-11-30 07:47:58483 isolate yourself from versioning or packaging conflicts.
Omar Shawky971848ce2024-04-17 21:47:30484* Cross-compiling for ARM? See [LinuxChromiumArm](chromium_arm.md).
485* Want to use Eclipse as your IDE? See
Tom Anderson93e49e492019-12-23 19:55:37486 [LinuxEclipseDev](eclipse_dev.md).
Omar Shawky971848ce2024-04-17 21:47:30487* Want to use your built version as your default browser? See
Tom Anderson93e49e492019-12-23 19:55:37488 [LinuxDevBuildAsDefaultBrowser](dev_build_as_default_browser.md).
andybons3322f762015-08-24 21:37:09489
dpranke2989a782016-12-02 02:57:12490## Next Steps
andybonsad92aa32015-08-31 02:27:44491
492If you want to contribute to the effort toward a Chromium-based browser for
Tom Anderson93e49e492019-12-23 19:55:37493Linux, please check out the [Linux Development page](development.md) for
andybonsad92aa32015-08-31 02:27:44494more information.
dpranke2989a782016-12-02 02:57:12495
Omar Shawky971848ce2024-04-17 21:47:30496## Notes for other distros
dpranke2989a782016-12-02 02:57:12497
498### Arch Linux
499
500Instead of running `install-build-deps.sh` to install build dependencies, run:
501
502```shell
503$ sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
Tom Anderson761687a2023-06-14 17:27:39504nss alsa-lib glib2 gtk3 nspr freetype2 cairo dbus xorg-server-xvfb \
505xorg-xdpyinfo
dpranke2989a782016-12-02 02:57:12506```
507
508For the optional packages on Arch Linux:
509
Omar Shawky971848ce2024-04-17 21:47:30510* `php-cgi` is provided with `pacman`
511* `wdiff` is not in the main repository but `dwdiff` is. You can get `wdiff`
dpranke2989a782016-12-02 02:57:12512 in AUR/`yaourt`
dpranke2989a782016-12-02 02:57:12513
Kenneth Russell56293772018-09-21 01:46:15514### Crostini (Debian based)
515
David Munro9b5f4c4f2019-07-24 08:23:27516First install the `file` and `lsb-release` commands for the script to run properly:
Kenneth Russell56293772018-09-21 01:46:15517
518```shell
David Munro9b5f4c4f2019-07-24 08:23:27519$ sudo apt-get install file lsb-release
Kenneth Russell56293772018-09-21 01:46:15520```
521
522Then invoke install-build-deps.sh with the `--no-arm` argument,
523because the ARM toolchain doesn't exist for this configuration:
524
525```shell
526$ sudo install-build-deps.sh --no-arm
527```
528
dpranke2989a782016-12-02 02:57:12529### Fedora
530
531Instead of running `build/install-build-deps.sh`, run:
532
533```shell
534su -c 'yum install git python bzip2 tar pkgconfig atk-devel alsa-lib-devel \
535bison binutils brlapi-devel bluez-libs-devel bzip2-devel cairo-devel \
536cups-devel dbus-devel dbus-glib-devel expat-devel fontconfig-devel \
Tom Anderson287339e2018-08-22 21:52:02537freetype-devel gcc-c++ glib2-devel glibc.i686 gperf glib2-devel \
Tim Brown36312fc2017-12-15 22:56:20538gtk3-devel java-1.*.0-openjdk-devel libatomic libcap-devel libffi-devel \
Tom Anderson761687a2023-06-14 17:27:39539libgcc.i686 libjpeg-devel libstdc++.i686 libX11-devel libXScrnSaver-devel \
540libXtst-devel libxkbcommon-x11-devel ncurses-compat-libs nspr-devel nss-devel \
541pam-devel pango-devel pciutils-devel pulseaudio-libs-devel zlib.i686 httpd \
542mod_ssl php php-cli python-psutil wdiff xorg-x11-server-Xvfb'
dpranke2989a782016-12-02 02:57:12543```
544
Kent Tamura59ffb022018-11-27 05:30:56545The fonts needed by Blink's web tests can be obtained by following [these
Victor Costan44af72b2017-11-13 20:01:30546instructions](https://gist.github.com/pwnall/32a3b11c2b10f6ae5c6a6de66c1e12ae).
547For the optional packages:
dpranke2989a782016-12-02 02:57:12548
549* `php-cgi` is provided by the `php-cli` package.
Victor Costan44af72b2017-11-13 20:01:30550* `sun-java6-fonts` is covered by the instructions linked above.
dpranke2989a782016-12-02 02:57:12551
552### Gentoo
553
554You can just run `emerge www-client/chromium`.
555
Delan Azabani43eefa3d2024-05-09 03:39:33556### NixOS
557
558To get a shell with the dev environment:
559
560```sh
561$ nix-shell tools/nix/shell.nix
562```
563
564To run a command in the dev environment:
565
566```sh
567$ NIX_SHELL_RUN='autoninja -C out/Default chrome' nix-shell tools/nix/shell.nix
568```
569
570To set up clangd with remote indexing support, run the command below, then copy
571the path into your editor config:
572
573```sh
574$ NIX_SHELL_RUN='readlink /usr/bin/clangd' nix-shell tools/nix/shell.nix
575```
576
dpranke2989a782016-12-02 02:57:12577### OpenSUSE
578
579Use `zypper` command to install dependencies:
580
581(openSUSE 11.1 and higher)
582
583```shell
Tim Brown36312fc2017-12-15 22:56:20584sudo zypper in subversion pkg-config python perl bison flex gperf \
585 mozilla-nss-devel glib2-devel gtk-devel wdiff lighttpd gcc gcc-c++ \
586 mozilla-nspr mozilla-nspr-devel php5-fastcgi alsa-devel libexpat-devel \
dpranke2989a782016-12-02 02:57:12587 libjpeg-devel libbz2-devel
588```
589
590For 11.0, use `libnspr4-0d` and `libnspr4-dev` instead of `mozilla-nspr` and
Tom Anderson287339e2018-08-22 21:52:02591`mozilla-nspr-devel`, and use `php5-cgi` instead of `php5-fastcgi`.
dpranke2989a782016-12-02 02:57:12592
593(openSUSE 11.0)
594
595```shell
596sudo zypper in subversion pkg-config python perl \
597 bison flex gperf mozilla-nss-devel glib2-devel gtk-devel \
598 libnspr4-0d libnspr4-dev wdiff lighttpd gcc gcc-c++ libexpat-devel \
Tom Anderson287339e2018-08-22 21:52:02599 php5-cgi alsa-devel gtk3-devel jpeg-devel
dpranke2989a782016-12-02 02:57:12600```
601
602The Ubuntu package `sun-java6-fonts` contains a subset of Java of the fonts used.
603Since this package requires Java as a prerequisite anyway, we can do the same
604thing by just installing the equivalent openSUSE Sun Java package:
605
606```shell
607sudo zypper in java-1_6_0-sun
608```
609
610WebKit is currently hard-linked to the Microsoft fonts. To install these using `zypper`
611
612```shell
613sudo zypper in fetchmsttfonts pullin-msttf-fonts
614```
615
616To make the fonts installed above work, as the paths are hardcoded for Ubuntu,
617create symlinks to the appropriate locations:
618
619```shell
620sudo mkdir -p /usr/share/fonts/truetype/msttcorefonts
621sudo ln -s /usr/share/fonts/truetype/arial.ttf /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
622sudo ln -s /usr/share/fonts/truetype/arialbd.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf
623sudo ln -s /usr/share/fonts/truetype/arialbi.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf
624sudo ln -s /usr/share/fonts/truetype/ariali.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf
625sudo ln -s /usr/share/fonts/truetype/comic.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
626sudo ln -s /usr/share/fonts/truetype/comicbd.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf
627sudo ln -s /usr/share/fonts/truetype/cour.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
628sudo ln -s /usr/share/fonts/truetype/courbd.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
629sudo ln -s /usr/share/fonts/truetype/courbi.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
630sudo ln -s /usr/share/fonts/truetype/couri.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
631sudo ln -s /usr/share/fonts/truetype/impact.ttf /usr/share/fonts/truetype/msttcorefonts/Impact.ttf
632sudo ln -s /usr/share/fonts/truetype/times.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
633sudo ln -s /usr/share/fonts/truetype/timesbd.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
634sudo ln -s /usr/share/fonts/truetype/timesbi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
635sudo ln -s /usr/share/fonts/truetype/timesi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
636sudo ln -s /usr/share/fonts/truetype/verdana.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf
637sudo ln -s /usr/share/fonts/truetype/verdanab.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf
638sudo ln -s /usr/share/fonts/truetype/verdanai.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf
639sudo ln -s /usr/share/fonts/truetype/verdanaz.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf
640```
641
642The Ubuntu package `sun-java6-fonts` contains a subset of Java of the fonts used.
643Since this package requires Java as a prerequisite anyway, we can do the same
644thing by just installing the equivalent openSUSE Sun Java package:
645
646```shell
647sudo zypper in java-1_6_0-sun
648```
649
650WebKit is currently hard-linked to the Microsoft fonts. To install these using `zypper`
651
652```shell
653sudo zypper in fetchmsttfonts pullin-msttf-fonts
654```
655
656To make the fonts installed above work, as the paths are hardcoded for Ubuntu,
657create symlinks to the appropriate locations:
658
659```shell
660sudo mkdir -p /usr/share/fonts/truetype/msttcorefonts
661sudo ln -s /usr/share/fonts/truetype/arial.ttf /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
662sudo ln -s /usr/share/fonts/truetype/arialbd.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf
663sudo ln -s /usr/share/fonts/truetype/arialbi.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf
664sudo ln -s /usr/share/fonts/truetype/ariali.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf
665sudo ln -s /usr/share/fonts/truetype/comic.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
666sudo ln -s /usr/share/fonts/truetype/comicbd.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf
667sudo ln -s /usr/share/fonts/truetype/cour.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
668sudo ln -s /usr/share/fonts/truetype/courbd.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
669sudo ln -s /usr/share/fonts/truetype/courbi.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
670sudo ln -s /usr/share/fonts/truetype/couri.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
671sudo ln -s /usr/share/fonts/truetype/impact.ttf /usr/share/fonts/truetype/msttcorefonts/Impact.ttf
672sudo ln -s /usr/share/fonts/truetype/times.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
673sudo ln -s /usr/share/fonts/truetype/timesbd.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
674sudo ln -s /usr/share/fonts/truetype/timesbi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
675sudo ln -s /usr/share/fonts/truetype/timesi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
676sudo ln -s /usr/share/fonts/truetype/verdana.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf
677sudo ln -s /usr/share/fonts/truetype/verdanab.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf
678sudo ln -s /usr/share/fonts/truetype/verdanai.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf
679sudo ln -s /usr/share/fonts/truetype/verdanaz.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf
680```
681
682And then for the Java fonts:
683
684```shell
685sudo mkdir -p /usr/share/fonts/truetype/ttf-lucida
686sudo find /usr/lib*/jvm/java-1.6.*-sun-*/jre/lib -iname '*.ttf' -print \
687 -exec ln -s {} /usr/share/fonts/truetype/ttf-lucida \;
688```
Omar Shawky08b259c2024-03-27 19:52:17689
690### Docker
691
692#### Prerequisites
693
694While it is not a common setup, Chromium compilation should work from within a
695Docker container. If you choose to compile from within a container for whatever
696reason, you will need to make sure that the following tools are available:
697
698* `curl`
699* `git`
700* `lsb_release`
701* `python3`
702* `sudo`
703* `file`
704
705There may be additional Docker-specific issues during compilation. See
706[this bug](https://crbug.com/1377520) for additional details on this.
707
Omar Shawky971848ce2024-04-17 21:47:30708Note: [Clone depot_tools](#install-depot_tools) first.
Omar Shawky08b259c2024-03-27 19:52:17709
710#### Build Steps
711
7121. Put the following Dockerfile in `/path/to/chromium/`.
713
714```docker
715# Use an official Ubuntu base image with Docker already installed
716FROM ubuntu:22.04
717
718# Set environment variables
719ENV DEBIAN_FRONTEND=noninteractive
720
721# Install Mantatory tools (curl git python3) and optional tools (vim sudo)
722RUN apt-get update && \
723 apt-get install -y curl git lsb-release python3 git file vim sudo && \
724 rm -rf /var/lib/apt/lists/*
725
726# Export depot_tools path
727ENV PATH="/depot_tools:${PATH}"
728
729# Configure git for safe.directory
Ho Cheung7c53eaf2024-05-31 00:31:26730RUN git config --global --add safe.directory /depot_tools && \
731 git config --global --add safe.directory /chromium/src
Omar Shawky08b259c2024-03-27 19:52:17732
Ho Cheung7c53eaf2024-05-31 00:31:26733# Set the working directory to the existing Chromium source directory.
734# This can be either "/chromium/src" or "/chromium".
735WORKDIR /chromium/src
Omar Shawky08b259c2024-03-27 19:52:17736
737# Expose any necessary ports (if needed)
738# EXPOSE 8080
mohamedhany015ae34802024-10-16 16:34:41739
740# Create a dummy user and group to avoid permission issues
741RUN groupadd -g 1001 chrom-d && \
742 useradd -u 1000 -g 1001 -m chrom-d
Ho Cheung7c53eaf2024-05-31 00:31:26743
744# Create normal user with name "chrom-d". Optional and you can use root but
745# not advised.
746USER chrom-d
Omar Shawky08b259c2024-03-27 19:52:17747
Omar Shawky971848ce2024-04-17 21:47:30748# Start Chromium Builder "chrom-d" (modify this command as needed)
Omar Shawky08b259c2024-03-27 19:52:17749# CMD ["autoninja -C out/Default chrome"]
750CMD ["bash"]
751```
752
7532. Build Container
754
755```shell
756# chrom-b is just a name; You can change it but you must reflect the renaming
757# in all commands below
758$ docker build -t chrom-b .
759```
760
7613. Run container as root to install dependencies
762
763```shell
mohamedhany015ae34802024-10-16 16:34:41764$ docker run
Omar Shawky08b259c2024-03-27 19:52:17765 -it \ # Run docker interactively
Omar Shawky971848ce2024-04-17 21:47:30766 --name chrom-b \ # with name "chrom-b"
767 -u root \ # with user root
768 -v /path/on/machine/to/chromium:/chromium \ # With chromium folder mounted
769 -v /path/on/machine/to/depot_tools:/depot_tools \ # With depot_tools mounted
770 chrom-b # Run container with image name "chrom-b"
Omar Shawky08b259c2024-03-27 19:52:17771```
772
mohamedhany015ae34802024-10-16 16:34:41773*** note
774**Note:** When running the command as a single line in bash, please remove the
775comments (after the `#`) to avoid breaking the command.
776***
777
Omar Shawky971848ce2024-04-17 21:47:307784. Install dependencies:
Omar Shawky08b259c2024-03-27 19:52:17779
780```shell
Ho Cheung7c53eaf2024-05-31 00:31:26781./build/install-build-deps.sh
Omar Shawky08b259c2024-03-27 19:52:17782```
783
Ho Cheung7c53eaf2024-05-31 00:31:267845. [Run hooks](#run-the-hooks) (On docker or machine if you installed depot_tools on machine)
785
mohamedhany015ae34802024-10-16 16:34:41786*** note
787**Before running hooks:** Ensure that all directories within
788`third_party` are added as safe directories in Git. This is required
789when running in the container because the ownership of the `src/`
790directory (e.g., `chrom-b`) differs from the current user
791(e.g., `root`). To prevent Git **warnings** about "dubious ownership"
792run the following command after installing the dependencies:
793
794```shell
795# Loop through each directory in /chromium/src/third_party and add
796# them as safe directories in Git
797$ for dir in /chromium/src/third_party/*; do
798 if [ -d "$dir" ]; then
799 git config --global --add safe.directory "$dir"
800 fi
801done
802```
803***
804
Ho Cheung7c53eaf2024-05-31 00:31:268056. Exit container
806
8077. Save container image with tag-id name `dpv1.0`. Run this on the machine, not in container
Omar Shawky971848ce2024-04-17 21:47:30808
Omar Shawky08b259c2024-03-27 19:52:17809```shell
mohamedhany015ae34802024-10-16 16:34:41810# Get docker running/stopped containers, copy the "chrom-b" id
811$ docker container ls -a
Omar Shawky971848ce2024-04-17 21:47:30812# Save/tag running docker container with name "chrom-b" with "dpv1.0"
813# You can choose any tag name you want but propagate name accordingly
814# You will need to create new tags when working on different parts of
815# chromium which requires installing additional dependencies
Omar Shawky08b259c2024-03-27 19:52:17816$ docker commit <ID from above step> chrom-b:dpv1.0
817# Optional, just saves space by deleting unnecessary images
818$ docker image rmi chrom-b:latest && docker image prune \
819 && docker container prune && docker builder prune
820```
821
Omar Shawky08b259c2024-03-27 19:52:17822#### Run container
823
824```shell
825$ docker run --rm \ # close instance upon exit
826 -it \ # Run docker interactively
Omar Shawky971848ce2024-04-17 21:47:30827 --name chrom-b \ # with name "chrom-b"
Omar Shawky08b259c2024-03-27 19:52:17828 -u $(id -u):$(id -g) \ # Run container as a non-root user with same UID & GID
Omar Shawky971848ce2024-04-17 21:47:30829 -v /path/on/machine/to/chromium:/chromium \ # With chromium folder mounted
830 -v /path/on/machine/to/depot_tools:/depot_tools \ # With depot_tools mounted
831 chrom-b:dpv1.0 # Run container with image name "chrom-b" and tag dpv1.0
Omar Shawky08b259c2024-03-27 19:52:17832```
mohamedhany015ae34802024-10-16 16:34:41833
834*** note
835**Note:** When running the command as a single line in bash, please remove the
836comments (after the `#`) to avoid breaking the command.
837***