Friday, 28 April 2017

How to build Chromium on Ubuntu

I followed official instructions and, with minor modifications, managed to build and run Chromium on 64-bit Ubuntu 16.04. Entire process on PC with Intel i7 with 16GB RAM takes couple of hours. I had Git and Python installed already so went straight into the process:

Clone depot_tools repository (this was in my ~/dev directory):

$ git clone

The next step was to append depot_tools path to to PATH. I first tried:

$ export PATH="$PATH:~/dev/depot_tools"

This made running script to fail as described here. I therefore applied suggestion from that forum thread and used the path in the following form:

$ export PATH="$PATH:${HOME}/dev/depot_tools"

Create directory for Chromium source code

$ mkdir chromium
$ cd chromium

Check out the code (without the full repo history) and its dependencies:

$ fetch --nohooks --no-history chromium

Fetch creates scr directory:

$ cd src

Install additional build dependencies:

$ ./build/

Run hooks which fetch additional binaries:

$ gclient runhooks

Create a build directory:

$ gn gen out/Default

Set gn arguments in order to speed up build. The following command will open a config file in vi editor:

$ gn args out/Default

I added the following lines:


Build Chromium:

$ ninja -C out/Default chrome

Run built Chromium executable:

$ ./out/Default/chrome

Et voila! Chromium opens:

NOTE: I didn't install Google API keys and this is the reason for the notification which appears in the browser.
Post a Comment