Introduction to Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

This package is known to build and work properly using an LFS-8.1 platform.

Package Information

Additional Downloads

Required patch to fix build issues with gcc-7.1.0:

Required patch to fix build issues with GlibC-2.26:

Optional Chrome binaries to extract the WideVine plug-in (Netflix) support:

Chromium Dependencies


alsa-lib-, Cups-2.2.4, desktop-file-utils-0.23, dbus-1.10.24, File::BaseDir-0.07, GTK+-3.22.24, hicolor-icon-theme-0.17, MIT Kerberos V5-1.15.2, Mesa-17.2.2, nodejs-8.6.0, NSS-3.33, Python-2.7.14, usbutils-008, and X Window System



GConf-3.2.6, ICU-59.1 (currently broken), gnome-keyring-3.20.1, libevent-2.1.8 (currently broken), libvpx-1.6.1 (currently broken), libxml2-2.9.6 (currently broken), speech-dispatcher (for the screen reader), and snappy

User Notes:

Installation of Chromium

Apply a patch to fix errors with building with GCC-7.1.0:

patch -Np1 -i ../chromium-61.0.3163.100-gcc7-1.patch

Apply a patch to fix an issue when building against GlibC-2.26:

patch -Np1 -i ../chromium-61.0.3163.100-glibc-2.26-1.patch

Enable the use of the WideVine plugin, needed for Netflix support (see the WideVine section below). Define an available product name ("Pinkie Pie" in this case) with the following command:

    -i third_party/widevine/cdm/stub/widevine_cdm_version.h

Fix to minor build errors in gn:

sed -e "/\      'base/metrics/'," \
    -e "/" \
    -i tools/gn/bootstrap/

Fix a build issue with current ATK:

sed '/atk_state_set_add_state/s@atk_state_set,@state_set,@' \
    -i content/browser/accessibility/

Remove third-party build files that interfere with system versions:



Chromium uses many external projects, the selections below are not set in stone, however they have been tested thoroughly. With Chromium 61.0.3163.100, system versions of icu, libevent, libvpx, libxml2, and zlib are known to break the build at this time.

for LIB in ffmpeg flac harfbuzz-ng libjpeg \
           libjpeg_turbo libpng libwebp libxslt yasm; do
    find -type f -path "*third_party/$LIB/*"     \
        \! -path "*third_party/$LIB/chromium/*"  \
        \! -path "*third_party/$LIB/google/*"    \
        \! -path "*base/third_party/icu/*"       \
        \! -path "*base/third_party/libevent/*"  \
        \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
done &&

python build/linux/unbundle/ \
    --system-libraries ffmpeg flac harfbuzz-ng libjpeg \
                       libpng libwebp libxslt yasm &&
python third_party/libaddressinput/chromium/tools/

Chromium uses an internal tool, gn, to generate the Ninja build files. Complete configuration of the build using the following commands:



The Google API Key and OAuth tokens below are specific to LFS. If using these instructions for another distro, or if you intend to distribute binary copies of the software using these instructions, please obtain your own keys following the instructions located at


Build gn and use it to prepare the Ninja build files:

python tools/gn/bootstrap/ --gn-gen-args "${GN_CONFIG[*]}" &&
out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"


Ninja, by default, sets the number of jobs to the number of available threads. If your machine is memory constrained, with regard to number of threads, you should reduce the number of jobs by passing the -j# switch to the ninja command below. Plan for roughly 1.25GB per thread while linking WebKit to avoid out of memory errors.

Build Chromium using the following commands:

mkdir -p third_party/node/linux/node-linux-x64/bin &&
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ &&
ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter

This package was already tested as part of the build.

Now, as the root user, install the package:

install -vDm755  out/Release/chrome \
                 /usr/lib/chromium/chromium                   &&
install -vDm4755 out/Release/chrome_sandbox \
                 /usr/lib/chromium/chrome-sandbox             &&
install -vDm755  out/Release/chromedriver \
                 /usr/lib/chromium/chromedriver               &&
ln -svf /usr/lib/chromium/chromium /usr/bin                   &&
ln -svf /usr/lib/chromium/chromedriver /usr/bin/              &&

install -vm644  out/Release/icudtl.dat /usr/lib/chromium/     &&
install -vDm644 out/Release/gen/content/content_resources.pak \
                /usr/lib/chromium/                            &&
install -vm644  out/Release/{*.pak,*.bin} \
                /usr/lib/chromium/                            &&

cp -av out/Release/locales /usr/lib/chromium/                 &&
chown -Rv root:root /usr/lib/chromium/locales                 &&

install -vDm644 out/Release/chrome.1 \

While still the root user, install icons and the .desktop file:

for size in 16 32; do
    install -vDm644 \
        "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
done &&

for size in 22 24 48 64 128 256; do
    install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
done &&

cat > /usr/share/applications/chromium.desktop << "EOF"
[Desktop Entry]
Name=Chromium Web Browser
Comment=Access the Internet
GenericName=Web Browser
Exec=chromium %u


If upgrading from a previous build of chromium using gtk+-2.x, you may need to remove the ~/.config/chromium directory.

Extracting the WideVine plugin from Chrome

Extract the downloaded deb file with the following commands:

mkdir temp                                         &&
cd temp                                            &&
case $(uname -m) in
    x86_64) ar -x ../../google-chrome-stable_61.0.3163.100-1_amd64.deb
    i?86)   ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb

As the root user, enable the WideVine plugin with the following commands:

tar -xf data.tar.xz                                                        &&
install -vm755 ../out/Release/ /usr/lib/chromium/  &&
install -vm755 opt/google/chrome/  /usr/lib/chromium/

Command Explanations

GN_CONFIG=(...): this array contains all of the defines used in the build.

python tools/gn/bootstrap/ --gn-gen-args "${GN_CONFIG[*]}": this command replaces defines in the gn files with the values contained in ${GN_CONFIG[@]}.

out/Release/gn gen out/Release --args="${GN_CONFIG[*]}": this command runs a Google provided configuration script gn on the source tree to produce a Ninja configuration suitable for the build machine.

mkdir...ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/: these commands replaced the local Node.js (no longer available) with the system installed Node.js.

ar -x ../../google-chrome-stable*.deb: the ar utility is used to extract Debian archives.


Installed Programs: /usr/lib/chromium/chromium, /usr/lib/chromium/chromedriver, and /usr/lib/chromium/chrome-sandbox
Installed Libraries: none
Installed Directories: /usr/lib/chromium

Short Descriptions


is the main chromium executable.


is a WebDriver for Chromium.


creates a sandboxed environment for running untrusted code (plugins).

Last updated on 2017-10-15 16:22:27 -0500