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 256005 1e2f1521b7e8226aba3e5d828b3eb8e569ac6886
parent 256004 d43dd3837256d53a40c1ce415808b232e574b26a
child 256006 b28d496da7bf48432cb3aac3d10e7a66a267421c
push id29163
push usercbook@mozilla.com
push dateTue, 04 Aug 2015 11:01:35 +0000
treeherdermozilla-central@5cf4d2f7f2f2 [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>