After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673377 - Fails to build when configuring using --with-pkg-config-path=...
Fails to build when configuring using --with-pkg-config-path=...
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2012-04-02 16:34 UTC by Sebastian Rasmussen
Modified: 2012-05-05 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---

git patch of proposed solution. (16.25 KB, patch)
2012-04-03 09:31 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2012-04-02 16:34:31 UTC
After cloning the gst-plugins-base upstream git repo I execute:

./configure --with-pkg-config-path=/tmp/installed/lib/pkgconfig --prefix=/tmp/installed

which completes successfully. Trying to compile it does not however:

make install
make[4]: Entering directory `/tmp/gst-plugins-base/gst-libs/gst/pbutils'
  CC     libgstpbutils_0.11_la-gstpluginsbaseversion.lo
  CC     libgstpbutils_0.11_la-pbutils.lo
  CC     libgstpbutils_0.11_la-codec-utils.lo
  CC     libgstpbutils_0.11_la-descriptions.lo
  CC     libgstpbutils_0.11_la-encoding-profile.lo
  CC     libgstpbutils_0.11_la-encoding-target.lo
  CC     libgstpbutils_0.11_la-install-plugins.lo
  CC     libgstpbutils_0.11_la-missing-plugins.lo
  CC     libgstpbutils_0.11_la-gstdiscoverer.lo
  CC     libgstpbutils_0.11_la-gstdiscoverer-types.lo
  CC     libgstpbutils_0.11_la-pbutils-enumtypes.lo
  GEN    GstPbutils-0.11.gir
g-ir-scanner: warning: Option --strip-prefix has been deprecated;
see --identifier-prefix and --symbol-prefix.
g-ir-scanner: compile: gcc -pthread -I/tmp/installed/include/glib-2.0 -I/tmp/installed/lib/glib-2.0/include -I/tmp/installed/include/gstreamer-0.11 -I../../../gst-libs -I../../../gst-libs -I/tmp/installed/include/glib-2.0 -I/tmp/installed/lib/glib-2.0/include -I/tmp/installed/include/gstreamer-0.11 -c -o /tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11.o /tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11.c
g-ir-scanner: link: ../../../libtool --mode=link --tag=CC gcc -o /tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11 -export-dynamic /tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11.o -L. -lgstreamer-0.11 -L -pthread -Wl,--export-dynamic -L/tmp/installed/lib -lgio-2.0 -lgstreamer-0.11 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
libtool: link: require no space between `-L' and `-pthread'
linking of temporary binary failed: Command '['../../../libtool', '--mode=link', '--tag=CC', 'gcc', '-o', '/tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11', '-export-dynamic', '/tmp/gst-plugins-base/gst-libs/gst/pbutils/tmp-introspectf9rlfS/GstPbutils-0.11.o', '-L.', '', '-lgstreamer-0.11', '-L', '-pthread', '-Wl,--export-dynamic', '-L/tmp/installed/lib', '-lgio-2.0', '-lgstreamer-0.11', '-lgobject-2.0', '-lgmodule-2.0', '-lgthread-2.0', '-lrt', '-lglib-2.0']' returned non-zero exit status 1
make[4]: *** [GstPbutils-0.11.gir] Error 1
make[4]: Leaving directory `/tmp/gst-plugins-base/gst-libs/gst/pbutils'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/tmp/gst-plugins-base/gst-libs/gst/pbutils'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/tmp/gst-plugins-base/gst-libs/gst'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/gst-plugins-base/gst-libs'
make: *** [install-recursive] Error 1

The reason can be found in gst-libs/gst/pbutils/ where
the make rule for GstPbutils-x.y.gir fails to propagate PKG_CONFIG_PATH
to the sub-shells used when running pkg-config:

                # I removed some lines here that would hide the problem
                --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \
                --library-path=`$(PKG_CONFIG) --variable=libdir gstreamer-@GST_MAJORMINOR@` \
                # etc...

The problem is that in the sub-shell $(PKG_CONFIG) is run PKG_CONFIG_PATH
has not been set. The same problem exists for another command a few lines down,
and in many other's in gst-plugins-base.

I'm intending to send a patch that preprends PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" between the back-tick and $(PKG_CONFIG) wherever this omission appears. Hopefully this will be attached to the bugreport later tonight.
Comment 1 Sebastian Rasmussen 2012-04-03 09:31:09 UTC
Created attachment 211209 [details] [review]
git patch of proposed solution.
Comment 2 Tim-Philipp Müller 2012-05-05 22:45:39 UTC

Pushed to master (0.11/1.0):

 commit b7b123964b566427b5597133ec6c4aafdeeb74fc
 Author: Sebastian Rasmussen <>
 Date:   Sat May 5 23:26:20 2012 +0100

    gst-libs: make pkg-config get path to pkg-config dirs from configure
    When --with-pkg-config-path is supplied to configure this path is now
    explicitly propagated to pkg-config.
Comment 3 Tim-Philipp Müller 2012-05-05 23:06:20 UTC
And 0.10:

 commit 85d43f525ac395bba635d60a180a3358f0a8dde3
 Author: Sebastian Rasmussen <>
 Date:   Sat May 5 23:56:34 2012 +0100

    gst-libs: make pkg-config get path to pkg-config dirs from configure
    When --with-pkg-config-path is supplied to configure this path is now
    explicitly propagated to pkg-config.