Closed Bug 1187047 Opened 9 years ago Closed 9 years ago

TC linux build failure | configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ahal, Assigned: dustin)

References

Details

I assume this came from landing bug 1186003.
Assignee: nobody → mh+mozilla
Component: General Automation → Build Config
Depends on: 1179818
Product: Release Engineering → Firefox
QA Contact: catlee
Good news: the gtk3 package is pulled from tooltool.
Bad(?) news: the tooltool output is weird:

20:06:01     INFO -  INFO - untarring "gcc.tar.xz"
20:06:01     INFO -  INFO - rm tree: gcc
20:06:08     INFO -  INFO - untarring "gtk3.tar.xz"
20:06:08     INFO -  INFO - rm tree: gtk3
20:06:09     INFO -  INFO - rm tree: sccache
20:06:09     INFO -  INFO - untarring "sccache.tar.bz2"
No longer depends on: 1179818
I wonder if that's stderr vs stdout ordering?  It's certainly odd, since those operations only occur in one order (rm then untar) in the python code.

https://github.com/mozilla/build-tooltool/blob/master/tooltool.py#L518
        clean_path(base_file)
        log.info('untarring "%s"' % filename)

Is the gtk3 directory actually not there? and only for taskcluster runs?
The gtk3 directory is expected to be there. Maybe tooltool is not running from the source directory? Because the gtk3 directory should end up in PATH as printed out by configure when the gtk3 directory is found in the source directory (which is how things go in buildbot builds).
I'll try running https://tools.taskcluster.net/task-inspector/#ERonvIKhTKuvjrz3mU4nuQ/ manually and having a look at the resulting container.

Interestingly, I see the same output ordering on my system:

20:01:19     INFO -  INFO - Attempting to fetch from 'http://relengapi/tooltool/'...
20:01:19     INFO -  INFO - ...failed to fetch 'gtk3.tar.xz' from http://relengapi/tooltool/
20:01:19     INFO -  INFO - untarring "gcc.tar.xz"
20:01:19     INFO -  INFO - rm tree: gcc
20:01:30     INFO -  INFO - rm tree: sccache
20:01:30     INFO -  INFO - untarring "sccache.tar.bz2"
20:01:30     INFO -  ERROR - The following files failed: 'gtk3.tar.xz'

That might be a red herring, who knows -- maybe mozharness is reversing lines?
worker@taskcluster-worker:~/workspace/build/src$ ls -ald g{cc,tk}*
drwxr-xr-x 9 worker worker     4096 Jan 29  2014 gcc
-rw------- 1 worker worker 80458572 Jul 24 20:00 gcc.tar.xz
drwxr-xr-x 3 worker worker     4096 Sep 23  2014 gtk3
-rw-r--r-- 1 worker worker  4431740 Jul 24 20:49 gtk3.tar.xz

yet I'm seeing the same error:

20:49:44     INFO -  configure:17755: checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0
20:49:44     INFO -  configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

Running with a 'set -x' added:

+ PKG_CONFIG_MIN_VERSION=0.9.0
+ /home/worker/workspace/build/src/gtk3/usr/local/bin/pkg-config --atleast-pkgconfig-version 0.9.0
+ echo checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ... \c
checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ... + echo configure:17755: checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0
+ /home/worker/workspace/build/src/gtk3/usr/local/bin/pkg-config --exists gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0
+ MOZ_GTK3_CFLAGS=
+ MOZ_GTK3_LIBS=
+ /home/worker/workspace/build/src/gtk3/usr/local/bin/pkg-config --errors-to-stdout --print-errors gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0
+ MOZ_GTK3_PKG_ERRORS=Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'freetype2', required by 'cairo', not found
+ echo Package freetype2 was not found in the pkg-config search path. Perhaps you should add the directory containing `freetype2.pc' to the PKG_CONFIG_PATH environment variable Package 'freetype2', required by 'cairo', not found
Package freetype2 was not found in the pkg-config search path. Perhaps you should add the directory containing `freetype2.pc' to the PKG_CONFIG_PATH environment variable Package 'freetype2', required by 'cairo', not found
+ test no = yes
+ test 1
+ echo configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
+ echo configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
+ exit 1

so it looks like freetype isn't included in the gtk tarball, but is required.  Also, that error message should probably be displayed.
Assignee: mh+mozilla → dustin
Oh, it does output the error -- that's the bit I was going to try to patch :)

