qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Chris Johns <chrisj@rtems.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] configure: use glib in glib pkg-config check.
Date: Tue, 4 Feb 2014 09:59:18 +0000	[thread overview]
Message-ID: <20140204095918.GA4393@redhat.com> (raw)
In-Reply-To: <52F01EA6.2030406@rtems.org>

On Tue, Feb 04, 2014 at 09:56:38AM +1100, Chris Johns wrote:
> On 3/02/2014 9:29 pm, Daniel P. Berrange wrote:
> >On Mon, Feb 03, 2014 at 03:26:15PM +1100, Chris Johns wrote:
> >>Building against with a recent glib in a custom prefix fails because
> >>the gthread cflags in the pkg-config file do not have the correct path
> >>while the glib pc file does.
> >>
> >>Signed-off-by: Chris Johns <chrisj@rtems.org>
> >>---
> >>  configure | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/configure b/configure
> >>index b472694..12f730f 100755
> >>--- a/configure
> >>+++ b/configure
> >>@@ -2343,9 +2343,9 @@ if test "$mingw32" = yes; then
> >>  else
> >>      glib_req_ver=2.12
> >>  fi
> >>-if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then
> >>-    glib_cflags=`$pkg_config --cflags gthread-2.0`
> >>-    glib_libs=`$pkg_config --libs gthread-2.0`
> >>+if $pkg_config --atleast-version=$glib_req_ver glib-2.0; then
> >>+    glib_cflags=`$pkg_config --cflags glib-2.0`
> >>+    glib_libs=`$pkg_config --libs glib-2.0`
> >>      LIBS="$glib_libs $LIBS"
> >>      libs_qga="$glib_libs $libs_qga"
> >>  else
> >
> >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. Qemu is building and
> running the RTEMS testsuite nicely on the arm architecture (with the
> posted zync reset patch).

On Linux there are more flags present in gthread-2.0.pc that are not
present in glib-2.0.pc:

  Name: GThread
  Description: Thread support for GLib
  Requires: glib-2.0
  Version: 2.38.2
  Libs: -L${libdir} -lgthread-2.0 -pthread
  Cflags: -pthread


The 'Requires: glib-2.0' line there means that when QEMU asking for
flags for 'gthread-2.0', it will *also* get any flags listed in the
'glib-2.0.pc' file.

> >
> >What glib version are you seeing a problem with ?
> 
> glib-2.39.3 on darwin 13.0.2 (Mavrick).
> 
> >It seems we should
> >really fix glib, since this will affect countless 1000's of apps using
> >it, not try to workaround in all downstream apps.
> 
> This is outside of my field of view; to me it still looks qemu specific.

I don't believe so. What QEMU is currently doing is correct so I
believe this is either a darwin specific glib bug or a flawed
build of glib on darwin.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2014-02-04  9:59 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
2014-02-04  9:59     ` Daniel P. Berrange [this message]
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=20140204095918.GA4393@redhat.com \
    --to=berrange@redhat.com \
    --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).