* [Qemu-devel] ui/gtk.c vs old gtk versions @ 2014-11-03 13:06 Cornelia Huck 2014-11-03 13:11 ` Kevin Wolf 0 siblings, 1 reply; 6+ messages in thread From: Cornelia Huck @ 2014-11-03 13:06 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann After the latest gtk updates, master fails to build for me on a SLES11SP3 machine: /home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: /home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) /home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once /home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) Of course, the gtk version is not the freshest: pkg-config --modversion "gtk+-2.0" 2.18.9 On machines with less-ancient gtk (say 2.24) everything builds fine. I don't really care about gtk support on the SLES11 machine (it's s390 anyway), but we should probably either fence the pause key support or have configure require a more recent version. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] ui/gtk.c vs old gtk versions 2014-11-03 13:06 [Qemu-devel] ui/gtk.c vs old gtk versions Cornelia Huck @ 2014-11-03 13:11 ` Kevin Wolf 2014-11-03 13:32 ` Daniel P. Berrange 0 siblings, 1 reply; 6+ messages in thread From: Kevin Wolf @ 2014-11-03 13:11 UTC (permalink / raw) To: Cornelia Huck; +Cc: qemu-devel, Gerd Hoffmann Am 03.11.2014 um 14:06 hat Cornelia Huck geschrieben: > After the latest gtk updates, master fails to build for me on a > SLES11SP3 machine: > > /home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: > /home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) > /home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once > /home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) > > Of course, the gtk version is not the freshest: > > pkg-config --modversion "gtk+-2.0" > 2.18.9 > > On machines with less-ancient gtk (say 2.24) everything builds fine. > > I don't really care about gtk support on the SLES11 machine (it's s390 > anyway), but we should probably either fence the pause key support or > have configure require a more recent version. I think I saw the same thing on RHEL 6 (and hacked around it because I didn't have time to investigate it). Kevin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] ui/gtk.c vs old gtk versions 2014-11-03 13:11 ` Kevin Wolf @ 2014-11-03 13:32 ` Daniel P. Berrange 2014-11-03 22:27 ` Cole Robinson 0 siblings, 1 reply; 6+ messages in thread From: Daniel P. Berrange @ 2014-11-03 13:32 UTC (permalink / raw) To: Kevin Wolf; +Cc: Cornelia Huck, qemu-devel, Gerd Hoffmann On Mon, Nov 03, 2014 at 02:11:35PM +0100, Kevin Wolf wrote: > Am 03.11.2014 um 14:06 hat Cornelia Huck geschrieben: > > After the latest gtk updates, master fails to build for me on a > > SLES11SP3 machine: > > > > /home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: > > /home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) > > /home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once > > /home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) > > > > Of course, the gtk version is not the freshest: > > > > pkg-config --modversion "gtk+-2.0" > > 2.18.9 > > > > On machines with less-ancient gtk (say 2.24) everything builds fine. > > > > I don't really care about gtk support on the SLES11 machine (it's s390 > > anyway), but we should probably either fence the pause key support or > > have configure require a more recent version. > > I think I saw the same thing on RHEL 6 (and hacked around it because I > didn't have time to investigate it). In older versions of GDK, the constants were lacking the 'KEY_' part, so it would have just been GDK_Pause. In GTK-VNC I worked around this by adding this kind of thing to our source #ifndef GDK_Return #define GDK_Return GDK_KEY_Return #endif Since there was a fairly small set of key constants that we needed to care about. Regards, 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 :| ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] ui/gtk.c vs old gtk versions 2014-11-03 13:32 ` Daniel P. Berrange @ 2014-11-03 22:27 ` Cole Robinson 2014-11-04 8:40 ` Cornelia Huck 2014-11-04 8:51 ` Kevin Wolf 0 siblings, 2 replies; 6+ messages in thread From: Cole Robinson @ 2014-11-03 22:27 UTC (permalink / raw) To: Daniel P. Berrange, Kevin Wolf; +Cc: Cornelia Huck, qemu-devel, Gerd Hoffmann On 11/03/2014 08:32 AM, Daniel P. Berrange wrote: > On Mon, Nov 03, 2014 at 02:11:35PM +0100, Kevin Wolf wrote: >> Am 03.11.2014 um 14:06 hat Cornelia Huck geschrieben: >>> After the latest gtk updates, master fails to build for me on a >>> SLES11SP3 machine: >>> >>> /home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once >>> /home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) >>> >>> Of course, the gtk version is not the freshest: >>> >>> pkg-config --modversion "gtk+-2.0" >>> 2.18.9 >>> >>> On machines with less-ancient gtk (say 2.24) everything builds fine. >>> >>> I don't really care about gtk support on the SLES11 machine (it's s390 >>> anyway), but we should probably either fence the pause key support or >>> have configure require a more recent version. >> >> I think I saw the same thing on RHEL 6 (and hacked around it because I >> didn't have time to investigate it). > > In older versions of GDK, the constants were lacking the 'KEY_' part, > so it would have just been GDK_Pause. > > In GTK-VNC I worked around this by adding this kind of thing to our > source > > #ifndef GDK_Return > #define GDK_Return GDK_KEY_Return > #endif > > Since there was a fairly small set of key constants that we needed to > care about. > Indeed ui/gtk.c already has a number of similar workarounds. Untested fix below. Cornelia or Kevin, can you confirm? - Cole diff --git a/ui/gtk.c b/ui/gtk.c index de564cc..38bf463 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -128,6 +128,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) #define GDK_KEY_q GDK_q #define GDK_KEY_plus GDK_plus #define GDK_KEY_minus GDK_minus +#define GDK_KEY_Pause GDK_Pause #endif #define HOTKEY_MODIFIERS (GDK_CONTROL_MASK | GDK_MOD1_MASK) ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] ui/gtk.c vs old gtk versions 2014-11-03 22:27 ` Cole Robinson @ 2014-11-04 8:40 ` Cornelia Huck 2014-11-04 8:51 ` Kevin Wolf 1 sibling, 0 replies; 6+ messages in thread From: Cornelia Huck @ 2014-11-04 8:40 UTC (permalink / raw) To: Cole Robinson; +Cc: Kevin Wolf, qemu-devel, Gerd Hoffmann On Mon, 03 Nov 2014 17:27:39 -0500 Cole Robinson <crobinso@redhat.com> wrote: > Indeed ui/gtk.c already has a number of similar workarounds. > > Untested fix below. Cornelia or Kevin, can you confirm? > > - Cole > > diff --git a/ui/gtk.c b/ui/gtk.c > index de564cc..38bf463 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -128,6 +128,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, > gint *ww, gint *wh) > #define GDK_KEY_q GDK_q > #define GDK_KEY_plus GDK_plus > #define GDK_KEY_minus GDK_minus > +#define GDK_KEY_Pause GDK_Pause > #endif > > #define HOTKEY_MODIFIERS (GDK_CONTROL_MASK | GDK_MOD1_MASK) > With this change, master builds for me again. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] ui/gtk.c vs old gtk versions 2014-11-03 22:27 ` Cole Robinson 2014-11-04 8:40 ` Cornelia Huck @ 2014-11-04 8:51 ` Kevin Wolf 1 sibling, 0 replies; 6+ messages in thread From: Kevin Wolf @ 2014-11-04 8:51 UTC (permalink / raw) To: Cole Robinson; +Cc: Cornelia Huck, qemu-devel, Gerd Hoffmann Am 03.11.2014 um 23:27 hat Cole Robinson geschrieben: > On 11/03/2014 08:32 AM, Daniel P. Berrange wrote: > >On Mon, Nov 03, 2014 at 02:11:35PM +0100, Kevin Wolf wrote: > >>Am 03.11.2014 um 14:06 hat Cornelia Huck geschrieben: > >>>After the latest gtk updates, master fails to build for me on a > >>>SLES11SP3 machine: > >>> > >>>/home/cohuck/git/qemu/ui/gtk.c: In function ‘gd_key_event’: > >>>/home/cohuck/git/qemu/ui/gtk.c:943: error: ‘GDK_KEY_Pause’ undeclared (first use in this function) > >>>/home/cohuck/git/qemu/ui/gtk.c:943: error: (Each undeclared identifier is reported only once > >>>/home/cohuck/git/qemu/ui/gtk.c:943: error: for each function it appears in.) > >>> > >>>Of course, the gtk version is not the freshest: > >>> > >>>pkg-config --modversion "gtk+-2.0" > >>>2.18.9 > >>> > >>>On machines with less-ancient gtk (say 2.24) everything builds fine. > >>> > >>>I don't really care about gtk support on the SLES11 machine (it's s390 > >>>anyway), but we should probably either fence the pause key support or > >>>have configure require a more recent version. > >> > >>I think I saw the same thing on RHEL 6 (and hacked around it because I > >>didn't have time to investigate it). > > > >In older versions of GDK, the constants were lacking the 'KEY_' part, > >so it would have just been GDK_Pause. > > > >In GTK-VNC I worked around this by adding this kind of thing to our > >source > > > > #ifndef GDK_Return > > #define GDK_Return GDK_KEY_Return > > #endif > > > >Since there was a fairly small set of key constants that we needed to > >care about. > > > > Indeed ui/gtk.c already has a number of similar workarounds. > > Untested fix below. Cornelia or Kevin, can you confirm? That seems to fix it for me. Tested-by: Kevin Wolf <kwolf@redhat.com> > diff --git a/ui/gtk.c b/ui/gtk.c > index de564cc..38bf463 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -128,6 +128,7 @@ static inline void > gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) > #define GDK_KEY_q GDK_q > #define GDK_KEY_plus GDK_plus > #define GDK_KEY_minus GDK_minus > +#define GDK_KEY_Pause GDK_Pause > #endif > > #define HOTKEY_MODIFIERS (GDK_CONTROL_MASK | GDK_MOD1_MASK) > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-04 8:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-03 13:06 [Qemu-devel] ui/gtk.c vs old gtk versions Cornelia Huck 2014-11-03 13:11 ` Kevin Wolf 2014-11-03 13:32 ` Daniel P. Berrange 2014-11-03 22:27 ` Cole Robinson 2014-11-04 8:40 ` Cornelia Huck 2014-11-04 8:51 ` Kevin Wolf
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).