summaryrefslogtreecommitdiffstats
path: root/third_party/instrumented_libraries/scripts
diff options
context:
space:
mode:
authorearthdok <earthdok@chromium.org>2015-03-18 11:17:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-18 18:18:40 +0000
commita1c84bc83dcf5cb61d907c2d4285ebebb39315a1 (patch)
tree5705e1f01ba464888a0ed769001a20aa9b5bd0e3 /third_party/instrumented_libraries/scripts
parentee2eaca573eea513492b0f7931a1dfeeb6af999e (diff)
downloadchromium_src-a1c84bc83dcf5cb61d907c2d4285ebebb39315a1.zip
chromium_src-a1c84bc83dcf5cb61d907c2d4285ebebb39315a1.tar.gz
chromium_src-a1c84bc83dcf5cb61d907c2d4285ebebb39315a1.tar.bz2
Instrumented libraries: move all scripts to scripts/.
BUG=none R=glider@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/1012823003 Cr-Commit-Position: refs/heads/master@{#321171}
Diffstat (limited to 'third_party/instrumented_libraries/scripts')
-rwxr-xr-xthird_party/instrumented_libraries/scripts/download_build_install.py426
-rwxr-xr-xthird_party/instrumented_libraries/scripts/fix_rpaths.sh30
-rwxr-xr-xthird_party/instrumented_libraries/scripts/install-build-deps.sh98
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/autogen.sh (renamed from third_party/instrumented_libraries/scripts/autogen.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/autoreconf.sh (renamed from third_party/instrumented_libraries/scripts/autoreconf.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/freetype.sh (renamed from third_party/instrumented_libraries/scripts/freetype.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/libasound2.sh (renamed from third_party/instrumented_libraries/scripts/libasound2.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh (renamed from third_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh (renamed from third_party/instrumented_libraries/scripts/libgtk2.0-0.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/libnspr4.sh (renamed from third_party/instrumented_libraries/scripts/libnspr4.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/libva1.sh (renamed from third_party/instrumented_libraries/scripts/libva1.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh (renamed from third_party/instrumented_libraries/scripts/pulseaudio.sh)0
-rwxr-xr-xthird_party/instrumented_libraries/scripts/pre-build/udev.sh (renamed from third_party/instrumented_libraries/scripts/udev.sh)0
13 files changed, 554 insertions, 0 deletions
diff --git a/third_party/instrumented_libraries/scripts/download_build_install.py b/third_party/instrumented_libraries/scripts/download_build_install.py
new file mode 100755
index 0000000..3bd24fa
--- /dev/null
+++ b/third_party/instrumented_libraries/scripts/download_build_install.py
@@ -0,0 +1,426 @@
+#!/usr/bin/python
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Downloads, builds (with instrumentation) and installs shared libraries."""
+
+import argparse
+import os
+import platform
+import re
+import shlex
+import shutil
+import subprocess
+import sys
+
+SCRIPT_ABSOLUTE_PATH = os.path.dirname(os.path.abspath(__file__))
+
+def unescape_flags(s):
+ """Un-escapes build flags received from GYP.
+
+ GYP escapes build flags as if they are to be inserted directly into a command
+ line, wrapping each flag in double quotes. When flags are passed via
+ CFLAGS/LDFLAGS instead, double quotes must be dropped.
+ """
+ return ' '.join(shlex.split(s))
+
+
+def real_path(path_relative_to_gyp):
+ """Returns the absolute path to a file.
+
+ GYP generates paths relative to the location of the .gyp file, which is one
+ level above the location of this script. This function converts them to
+ absolute paths.
+ """
+ return os.path.realpath(os.path.join(SCRIPT_ABSOLUTE_PATH, '..',
+ path_relative_to_gyp))
+
+
+class InstrumentedPackageBuilder(object):
+ """Checks out and builds a single instrumented package."""
+ def __init__(self, args, clobber):
+ self._cc = args.cc
+ self._cxx = args.cxx
+ self._extra_configure_flags = args.extra_configure_flags
+ self._jobs = args.jobs
+ self._libdir = args.libdir
+ self._package = args.package
+ self._patch = real_path(args.patch) if args.patch else None
+ self._pre_build = \
+ real_path(args.pre_build) if args.pre_build else None
+ self._sanitizer = args.sanitizer
+ self._verbose = args.verbose
+ self._clobber = clobber
+ self._working_dir = os.path.join(
+ real_path(args.intermediate_dir), self._package, '')
+
+ product_dir = real_path(args.product_dir)
+ self._destdir = os.path.join(
+ product_dir, 'instrumented_libraries', self._sanitizer)
+ self._source_archives_dir = os.path.join(
+ product_dir, 'instrumented_libraries', 'sources', self._package)
+
+ self._cflags = unescape_flags(args.cflags)
+ if args.sanitizer_blacklist:
+ blacklist_file = real_path(args.sanitizer_blacklist)
+ self._cflags += ' -fsanitize-blacklist=%s' % blacklist_file
+
+ self._ldflags = unescape_flags(args.ldflags)
+
+ self.init_build_env()
+
+ # Initialized later.
+ self._source_dir = None
+ self._source_archives = None
+
+ def init_build_env(self):
+ self._build_env = os.environ.copy()
+
+ self._build_env['CC'] = self._cc
+ self._build_env['CXX'] = self._cxx
+
+ self._build_env['CFLAGS'] = self._cflags
+ self._build_env['CXXFLAGS'] = self._cflags
+ self._build_env['LDFLAGS'] = self._ldflags
+
+ if self._sanitizer == 'asan':
+ # Do not report leaks during the build process.
+ self._build_env['ASAN_OPTIONS'] = \
+ '%s:detect_leaks=0' % self._build_env.get('ASAN_OPTIONS', '')
+
+ # libappindicator1 needs this.
+ self._build_env['CSC'] = '/usr/bin/mono-csc'
+
+ def shell_call(self, command, env=None, cwd=None):
+ """Wrapper around subprocess.Popen().
+
+ Calls command with specific environment and verbosity using
+ subprocess.Popen().
+ """
+ child = subprocess.Popen(
+ command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ env=env, shell=True, cwd=cwd)
+ stdout, stderr = child.communicate()
+ if self._verbose or child.returncode:
+ print stdout
+ if child.returncode:
+ raise Exception('Failed to run: %s' % command)
+
+ def maybe_download_source(self):
+ """Checks out the source code (if needed).
+
+ Checks out the source code for the package, if required (i.e. unless running
+ in no-clobber mode). Initializes self._source_dir and self._source_archives.
+ """
+ get_fresh_source = self._clobber or not os.path.exists(self._working_dir)
+ if get_fresh_source:
+ self.shell_call('rm -rf %s' % self._working_dir)
+ os.makedirs(self._working_dir)
+ self.shell_call('apt-get source %s' % self._package,
+ cwd=self._working_dir)
+
+ (dirpath, dirnames, filenames) = os.walk(self._working_dir).next()
+
+ if len(dirnames) != 1:
+ raise Exception(
+ '`apt-get source %s\' must create exactly one subdirectory.'
+ % self._package)
+ self._source_dir = os.path.join(dirpath, dirnames[0], '')
+
+ if len(filenames) == 0:
+ raise Exception('Can\'t find source archives after `apt-get source %s\'.'
+ % self._package)
+ self._source_archives = \
+ [os.path.join(dirpath, filename) for filename in filenames]
+
+ return get_fresh_source
+
+ def patch_source(self):
+ if self._patch:
+ self.shell_call('patch -p1 -i %s' % self._patch, cwd=self._source_dir)
+ if self._pre_build:
+ self.shell_call(self._pre_build, cwd=self._source_dir)
+
+ def copy_source_archives(self):
+ """Copies the downloaded source archives to the output dir.
+
+ For license compliance purposes, every Chromium build that includes
+ instrumented libraries must include their full source code.
+ """
+ self.shell_call('rm -rf %s' % self._source_archives_dir)
+ os.makedirs(self._source_archives_dir)
+ for filename in self._source_archives:
+ shutil.copy(filename, self._source_archives_dir)
+ if self._patch:
+ shutil.copy(self._patch, self._source_archives_dir)
+
+ def download_build_install(self):
+ got_fresh_source = self.maybe_download_source()
+ if got_fresh_source:
+ self.patch_source()
+ self.copy_source_archives()
+
+ self.shell_call('mkdir -p %s' % self.dest_libdir())
+
+ try:
+ self.build_and_install()
+ except Exception as exception:
+ print 'ERROR: Failed to build package %s. Have you run ' \
+ 'src/third_party/instrumented_libraries/scripts/' \
+ 'install-build-deps.sh?' % \
+ self._package
+ print
+ raise
+
+ # Touch a text file to indicate package is installed.
+ stamp_file = os.path.join(self._destdir, '%s.txt' % self._package)
+ open(stamp_file, 'w').close()
+
+ # Remove downloaded package and generated temporary build files. Failed
+ # builds intentionally skip this step to help debug build failures.
+ if self._clobber:
+ self.shell_call('rm -rf %s' % self._working_dir)
+
+ def fix_rpaths(self, directory):
+ # TODO(earthdok): reimplement fix_rpaths.sh in Python.
+ script = real_path('scripts/fix_rpaths.sh')
+ self.shell_call("%s %s" % (script, directory))
+
+ def temp_dir(self):
+ """Returns the directory which will be passed to `make install'."""
+ return os.path.join(self._source_dir, 'debian', 'instrumented_build')
+
+ def temp_libdir(self):
+ """Returns the directory under temp_dir() containing the DSOs."""
+ return os.path.join(self.temp_dir(), self._libdir)
+
+ def dest_libdir(self):
+ """Returns the final location of the DSOs."""
+ return os.path.join(self._destdir, self._libdir)
+
+ def make(self, args, jobs=None, env=None, cwd=None):
+ """Invokes `make'.
+
+ Invokes `make' with the specified args, using self._build_env and
+ self._source_dir by default.
+ """
+ if jobs is None:
+ jobs = self._jobs
+ if cwd is None:
+ cwd = self._source_dir
+ if env is None:
+ env = self._build_env
+ cmd = ['make', '-j%s' % jobs] + args
+ self.shell_call(' '.join(cmd), env=env, cwd=cwd)
+
+ def make_install(self, args, **kwargs):
+ """Invokes `make install'."""
+ self.make(['install'] + args, **kwargs)
+
+ def build_and_install(self):
+ """Builds and installs the DSOs.
+
+ Builds the package with ./configure + make, installs it to a temporary
+ location, then moves the relevant files to their permanent location.
+ """
+ configure_cmd = './configure --libdir=/%s/ %s' % (
+ self._libdir, self._extra_configure_flags)
+ self.shell_call(configure_cmd, env=self._build_env, cwd=self._source_dir)
+
+ # Some makefiles use BUILDROOT or INSTALL_ROOT instead of DESTDIR.
+ args = ['DESTDIR', 'BUILDROOT', 'INSTALL_ROOT']
+ make_args = ['%s=%s' % (name, self.temp_dir()) for name in args]
+ self.make(make_args)
+
+ # Some packages don't support parallel install. Use -j1 always.
+ self.make_install(make_args, jobs=1)
+
+ # .la files are not needed, nuke them.
+ self.shell_call('rm %s/*.la -f' % self.temp_libdir())
+
+ self.fix_rpaths(self.temp_libdir())
+
+ # Now move the contents of the temporary destdir to their final place.
+ # We only care for the contents of LIBDIR.
+ self.shell_call('cp %s/* %s/ -rdf' % (self.temp_libdir(),
+ self.dest_libdir()))
+
+
+class LibcapBuilder(InstrumentedPackageBuilder):
+ def build_and_install(self):
+ # libcap2 doesn't have a configure script
+ build_args = ['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']
+ make_args = [
+ '%s="%s"' % (name, self._build_env[name]) for name in build_args
+ ]
+ self.make(make_args)
+
+ install_args = [
+ 'DESTDIR=%s' % self.temp_dir(),
+ 'lib=%s' % self._libdir,
+ # Skip a step that requires sudo.
+ 'RAISE_SETFCAP=no'
+ ]
+ self.make_install(install_args)
+
+ self.fix_rpaths(self.temp_libdir())
+
+ # Now move the contents of the temporary destdir to their final place.
+ # We only care for the contents of LIBDIR.
+ self.shell_call('cp %s/* %s/ -rdf' % (self.temp_libdir(),
+ self.dest_libdir()))
+
+
+class Libpci3Builder(InstrumentedPackageBuilder):
+ def package_version(self):
+ """Guesses libpci3 version from source directory name."""
+ dir_name = os.path.split(os.path.normpath(self._source_dir))[-1]
+ match = re.match('pciutils-(\d+\.\d+\.\d+)', dir_name)
+ if match is None:
+ raise Exception(
+ 'Unable to guess libpci3 version from directory name: %s' % dir_name)
+ return match.group(1)
+
+ def temp_libdir(self):
+ # DSOs have to be picked up from <source_dir>/lib, since `make install'
+ # doesn't actualy install them anywhere.
+ return os.path.join(self._source_dir, 'lib')
+
+ def build_and_install(self):
+ # pciutils doesn't have a configure script
+ # This build process follows debian/rules.
+ self.shell_call('mkdir -p %s-udeb/usr/bin' % self.temp_dir())
+
+ build_args = ['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']
+ make_args = [
+ '%s="%s"' % (name, self._build_env[name]) for name in build_args
+ ]
+ make_args += [
+ 'LIBDIR=/%s/' % self._libdir,
+ 'PREFIX=/usr',
+ 'SBINDIR=/usr/bin',
+ 'IDSDIR=/usr/share/misc',
+ 'SHARED=yes',
+ # pciutils-3.2.1 (Trusty) fails to build due to unresolved libkmod
+ # symbols. The binary package has no dependencies on libkmod, so it
+ # looks like it was actually built without libkmod support.
+ 'LIBKMOD=no',
+ ]
+ self.make(make_args)
+
+ # `make install' is not needed.
+ self.fix_rpaths(self.temp_libdir())
+
+ # Now install the DSOs to their final place.
+ self.shell_call(
+ 'install -m 644 %s/libpci.so* %s' % (self.temp_libdir(),
+ self.dest_libdir()))
+ self.shell_call(
+ 'ln -sf libpci.so.%s %s/libpci.so.3' % (self.package_version(),
+ self.dest_libdir()))
+
+
+class NSSBuilder(InstrumentedPackageBuilder):
+ def build_and_install(self):
+ # NSS uses a build system that's different from configure/make/install. All
+ # flags must be passed as arguments to make.
+ make_args = [
+ # Do an optimized build.
+ 'BUILD_OPT=1',
+ # CFLAGS/CXXFLAGS should not be used, as doing so overrides the flags in
+ # the makefile completely. The only way to append our flags is to tack
+ # them onto CC/CXX.
+ 'CC="%s %s"' % (self._build_env['CC'], self._build_env['CFLAGS']),
+ 'CXX="%s %s"' % (self._build_env['CXX'], self._build_env['CXXFLAGS']),
+ # We need to override ZDEFS_FLAG at least to avoid -Wl,-z,defs, which
+ # is not compatible with sanitizers. We also need some way to pass
+ # LDFLAGS without overriding the defaults. Conveniently, ZDEF_FLAG is
+ # always appended to link flags when building NSS on Linux, so we can
+ # just add our LDFLAGS here.
+ 'ZDEFS_FLAG="-Wl,-z,nodefs %s"' % self._build_env['LDFLAGS'],
+ 'NSPR_INCLUDE_DIR=/usr/include/nspr',
+ 'NSPR_LIB_DIR=%s' % self.dest_libdir(),
+ 'NSS_ENABLE_ECC=1'
+ ]
+ if platform.architecture()[0] == '64bit':
+ make_args.append('USE_64=1')
+
+ # Make sure we don't override the default flags in the makefile.
+ for variable in ['CFLAGS', 'CXXFLAGS', 'LDFLAGS']:
+ del self._build_env[variable]
+
+ # Hardcoded paths.
+ temp_dir = os.path.join(self._source_dir, 'nss')
+ temp_libdir = os.path.join(temp_dir, 'lib')
+
+ # Parallel build is not supported. Also, the build happens in
+ # <source_dir>/nss.
+ self.make(make_args, jobs=1, cwd=temp_dir)
+
+ self.fix_rpaths(temp_libdir)
+
+ # 'make install' is not supported. Copy the DSOs manually.
+ for (dirpath, dirnames, filenames) in os.walk(temp_libdir):
+ for filename in filenames:
+ if filename.endswith('.so'):
+ full_path = os.path.join(dirpath, filename)
+ if self._verbose:
+ print 'download_build_install.py: installing %s' % full_path
+ shutil.copy(full_path, self.dest_libdir())
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description='Download, build and install an instrumented package.')
+
+ parser.add_argument('-j', '--jobs', type=int, default=1)
+ parser.add_argument('-p', '--package', required=True)
+ parser.add_argument(
+ '-i', '--product-dir', default='.',
+ help='Relative path to the directory with chrome binaries')
+ parser.add_argument(
+ '-m', '--intermediate-dir', default='.',
+ help='Relative path to the directory for temporary build files')
+ parser.add_argument('--extra-configure-flags', default='')
+ parser.add_argument('--cflags', default='')
+ parser.add_argument('--ldflags', default='')
+ parser.add_argument('-s', '--sanitizer', required=True,
+ choices=['asan', 'msan', 'tsan'])
+ parser.add_argument('-v', '--verbose', action='store_true')
+ parser.add_argument('--cc')
+ parser.add_argument('--cxx')
+ parser.add_argument('--patch', default='')
+ # This should be a shell script to run before building specific libraries.
+ # This will be run after applying the patch above.
+ parser.add_argument('--pre-build', default='')
+ parser.add_argument('--build-method', default='destdir')
+ parser.add_argument('--sanitizer-blacklist', default='')
+ # The LIBDIR argument to configure/make.
+ parser.add_argument('--libdir', default='lib')
+
+ # Ignore all empty arguments because in several cases gyp passes them to the
+ # script, but ArgumentParser treats them as positional arguments instead of
+ # ignoring (and doesn't have such options).
+ args = parser.parse_args([arg for arg in sys.argv[1:] if len(arg) != 0])
+
+ # Clobber by default, unless the developer wants to hack on the package's
+ # source code.
+ clobber = \
+ (os.environ.get('INSTRUMENTED_LIBRARIES_NO_CLOBBER', '') != '1')
+
+ if args.build_method == 'destdir':
+ builder = InstrumentedPackageBuilder(args, clobber)
+ elif args.build_method == 'custom_nss':
+ builder = NSSBuilder(args, clobber)
+ elif args.build_method == 'custom_libcap':
+ builder = LibcapBuilder(args, clobber)
+ elif args.build_method == 'custom_libpci3':
+ builder = Libpci3Builder(args, clobber)
+ else:
+ raise Exception('Unrecognized build method: %s' % args.build_method)
+
+ builder.download_build_install()
+
+if __name__ == '__main__':
+ main()
diff --git a/third_party/instrumented_libraries/scripts/fix_rpaths.sh b/third_party/instrumented_libraries/scripts/fix_rpaths.sh
new file mode 100755
index 0000000..578243f
--- /dev/null
+++ b/third_party/instrumented_libraries/scripts/fix_rpaths.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Changes all RPATHs in a given directory from XORIGIN to $ORIGIN
+# See the comment about XORIGIN in instrumented_libraries.gyp
+
+# Fixes rpath from XORIGIN to $ORIGIN in a single file $1.
+function fix_rpath {
+ if [ -w "$1" ]
+ then
+ # Only attempt to fix RPATH if the entry actually exists.
+ # FIXME(earthdok): find out why zlib1g on Precise doesn't get RPATH set.
+ if chrpath -l $1
+ then
+ echo "fix_rpaths.sh: fixing $1"
+ chrpath -r $(chrpath $1 | cut -d " " -f 2 | sed s/XORIGIN/\$ORIGIN/g \
+ | sed s/RPATH=//g) $1
+ fi
+ else
+ # FIXME(earthdok): libcups2 DSOs are created non-writable, causing this
+ # script to fail. As a temporary measure, ignore non-writable files.
+ echo "fix_rpaths.sh: skipping non-writable file $1"
+ fi
+}
+
+for i in $(find $1 | grep -P "\.so(.\d+)*$"); do
+ fix_rpath $i
+done
diff --git a/third_party/instrumented_libraries/scripts/install-build-deps.sh b/third_party/instrumented_libraries/scripts/install-build-deps.sh
new file mode 100755
index 0000000..d6cce4a
--- /dev/null
+++ b/third_party/instrumented_libraries/scripts/install-build-deps.sh
@@ -0,0 +1,98 @@
+#!/bin/bash -e
+
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Script to install build dependencies of packages which we instrument.
+
+# Enable source repositories in Goobuntu.
+if hash goobuntu-config 2> /dev/null
+then
+ sudo goobuntu-config set include_deb_src true
+fi
+
+# TODO(earthdok): find a way to pull the list from the build config.
+common_packages="\
+atk1.0 \
+dee \
+freetype \
+libappindicator1 \
+libasound2 \
+libcairo2 \
+libcap2 \
+libcups2 \
+libdbus-1-3 \
+libdbus-glib-1-2 \
+libdbusmenu \
+libdbusmenu-glib4 \
+libexpat1 \
+libffi6 \
+libfontconfig1 \
+libgconf-2-4 \
+libgcrypt11 \
+libgdk-pixbuf2.0-0 \
+libglib2.0-0 \
+libgnome-keyring0 \
+libgpg-error0 \
+libgtk2.0-0 \
+libnspr4 \
+libp11-kit0 \
+libpci3 \
+libpcre3 \
+libpixman-1-0 \
+libpng12-0 \
+libunity9 \
+libx11-6 \
+libxau6 \
+libxcb1 \
+libxcomposite1 \
+libxcursor1 \
+libxdamage1 \
+libxdmcp6 \
+libxext6 \
+libxfixes3 \
+libxi6 \
+libxinerama1 \
+libxrandr2 \
+libxrender1 \
+libxss1 \
+libxtst6 \
+nss \
+pango1.0 \
+pulseaudio \
+udev \
+zlib1g \
+brltty"
+
+precise_specific_packages="libtasn1-3"
+trusty_specific_packages="\
+libtasn1-6 \
+harfbuzz
+libsecret"
+
+ubuntu_release=$(lsb_release -cs)
+
+if test "$ubuntu_release" = "precise" ; then
+ packages="$common_packages $precise_specific_packages"
+else
+ packages="$common_packages $trusty_specific_packages"
+fi
+
+# Extra build deps for pulseaudio, which apt-get build-dep may fail to install
+# for reasons which are not entirely clear.
+sudo apt-get install libltdl3-dev libjson0-dev \
+ libsndfile1-dev libspeexdsp-dev libjack0 \
+ chrpath -y # Chrpath is required by fix_rpaths.sh.
+
+sudo apt-get build-dep -y $packages
+
+if test "$ubuntu_release" = "trusty" ; then
+ # On Trusty, build deps for some of the instrumented packages above conflict
+ # with Chromium's build deps. In particular:
+ # zlib1g and libffi remove gcc-4.8 in favor of gcc-multilib,
+ # libglib2.0-0 removes libelf in favor of libelfg0.
+ # We let Chromium's build deps take priority. So, run Chromium's
+ # install-build-deps.sh to reinstall those that have been removed.
+ $(dirname ${BASH_SOURCE[0]})/../../build/install-build-deps.sh --no-prompt
+fi
diff --git a/third_party/instrumented_libraries/scripts/autogen.sh b/third_party/instrumented_libraries/scripts/pre-build/autogen.sh
index 7b3b390..7b3b390 100755
--- a/third_party/instrumented_libraries/scripts/autogen.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/autogen.sh
diff --git a/third_party/instrumented_libraries/scripts/autoreconf.sh b/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh
index 138fabe..138fabe 100755
--- a/third_party/instrumented_libraries/scripts/autoreconf.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/autoreconf.sh
diff --git a/third_party/instrumented_libraries/scripts/freetype.sh b/third_party/instrumented_libraries/scripts/pre-build/freetype.sh
index 2a3ac3f..2a3ac3f 100755
--- a/third_party/instrumented_libraries/scripts/freetype.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/freetype.sh
diff --git a/third_party/instrumented_libraries/scripts/libasound2.sh b/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh
index d7c59a4..d7c59a4 100755
--- a/third_party/instrumented_libraries/scripts/libasound2.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/libasound2.sh
diff --git a/third_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh b/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh
index 254804a..254804a 100755
--- a/third_party/instrumented_libraries/scripts/libgdk-pixbuf2.0-0.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/libgdk-pixbuf2.0-0.sh
diff --git a/third_party/instrumented_libraries/scripts/libgtk2.0-0.sh b/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh
index adaf38f..adaf38f 100755
--- a/third_party/instrumented_libraries/scripts/libgtk2.0-0.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/libgtk2.0-0.sh
diff --git a/third_party/instrumented_libraries/scripts/libnspr4.sh b/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh
index 07b7908..07b7908 100755
--- a/third_party/instrumented_libraries/scripts/libnspr4.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/libnspr4.sh
diff --git a/third_party/instrumented_libraries/scripts/libva1.sh b/third_party/instrumented_libraries/scripts/pre-build/libva1.sh
index d28002a..d28002a 100755
--- a/third_party/instrumented_libraries/scripts/libva1.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/libva1.sh
diff --git a/third_party/instrumented_libraries/scripts/pulseaudio.sh b/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh
index a74f1a7..a74f1a7 100755
--- a/third_party/instrumented_libraries/scripts/pulseaudio.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/pulseaudio.sh
diff --git a/third_party/instrumented_libraries/scripts/udev.sh b/third_party/instrumented_libraries/scripts/pre-build/udev.sh
index 921b590..921b590 100755
--- a/third_party/instrumented_libraries/scripts/udev.sh
+++ b/third_party/instrumented_libraries/scripts/pre-build/udev.sh