Bug 7077

Summary: qemu-native build broken when system glib>=2.41 (archlinux, fedora 21, ...)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Richard Tollerton <rich.tollerton>
Component: devtools / tool chainAssignee: Cristian Iorga <cristian.iorga>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 1.7   
Target Milestone: 1.8   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: Don't know
Attachments:
Description Flags
Proposed fix none

Description Richard Tollerton 2014-12-11 18:46:27 UTC
qemu-native builds tend to fail with this error:

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libgtk-x11-2.0.so: undefined reference to `g_type_check_instance_is_fundamentally_a'

Note that gtk is disabled in this build, but vte isn't. So, because pkg-config searches the system path for packages for the sake of libsdl-native (see e70913733a216b312ca11082ae55b0b9ed56ec45), it autodetects the system libvte, which pulls in the system gtk.

glib versions 2.41 and later redefined the G_IS_OBJECT() macro to use the new function g_type_check_instance_is_fundamentally_a(). Meanwhile, oe's glib is currently at 2.40, so it doesn't possess this function. qemu-native does depend on glib-2.0-native, so, when it links against system libvte, that links against system libgtk+, which links against oe libglib/libgobject, and *boom*.

This reproduces on archlinux and it almost certainly will reproduce on Fedora 21.
Comment 1 Richard Tollerton 2014-12-15 17:39:15 UTC
Created attachment 2300 [details]
Proposed fix

http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/58614
Comment 2 Richard Tollerton 2014-12-19 20:53:18 UTC
Fix committed to master in 6cea10dd8f041731269ad16b94d8e172ab1f7257.