Skip to content

Instantly share code, notes, and snippets.

@mundry
Last active June 6, 2024 14:46
Show Gist options
  • Save mundry/9019640 to your computer and use it in GitHub Desktop.
Save mundry/9019640 to your computer and use it in GitHub Desktop.
Instructions to build Chromium on a fresh install of Fedora 20.

Build Chromium on Fedora 20

Install Dependencies

sudo yum install GConf2-devel systemd-devel mesa-libGLU-devel libstdc++.i686 subversion \
libX11-devel libjpeg-devel gcc-c++ libXScrnSaver-devel fontconfig-devel cups-devel libgcc.i686 \
flex libXt-devel pulseaudio-libs-devel dbus-glib-devel bison dbus-devel alsa-lib-devel \
elfutils-libelf-devel libgnome-keyring-devel pango-devel glibc.i686 libXtst-devel pkgconfig \
libudev-devel glib2-devel bzip2-devel python nss-devel nspr-devel libcap-devel expat-devel \
gperf pciutils-devel gtk2-devel libgcrypt-devel perl freetype-devel perl-Digest-MD5 \
atk-devel pam-devel cairo-devel qt3 perl-Encode-Locale perl-WWW-RobotRules perl-Module-Pluggable \
redhat-lsb-printing mailx perl-HTML-Tagset redhat-lsb-cxx redhat-lsb-submod-security \
perl-Class-ISA perl-Pod-Checker perl-HTTP-Cookies perl-FCGI libmng perl-URI redhat-lsb-core \
perl-TimeDate perl-Test-Simple perl-Locale-Codes perl-Pod-LaTeX perl-Compress-Raw-Bzip2 \
perl-Business-ISBN-Data perl-Locale-Maketext perl-IO-Compress perl-XML-SAX-Base spax \
perl-Pod-Plainer perl-File-CheckTree perl-Digest-SHA perl-Net-HTTP perl-Env perl-HTTP-Date \
perl-B-Lint perl-HTTP-Negotiate perl-IO-Socket-SSL perl-Pod-Parser perl-Text-Soundex \
perl-HTTP-Message redhat-lsb-languages perl-LWP-MediaTypes perl-Sys-Syslog perl-Net-SSLeay \
perl-Business-ISBN redhat-lsb-desktop lcms-libs perl-IO-HTML libpng12 perl-XML-SAX \
perl-HTML-Parser qt perl-Compress-Raw-Zlib perl-Net-LibIDN perl-IO-Socket-IP qt-settings \
perl-CPAN perl-HTTP-Daemon perl-XML-LibXML redhat-lsb-submod-multimedia perl-libwww-perl \
perl-CGI qt-x11 perl-XML-NamespaceSupport perl-File-Listing perl-autodie redhat-lsb \
perl-Text-Unidecode libexif-devel libXdmcp-devel

Install depot tools

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ~/.local/depot_tools

Add depot tools directory to PATH.

$HOME/.local/depot_tools

Next get the code. Either as a full checkout.

fetch chromium --nosvn=True

or reduce the size by limiting the number of dependencies. Create a new file .gclient, add the following configuration

solutions = [
    {
        "name": "src",
        "url": "https://src.chromium.org/chrome/trunk/src",
        "safesync_url": "https://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/LAST_CHANGE",
        "custom_deps": {
            "src/chrome/tools/test/reference_build/chrome_win": None, # Windows reference build for performance testing.
            "src/chrome_frame/tools/test/reference_build/chrome_win": None, # Chrome Frame reference build for performance testing.
            "src/chrome/tools/test/reference_build/chrome_linux": None, # Linux reference build for performance testing.
            "src/chrome/tools/test/reference_build/chrome_mac": None, # Mac reference build for performance testing.
            "src/third_party/hunspell_dictionaries": None # spellchecker dictionaries used for unit tests.
        }
    }
]

and download the reduced code.

gclient sync --jobs=16

Switch to the newly created src directory (both methods).

cd src

To compile the 64-bit version issue

build/gyp_chromium -Dtarget_arch=x64

Compile the source.

ninja -C out/Release chrome chrome_sandbox

Install the sandbox.

sudo BUILDTYPE=Release build/update-linux-sandbox.sh

Set the sandbox environment variable

export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

Helpful arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment