GNOME Bugzilla – Bug 673377
Fails to build when configuring using --with-pkg-config-path=...
Last modified: 2012-05-05 23:06:20 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 CCLD libgstpbutils-0.11.la 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. libgstpbutils-0.11.la -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.', 'libgstpbutils-0.11.la', '-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/Makefile.am where the make rule for GstPbutils-x.y.gir fails to propagate PKG_CONFIG_PATH to the sub-shells used when running pkg-config: GstPbutils-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_MAJORMINOR@.la $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ # I removed some lines here that would hide the problem --add-include-path=`$(PKG_CONFIG) --variable=girdir gstreamer-@GST_MAJORMINOR@` \ --library=libgstpbutils-@GST_MAJORMINOR@.la \ --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 Makefile.am'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.
Created attachment 211209 [details] [review] git patch of proposed solution.
Thanks! Pushed to master (0.11/1.0): commit b7b123964b566427b5597133ec6c4aafdeeb74fc Author: Sebastian Rasmussen <sebrn@axis.com> 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. https://bugzilla.gnome.org/show_bug.cgi?id=673377
And 0.10: commit 85d43f525ac395bba635d60a180a3358f0a8dde3 Author: Sebastian Rasmussen <sebrn@axis.com> 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. https://bugzilla.gnome.org/show_bug.cgi?id=673377