Skip to contentSkip to conversation

qemu-native: link with system libdbus

PATCH New Ed Bartosh 1 participant 1 message Nov 24, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 qemu-native: link with system libdbus

Build of qemu-native on recent versions of Ubuntu and Debian fails on configure step. The reason for this is that system dbus version is higher than oe dbus version and system pulseaudio libraries require newer dbus.

It causes configure to break with a lot of errors similar to this:
libpulsecommon-6.0.so: undefined reference to dbus_watch_get_enabled@LIBDBUS_1_3

Fixed by building qemu-native with the system libdbus.

This can help with similar issues on other distros when they start using newer dbus.

[YOCTO #8553]

---
 meta/recipes-devtools/qemu/qemu.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/qemu/qemu.inc +3 -0
index abbace8..7289fa2 100644
@@ -40,6 +40,9 @@ do_configure_prepend_class-native() {
 	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
 	if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
 		export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+		# link with the system libdbus
+		libs=$(PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_PATH=$BHOST_PKGCONFIG_PATH PATH=/usr/bin:/bin pkg-config --libs dbus-1 || echo "")
+		[ -n "$libs" ] && export LDFLAGS="$libs $LDFLAGS"
 	fi
 }
 
Signature · 1 line
2.1.4