Bug 39567

Summary: [GTK] Configure script should check the required GTK+ version
Product: WebKit Reporter: Joone Hur <joone>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bunk, commit-queue, gustavo, xan.lopez
Priority: P4    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
modified configure.ac
none
Proposed patch none

Description Joone Hur 2010-05-23 07:49:29 PDT
Created attachment 56824 [details]
modified configure.ac

The current configure script doesn't check the required GTK+ version to 2.18
If the installed GTK+ is prior to 2.18, you can see the following build break message.

WebCore/platform/gtk/ScrollbarGtk.cpp:211: error: ‘gtk_widget_get_has_window’ was not declared in this scope

gtk_widget_get_has_window API has been introduced since 2.18
Therefore we need to modify configure.ac as follows,

diff --git a/configure.ac b/configure.ac
index 9757541..a076e35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -205,7 +205,7 @@ LIBXML_REQUIRED_VERSION=2.6
 
 # minimum GTK+ base dependencies
 PANGO_REQUIRED_VERSION=1.12
-GTK_REQUIRED_VERSION=2.10
+GTK_REQUIRED_VERSION=2.18
Comment 1 Xan Lopez 2010-05-24 02:08:35 PDT
(In reply to comment #0)
> Created an attachment (id=56824) [details]
> modified configure.ac
> 
> The current configure script doesn't check the required GTK+ version to 2.18
> If the installed GTK+ is prior to 2.18, you can see the following build break message.
> 
> WebCore/platform/gtk/ScrollbarGtk.cpp:211: error: ‘gtk_widget_get_has_window’ was not declared in this scope
> 
> gtk_widget_get_has_window API has been introduced since 2.18
> Therefore we need to modify configure.ac as follows,
> 
> diff --git a/configure.ac b/configure.ac
> index 9757541..a076e35 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -205,7 +205,7 @@ LIBXML_REQUIRED_VERSION=2.6
> 
>  # minimum GTK+ base dependencies
>  PANGO_REQUIRED_VERSION=1.12
> -GTK_REQUIRED_VERSION=2.10
> +GTK_REQUIRED_VERSION=2.18

The required GTK+ version is 2.10, not 2.18. If we fail to compile with it then it's just a mistake, not intentional. In the case of gtk_widget_get_has_window this should be fixed in WebCore/platform/gtk/GtkVersioning.h, so not sure what's going on. Are you using svn trunk?
Comment 2 Joone Hur 2010-05-24 07:05:47 PDT
I'm using git trunk.

I think that GtkVersioning.h should be included in WebCore/platform/gtk/ScrollbarGtk.cpp
Comment 3 Gustavo Noronha (kov) 2010-05-24 13:30:54 PDT
(In reply to comment #2)
> I'm using git trunk.
> 
> I think that GtkVersioning.h should be included in WebCore/platform/gtk/ScrollbarGtk.cpp

That sounds right to me. Want to make a patch with a changelog? =)
Comment 4 Xan Lopez 2010-05-25 02:24:14 PDT
(In reply to comment #2)
> I'm using git trunk.
> 
> I think that GtkVersioning.h should be included in WebCore/platform/gtk/ScrollbarGtk.cpp

Duh, of course. As Gustavo says, a patch is welcome :)
Comment 5 Joone Hur 2010-05-25 06:32:30 PDT
Created attachment 57012 [details]
Proposed patch

Hi~

I made a patch.

Thanks!
Comment 6 Xan Lopez 2010-05-25 11:14:47 PDT
Comment on attachment 57012 [details]
Proposed patch

r=me
Comment 7 Adrian Bunk 2010-05-25 15:02:56 PDT
(In reply to comment #1)

> The required GTK+ version is 2.10, not 2.18. If we fail to compile with it then it's just a mistake, not intentional. In the case of gtk_widget_get_has_window this should be fixed in WebCore/platform/gtk/GtkVersioning.h, so not sure what's going on. Are you using svn trunk?

Please have a look at #37085 where I try to explain why GTK+ versions < 2.18 are unlikely to be used in practice due to the high glib dependency.
Comment 8 WebKit Commit Bot 2010-05-27 03:39:42 PDT
Comment on attachment 57012 [details]
Proposed patch

Clearing flags on attachment: 57012

Committed r60288: <http://trac.webkit.org/changeset/60288>
Comment 9 WebKit Commit Bot 2010-05-27 03:39:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Gustavo Noronha (kov) 2010-06-01 07:57:17 PDT
(In reply to comment #7)
> Please have a look at #37085 where I try to explain why GTK+ versions < 2.18 are unlikely to be used in practice due to the high glib dependency.

I said exactly that some time ago, and someone then explained to me that the reason we try to support 2.10 is because that's what Maemo had, and people saw it as a good thing to have (given it was not too complex). Maemo5 has moved to GTK+ 2.14, it seems, so the reasons to support something older than 2.14 may soon be gone.
Comment 11 Adrian Bunk 2010-06-01 17:10:15 PDT
(In reply to comment #10)
> (In reply to comment #7)
> > Please have a look at #37085 where I try to explain why GTK+ versions < 2.18 are unlikely to be used in practice due to the high glib dependency.
> 
> I said exactly that some time ago, and someone then explained to me that the reason we try to support 2.10 is because that's what Maemo had, and people saw it as a good thing to have (given it was not too complex). Maemo5 has moved to GTK+ 2.14, it seems, so the reasons to support something older than 2.14 may soon be gone.

Supporting GTK+ 2.14 alone won't help you for Maemo.

Maemo 5 ships with glib 2.20, and that is too old for the libsoup versions required by WebKitGTK+, and for WebKitGTK+ itself.