On 3 February 2014 22:56, Chris Johns <chr...@rtems.org> wrote: > On 3/02/2014 9:29 pm, Daniel P. Berrange wrote: >> This change will cause -pthread linker + compiler flag to be lost. >> > > I see in gthread-2.0.pc .. > > Libs: -L${libdir} -lgthread-2.0 > Cflags: -D_REENTRANT > > and qemu includes 'glib.h'. Without the glib pc flags being used the build > fails not being able to find 'glib.h'. > > I have no idea about the relationship this has with -pthread. Are both > needed ? It is not a problem on darwin.
If you're going to make changes to configure it would be wiser to test them also on Linux. Darwin is a bit of an outlier as far as QEMU goes. In particular, the reason you're not noticing a problem: manooth$ pkg-config --cflags gthread-2.0 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include because on MacOSX we don't need any special flags for threading. However on Linux it's the gthread-2.0 cflags that add -pthread: pm215@canth:/tmp$ pkg-config --cflags gthread-2.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include because we do need special flags, and you've just dropped those. Incidentally, on my Mountain Lion system: manooth$ pkg-config --cflags glib-2.0 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include and you can see that both gthread-2.0 and glib-2.0 give the same set of includes. (that's some random glib, I think 2.0.25, from fink packages.) >> What glib version are you seeing a problem with ? > > > glib-2.39.3 on darwin 13.0.2 (Mavrick). Do Apple provide that with the system these days, or have you installed that from some third-party (if so, who?) Anyway, I notice from the glib documentation that the docs for glib 2.30: https://developer.gnome.org/glib/2.30/glib-compiling.html talk about using pkg-config gthread-2.0, but the docs for 2.32 and later: https://developer.gnome.org/glib/2.32/glib-compiling.html don't any more. Is this the glib devs inflicting random churn on everybody's build scripts? Do you get the same version number from 'pkg-config --version gthread-2.0' as you do from 'pkg-config --version glib-2.0' or is the gthread pkg info you have an old stale version, maybe? thanks -- PMM