Skip to contentSkip to conversation

pkg-config confusion

PATCH New Gary Thomas 2 participants 3 messages Sep 24, 2010

lore
Share & tools
lore
#0 lore raw

I'm trying to update the gstreamer plugin recipes to use the latest released packages. This is causing some problems though as with the newest code, the wrong version of ORCC is being used.

I've traced this down to the fact that previous releases just inferred ORCC=orcc which worked correctly and picked up the cross-tool compiler (in sysroots/i686-linux/... etc)

However, the new releases have a fancy M4 macro plus some command line magic for using ORCC. This falls apart because of these lines:

      ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`

Looking into this at configure time, I see that there is some confusion

ORCC=/usr/bin/orcc, PKG_CONFIG=/home/local/p69_poky/tmp/sysroots/i686-linux/usr/bin/pkg-config => /home/local/p69_poky/tmp/sysroots/i686-linux/usr/bin/pkg-config PKG_CONFIG_DISABLE_UNINSTALLED=yes
PKG_CONFIG_SYSROOT_DIR=/home/local/p69_poky/tmp/sysroots/armv7a-poky-linux-gnueabi PKG_CONFIG_DIR=/home/local/p69_poky/tmp/sysroots/armv7a-poky-linux-gnueabi/usr/lib/pkgconfig PKG_CONFIG_LIBDIR=/home/local/p69_poky/tmp/sysroots/armv7a-poky-linux-gnueabi/usr/lib/pkgconfig PKG_CONFIG_PATH=/home/local/p69_poky/tmp/sysroots/armv7a-poky-linux-gnueabi/usr/lib/pkgconfig:/home/local/p69_poky/tmp/sysroots/armv7a-poky-linux-gnueabi/usr/share/pkgconfig

So, it looks like bitbake is trying to run pkg-config using the native version, but with the installed target databases. This in turn has it pick up the target version of ORCC, not the cross version.

How can I convince it otherwise?

n.b. I think this same problem exists elsewhere as I've seen it try to use the wrong version of the pygobject compiler which is handled similarly.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw

PATCH 1/2 gst-plugins-base 0.10.30: depend on gtk+

Some of the tests and examples require gtk.

---
 recipes/gstreamer/gst-plugins-base_0.10.30.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/gstreamer/gst-plugins-base_0.10.30.bb +1 -1
index e4fb226..0826562 100644
@@ -16,7 +16,7 @@ PROVIDES += "gst-plugins"
 # if alsa has been built and is present.  You will
 # not get an error if this is not present, just 
 # a missing alsa plugin
-DEPENDS += "udev cdparanoia pango libtheora alsa-lib libsm virtual/libx11 freetype gnome-vfs libxv"
+DEPENDS += "udev cdparanoia pango libtheora alsa-lib libsm virtual/libx11 freetype gnome-vfs libxv gtk+"
 
 # Needs a udev that enabled gudev, which isn't the default
 EXTRA_OECONF_append = " --with-gudev"
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 gst-plugins.inc: fix path to orcc when prefix != /usr

---
 recipes/gstreamer/gst-plugins.inc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
recipes/gstreamer/gst-plugins.inc +3 -1
index 62fbd40..8dc1ef6 100644
@@ -21,9 +21,11 @@ do_configure_prepend() {
 	sed -i -e 's:`$PKG_CONFIG --variable=includedir gstreamer-0.10`:${STAGING_INCDIR}/gstreamer-0.10:g' ${S}/configure.ac
 }
 
+# orc.m4 calls pkg-config ----variable=orcc orc-0.4 to get the path to orcc,
+# resulting in /usr/bin/orcc. Force it to use the staged orcc.
 do_configure_append() {
 	for i in $(find ${S} -name "Makefile") ; do
-		sed -i -e s:/usr/bin/orcc:${STAGING_BINDIR_NATIVE}/orcc:g $i
+		sed -i -e s:${bindir}/orcc:${STAGING_BINDIR_NATIVE}/orcc:g $i
 	done
 }
 
Signature · 1 line
1.7.0.4