All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] glib-compat tales of woe
@ 2015-04-02 13:15 Cornelia Huck
  2015-04-02 13:55 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Cornelia Huck @ 2015-04-02 13:15 UTC (permalink / raw)
  To: qemu-devel

After some updates were applied on our SLES11SP3 development server,
current qemu fails to build:

In file included from /home/cohuck/git/qemu/include/qemu-common.h:43,
                 from /home/cohuck/git/qemu/qapi/qapi-visit-core.c:14:
/home/cohuck/git/qemu/include/glib-compat.h:35: error: static declaration of ‘g_get_monotonic_time’ follows non-static declaration
/usr/include/glib-2.0/glib/gmain.h:236: error: previous declaration of ‘g_get_monotonic_time’ was here


and so on.

pkg-config reports a glib-2.0 version of 2.22.5 - but the SLES
development package contains a helpfully backported version of
g_get_monotonic_time, which you wouldn't know from the reported version.

Question: How do we deal with problems like this?

I don't think it's unlikely that distributors will do similar backports
in the future, and each of them may break the glib-version dependant
compat code.

- Drop support for ancient distros doing weird stuff?
- Try to figure out if we have a version that does not quite provide
  what we think it does, and differentiate accordingly?
- Check if a function exists before trying to provide a compat version?

I'll only do builds on my (non-SLES11SP3) test systems for now, but I
think we need a generic solution.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] glib-compat tales of woe
  2015-04-02 13:15 [Qemu-devel] glib-compat tales of woe Cornelia Huck
@ 2015-04-02 13:55 ` Paolo Bonzini
  2015-04-02 14:32   ` Cornelia Huck
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-04-02 13:55 UTC (permalink / raw)
  To: Cornelia Huck, qemu-devel



On 02/04/2015 15:15, Cornelia Huck wrote:
> After some updates were applied on our SLES11SP3 development server,
> current qemu fails to build:
> 
> In file included from /home/cohuck/git/qemu/include/qemu-common.h:43,
>                  from /home/cohuck/git/qemu/qapi/qapi-visit-core.c:14:
> /home/cohuck/git/qemu/include/glib-compat.h:35: error: static declaration of ‘g_get_monotonic_time’ follows non-static declaration
> /usr/include/glib-2.0/glib/gmain.h:236: error: previous declaration of ‘g_get_monotonic_time’ was here
> 
> 
> and so on.
> 
> pkg-config reports a glib-2.0 version of 2.22.5 - but the SLES
> development package contains a helpfully backported version of
> g_get_monotonic_time, which you wouldn't know from the reported version.
> 
> Question: How do we deal with problems like this?

We call our compat wrapper qemu_g_get_monotonic_time and add a helpful
#define.  Not done so far because nobody ever thought it was necessary. :)

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] glib-compat tales of woe
  2015-04-02 13:55 ` Paolo Bonzini
@ 2015-04-02 14:32   ` Cornelia Huck
  2015-04-02 14:35     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Cornelia Huck @ 2015-04-02 14:32 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Thu, 02 Apr 2015 15:55:10 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> 
> 
> On 02/04/2015 15:15, Cornelia Huck wrote:
> > After some updates were applied on our SLES11SP3 development server,
> > current qemu fails to build:
> > 
> > In file included from /home/cohuck/git/qemu/include/qemu-common.h:43,
> >                  from /home/cohuck/git/qemu/qapi/qapi-visit-core.c:14:
> > /home/cohuck/git/qemu/include/glib-compat.h:35: error: static declaration of ‘g_get_monotonic_time’ follows non-static declaration
> > /usr/include/glib-2.0/glib/gmain.h:236: error: previous declaration of ‘g_get_monotonic_time’ was here
> > 
> > 
> > and so on.
> > 
> > pkg-config reports a glib-2.0 version of 2.22.5 - but the SLES
> > development package contains a helpfully backported version of
> > g_get_monotonic_time, which you wouldn't know from the reported version.
> > 
> > Question: How do we deal with problems like this?
> 
> We call our compat wrapper qemu_g_get_monotonic_time and add a helpful
> #define.  Not done so far because nobody ever thought it was necessary. :)

I can do that. I just hope not many more of these crop up :(

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] glib-compat tales of woe
  2015-04-02 14:32   ` Cornelia Huck
@ 2015-04-02 14:35     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-04-02 14:35 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-devel



On 02/04/2015 16:32, Cornelia Huck wrote:
> > We call our compat wrapper qemu_g_get_monotonic_time and add a helpful
> > #define.  Not done so far because nobody ever thought it was necessary. :)
> 
> I can do that. I just hope not many more of these crop up :(

That would be great, it would be acceptable for 2.3.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-02 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 13:15 [Qemu-devel] glib-compat tales of woe Cornelia Huck
2015-04-02 13:55 ` Paolo Bonzini
2015-04-02 14:32   ` Cornelia Huck
2015-04-02 14:35     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.