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 https://chromium.googlesource.com/chromium/tools/depot_tools.git


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

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


This made running install-build-deps.sh 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/install-build-deps.sh


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:

enable_nacl=false
symbol_level=1
emove_webcore_debug_symbols=true


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.

1 comment:

Haris K. said...

Thank you for guide!
-Which codecs should be added to play videos from Facebook?
-How can we compile current stable version?