From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WASlt-0001RR-E2 for qemu-devel@nongnu.org; Mon, 03 Feb 2014 18:17:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WASll-00086B-7P for qemu-devel@nongnu.org; Mon, 03 Feb 2014 18:17:45 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:48603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WASll-00085y-0M for qemu-devel@nongnu.org; Mon, 03 Feb 2014 18:17:37 -0500 Received: by mail-lb0-f180.google.com with SMTP id n15so5699409lbi.25 for ; Mon, 03 Feb 2014 15:17:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <52F01EA6.2030406@rtems.org> References: <1391401575-52256-1-git-send-email-chrisj@rtems.org> <20140203102959.GA10408@redhat.com> <52F01EA6.2030406@rtems.org> From: Peter Maydell Date: Mon, 3 Feb 2014 23:17:15 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] configure: use glib in glib pkg-config check. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Johns Cc: QEMU Developers On 3 February 2014 22:56, Chris Johns 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