From: Peter Maydell <peter.maydell@linaro.org>
To: Chris Johns <chrisj@rtems.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] configure: use glib in glib pkg-config check.
Date: Mon, 3 Feb 2014 23:17:15 +0000 [thread overview]
Message-ID: <CAFEAcA-__bOWSZz+413Zgudcrv7O9N4WPAtqKZKnut+4T166JA@mail.gmail.com> (raw)
In-Reply-To: <52F01EA6.2030406@rtems.org>
On 3 February 2014 22:56, Chris Johns <chrisj@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
next prev parent reply other threads:[~2014-02-03 23:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 4:26 [Qemu-devel] [PATCH] configure: use glib in glib pkg-config check Chris Johns
2014-02-03 10:29 ` Daniel P. Berrange
2014-02-03 22:56 ` Chris Johns
2014-02-03 23:17 ` Peter Maydell [this message]
2014-02-04 9:59 ` Daniel P. Berrange
2014-02-05 5:31 ` Chris Johns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA-__bOWSZz+413Zgudcrv7O9N4WPAtqKZKnut+4T166JA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=chrisj@rtems.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).