https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/ERonvIKhTKuvjrz3mU4nuQ/0/public/logs/live_backing.log:
11:07:06     INFO -  checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ... Package freetype2 was not found in the pkg-config search path. Perhaps you should add the directory containing `freetype2.pc' to the PKG_CONFIG_PATH environment variable Package 'freetype2', required by 'cairo', not found
11:07:06     INFO -  configure: error: Library requirements (gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

Figuring out how to handle freetype is up to you.  We can include it in the build image if different versions of freetype are unlikely to affect the build of Firefox (even at the byte level).
Assignee: dustin → mh+mozilla
It's in the mock setup currently, so include it at the build image ;)
Assignee: mh+mozilla → dustin
It looks like it is already installed

root@taskcluster-worker:~# pkg-config --list-all  | grep freetype
freetype2                   FreeType 2 - A free, high-quality, and portable font engine.

root@taskcluster-worker:~# dpkg -S /usr/lib/x86_64-linux-gnu/pkgconfig/freetype2.pc
libfreetype6-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/freetype2.pc

I'm still working on figuring out what ends up installing that, so that I can make it explicit and add a comment.

At any rate the pkg-config in the workspace (installed with the gtk tarball) doesn't find it:

worker@taskcluster-worker:~/workspace/build/src$ /home/worker/workspace/build/src/gtk3/usr/local/bin/pkg-config --list-all 
dbus-python        dbus-python - Python bindings for D-Bus
compositeproto     CompositeExt - Composite extension headers
xineramaproto      XineramaProto - Xinerama extension headers
xorg-sgml-doctools xorg-sgml-doctools - Stylesheets and entities for X.Org documentation
fixesproto         FixesProto - X Fixes extension headers
xkbcomp            xkbcomp - XKB keymap compiler
kbproto            KBProto - KB extension headers
renderproto        RenderProto - Render extension headers
xkeyboard-config   XKeyboardConfig - X Keyboard configuration data
inputproto         InputProto - Input extension headers
xbitmaps           X bitmaps - Bitmaps that are shared between X applications
fontutil           FontUtil - Font utilities dirs
xextproto          XExtProto - XExt extension headers
udev               udev - udev
damageproto        DamageProto - Damage extension headers
xproto             Xproto - Xproto headers
xtrans             XTrans - Abstract network code for X
valgrind           Valgrind - A dynamic binary instrumentation framework
randrproto         RandrProto - Randr extension headers
iso-codes          iso-codes - ISO country, language, script and currency codes and translations
shared-mime-info   shared-mime-info - Freedesktop common MIME database

so, I'm sorry to bump this back, but I think either configure's use of pkg-config needs to be adjusted to search both the system and local config directories, or freetype needs to be loaded into the tooltool package.
Assignee: dustin → nobody
Oh, of course -- mozbootstrap installs it.  So that's all well and proper.
> I think either configure's use of pkg-config needs to be adjusted to search both the system and local config directories,

It does... but it looks at *centos* paths. Search for PKG_CONFIG_LIBDIR in mozilla-central.
Ah.  So there's no way to make it automatically search the system paths, whatever they may be?  I'd rather not lock into Ubuntu if it can be avoided.
That's what it does, but its definition of "system paths" is "whatever was compiled in". Which, in the case of pkg-config in the tooltool package, is wrong for both centos and ubuntu. Which is why there are PKG_CONFIG_LIBDIR set in mozconfigs. Adding the /usr/lib/x86..../pkg-config path /might/ work.
Blocks: 1185643
Assignee: nobody → dustin
I found an intermediate, hidden error where the gtk+3 in tooltool requires libjpeg62.  After adding that to mozbootstrap and rebuilding the images:

15:51:42     INFO -  configure:21993: checking GSTREAMER_LIBS
15:51:42     INFO -  configure:22040: /usr/bin/ccache /home/worker/workspace/build/src/gcc/bin/gcc -o conftest  -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread  -lpthread -L/home/worker/workspace/build/src/gtk3/usr/local/lib  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -L/home/worker/workspace/build/src/gtk3/usr/local/lib -L/home/worker/workspace/build/src/gtk3/usr/lib/x86_64-linux-gnu -lgstapp-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -pthread -lrt -lgthread-2.0 -pthread -lrt -lglib-2.0 -lxml2  -lgstvideo-0.10 conftest.c -ldl  1>&5
15:51:42     INFO -  /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so: undefined reference to `g_type_class_adjust_private_offset'

That function arrived in glib-2.37.3 (specifically libgobject) (http://upstream.rosalinux.ru/compat_reports/glib/2.37.2_to_2.37.3/abi_compat_report.html).  We're installing glib-2.34.3 (https://dxr.mozilla.org/mozilla-central/source/build/unix/build-gtk3/build-gtk3.sh#19).  So this is linking against the system gstreamer, which expects a newer version of glib.
We're soon going to switch to gstreamer 1.0 from tooltool.
Do you have a bug number for that?  This will need to block on it.
Depends on: 947287
Depends on: 1189892
No longer blocks: 1185643
Now that it's clear that a CentOS 6 image is going to work (bug 1189892), there's nothing further to do here.
Status: NEW → RESOLVED
Closed: 9 years ago
No longer depends on: 947287
Resolution: --- → WORKSFORME
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.