Bug 1187664 - Create a fontconfig cache so that Firefox doesn't have to do it itself when run on build automation. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 29 Jul 2015 17:26:04 +0900
changeset 287291 207c45dd3c2eb25fe4b90de66f2484c261bb2751
parent 287290 d093c57c68350c1d72c9c4b791731b86344dbbaa
child 287292 695b89efecfa8ace49dd769d3db9d0b9ae77a824
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1187664
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1187664 - Create a fontconfig cache so that Firefox doesn't have to do it itself when run on build automation. r=mshal
build/unix/mozconfig.gtk
--- a/build/unix/mozconfig.gtk
+++ b/build/unix/mozconfig.gtk
@@ -29,16 +29,24 @@ if [ -d "$TOOLTOOL_DIR/gtk3" ]; then
   $TOOLTOOL_DIR/gtk3/usr/local/bin/pango-querymodules > $TOOLTOOL_DIR/gtk3/usr/local/etc/pango/pango.modules
 
   # same with gdb-pixbuf and loaders.cache
   LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib \
   GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
   GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
   $TOOLTOOL_DIR/gtk3/usr/local/bin/gdk-pixbuf-query-loaders > $TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
 
+  # The fontconfig version in the tooltool package has known uses of
+  # uninitialized memory when creating its cache, and while most users
+  # will already have an existing cache, running Firefox on automation
+  # will create it. Combined with valgrind, this generates irrelevant
+  # errors.
+  # So create the fontconfig cache beforehand.
+  $TOOLTOOL_DIR/gtk3/usr/local/bin/fc-cache
+
   # mock build environment doesn't have fonts in /usr/share/fonts, but
   # has some in /usr/share/X11/fonts. Add this directory to the
   # fontconfig configuration without changing the gtk3 tooltool package.
   cat << EOF > $TOOLTOOL_DIR/gtk3/usr/local/etc/fonts/local.conf
 <?xml version="1.0"?>
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 <fontconfig>
   <dir>/usr/share/X11/fonts</dir>