gtk: switch to gtk3 by default, depricate gtk2.
RFC PATCH 1/1 gtk: switch to gtk3 by default, depricate gtk2.
This patch drops gtk version detection. gtk3 is used unless you explicitly ask for gtk2. Additionally configure prints an error message in case it finds gtk2 but not gtk3.
Old behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk2 only gtk2 installed -- use gtk2
no gtk installed at all -- build without gtk ui
New behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk3 only gtk2 installed -- error out
no gtk installed at all -- build without gtk ui
It is still possible to build with gtk2, but you have to explicitly ask for it using --with-gtkabi=2.0.
--- configure | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
configure +14 -8
@@ -2154,14 +2154,20 @@ fi # GTK probe if test "$gtkabi" = ""; then - # The GTK ABI was not specified explicitly, so try whether 2.0 is available. - # Use 3.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then - gtkabi=2.0 - elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then - gtkabi=3.0 - else - gtkabi=2.0 + gtkabi=3.0 + if !$pkg_config --exists "gtk+-3.0 >= 3.0.0" && + $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then + echo "" + echo "ERROR: gtk3 not found, gtk2 is present though." + echo "" + echo "We strongly recomment to install the gtk3 devel packages and" + echo "build qemu with gtk3. gtk2 support is depricated and will be" + echo "dropped (removal scheduled for 2018)." + echo "" + echo "If it is really your intention to build qemu with gtk2 re-run" + echo "configure with --with-gtkabi=2.0." + echo "" + exit 1 fi fi
Signature · 1 line
1.8.3.1
Quoted 38 lines · Gerd Hoffmann
This patch drops gtk version detection. gtk3 is used unless you explicitly ask for gtk2. Additionally configure prints an error message in case it finds gtk2 but not gtk3.
Old behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk2 only gtk2 installed -- use gtk2no gtk installed at all -- build without gtk ui
New behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk3 only gtk2 installed -- error outno gtk installed at all -- build without gtk ui
It is still possible to build with gtk2, but you have to explicitly ask for it using --with-gtkabi=2.0.
Signed-off-by Gerd Hoffmann <[email protected]>--- configure | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)configure +0
-6@@ -2154,14 +2154,20 @@ fi # GTK probe if test "$gtkabi" = ""; then - # The GTK ABI was not specified explicitly, so try whether 2.0 is available. - # Use 3.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then - gtkabi=2.0 - elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then - gtkabi=3.0
configure fi · line 2164
Quoted 10 lines
configure +8
-2- else - gtkabi=2.0 + gtkabi=3.0 + if !$pkg_config --exists "gtk+-3.0 >= 3.0.0" && + $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then + echo "" + echo "ERROR: gtk3 not found, gtk2 is present though." + echo "" + echo "We strongly recomment to install the gtk3 devel packages and" + echo "build qemu with gtk3. gtk2 support is depricated and will be"
s/depricated/deprecated/
configure fi · line 2172
Quoted 8 lines
configure +6
-0+ echo "dropped (removal scheduled for 2018)." + echo "" + echo "If it is really your intention to build qemu with gtk2 re-run" + echo "configure with --with-gtkabi=2.0." + echo "" + exit 1 fi fi
Regards,
Daniel
Signature · 4 lines
|: 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 :|
Quoted 37 lines · Gerd Hoffmann
This patch drops gtk version detection. gtk3 is used unless you explicitly ask for gtk2. Additionally configure prints an error message in case it finds gtk2 but not gtk3.
Old behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk2 only gtk2 installed -- use gtk2no gtk installed at all -- build without gtk ui
New behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk3 only gtk2 installed -- error outno gtk installed at all -- build without gtk ui
It is still possible to build with gtk2, but you have to explicitly ask for it using --with-gtkabi=2.0.
Signed-off-by Gerd Hoffmann <[email protected]>--- configure | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)configure +0
-5@@ -2154,14 +2154,20 @@ fi # GTK probe if test "$gtkabi" = ""; then - # The GTK ABI was not specified explicitly, so try whether 2.0 is available. - # Use 3.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then - gtkabi=2.0 - elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
configure fi · line 2163
Quoted 10 lines
configure +7
-3- gtkabi=3.0 - else - gtkabi=2.0 + gtkabi=3.0 + if !$pkg_config --exists "gtk+-3.0 >= 3.0.0" && + $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then + echo "" + echo "ERROR: gtk3 not found, gtk2 is present though." + echo "" + echo "We strongly recomment to install the gtk3 devel packages and"
"recommend"
configure fi · line 2172
Quoted 9 lines
configure +7
-0+ echo "build qemu with gtk3. gtk2 support is depricated and will be" + echo "dropped (removal scheduled for 2018)." + echo "" + echo "If it is really your intention to build qemu with gtk2 re-run" + echo "configure with --with-gtkabi=2.0." + echo "" + exit 1 fi fi
I'm not really convinced that we should do this, though. Generally configure should just work with what you have, unless you specifically use options to ask it for a feature.
thanks
-- PMM
Quoted 61 lines · Peter Maydell
Quoted 37 lines · Gerd Hoffmann
This patch drops gtk version detection. gtk3 is used unless you explicitly ask for gtk2. Additionally configure prints an error message in case it finds gtk2 but not gtk3.
Old behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk2 only gtk2 installed -- use gtk2no gtk installed at all -- build without gtk ui
New behavior:
only gtk3 installed -- use gtk3 both gtk2+3 installed -- use gtk3 only gtk2 installed -- error outno gtk installed at all -- build without gtk ui
It is still possible to build with gtk2, but you have to explicitly ask for it using --with-gtkabi=2.0.
Signed-off-by Gerd Hoffmann <[email protected]>--- configure | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)configure +0
-5@@ -2154,14 +2154,20 @@ fi # GTK probe if test "$gtkabi" = ""; then - # The GTK ABI was not specified explicitly, so try whether 2.0 is available. - # Use 3.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then - gtkabi=2.0 - elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; thenconfigure fi · line 2163
Quoted 10 lines
configure +7
-3- gtkabi=3.0 - else - gtkabi=2.0 + gtkabi=3.0 + if !$pkg_config --exists "gtk+-3.0 >= 3.0.0" && + $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then + echo "" + echo "ERROR: gtk3 not found, gtk2 is present though." + echo "" + echo "We strongly recomment to install the gtk3 devel packages and""recommend"
configure fi · line 2172
Quoted 9 lines
configure +7
-0+ echo "build qemu with gtk3. gtk2 support is depricated and will be" + echo "dropped (removal scheduled for 2018)." + echo "" + echo "If it is really your intention to build qemu with gtk2 re-run" + echo "configure with --with-gtkabi=2.0." + echo "" + exit 1 fi fi
Quoted 3 lines
I'm not really convinced that we should do this, though. Generally configure should just work with what you have, unless you specifically use options to ask it for a feature.
We could just print the message and then set gtk=no instead of 'exit 1'
Regards,
Daniel
Signature · 4 lines
|: 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 :|
Hi,
Quoted 10 lines
Quoted 10 lines
configure fi · line 2172
Quoted 6 lines
configure +4
-0+ echo "If it is really your intention to build qemu with gtk2 re-run" + echo "configure with --with-gtkabi=2.0." + echo "" + exit 1 fi fiI'm not really convinced that we should do this, though. Generally configure should just work with what you have, unless you specifically use options to ask it for a feature.
In general yes. But our plan is to remove gtk2 support. And I think it is better to do this in two steps: First stop using it by default, with gtk2 support still being available as backup plan in case there are regressions[1] when people switch over to gtk3. Second actually removing gtk2 support.
My main intention here is to catch cases where people build with gtk2 more or less by accident, something like package build dependencies not being updated from gtk2 to gtk3 because qemu never demanded it.
Quoted 1 line
We could just print the message and then set gtk=no instead of 'exit 1'
Fine with me too.
But in that case people will probably notice it later, when they run qemu and figure the gtk ui is gone. Not sure this is better than a straight build failure. But at least they should easily find the warning in the build logs when the start digging why gtk is gone.
cheers,
Gerd
[1] Not that I expect many problems given that fedora and probably other distros too build with gtk3 for a while already.