Bug 103209 - [EFL] [GTK] Build break with glib >= 2.35.0
Summary: [EFL] [GTK] Build break with glib >= 2.35.0
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jussi Kukkonen (jku)
URL:
Keywords:
Depends on:
Blocks: 104528
  Show dependency treegraph
 
Reported: 2012-11-25 16:41 PST by szukw000
Modified: 2013-01-11 06:59 PST (History)
6 users (show)

See Also:


Attachments
deprecated function triggered compilation stop (510 bytes, patch)
2012-11-25 16:48 PST, szukw000
no flags Details | Formatted Diff | Diff
Patch (5.41 KB, patch)
2012-12-11 06:18 PST, Jussi Kukkonen (jku)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description szukw000 2012-11-25 16:41:37 PST
see patch
winfried
Comment 1 szukw000 2012-11-25 16:48:23 PST
Created attachment 175896 [details]
deprecated function triggered compilation stop
Comment 2 Laszlo Gombos 2012-12-05 17:59:16 PST
I do not see this problem. I am using Ubuntu 12.04. Can you share a bit more about your environment ? 

Also a few pointers for you:
 - building EFL Webkit - http://trac.webkit.org/wiki/EFLWebKit (note the update-webkitefl-libs part)
 - contributing to WebKit (format of the patches, ChangeLog, etc) - http://www.webkit.org/coding/contributing.html
Comment 3 Laszlo Gombos 2012-12-05 18:00:09 PST
Which version of glib are you using ?
Comment 4 Laszlo Gombos 2012-12-07 14:35:50 PST
It seems that g_type_init() is deprecated for glib >= 2.35.0
Comment 5 szukw000 2012-12-07 16:02:37 PST
glib-2.35.2.tar.xz
atk-2.7.2.tar.xz 
gdk-pixbuf-2.26.5.tar.xz
gtk+-3.4.4.tar.xz
pango-1.32.3.tar.xz

Normally 'deprecated' should not stop the compilation.
But here it did.

winfried
Comment 6 Martin Robinson 2012-12-11 01:10:16 PST
You can control this error with GLIB_VERSION_MIN_REQUIRED.
Comment 7 Jussi Kukkonen (jku) 2012-12-11 06:14:24 PST
I don't understand how the build breaks because of this, but I guess we'll want to add a version check anyway -- the first patch doesn't work since calling g_type_init() is still required for earlier glib versions.

EFL does not seem to have GtkVersioning.h type of file so I'll just add a #if to each call location... let me know if there's a good place to add a version dependent "#define g_type_init()": that would be cleaner.
Comment 8 Jussi Kukkonen (jku) 2012-12-11 06:18:22 PST
Created attachment 178792 [details]
Patch
Comment 9 Kenneth Rohde Christiansen 2012-12-11 06:22:27 PST
Comment on attachment 178792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178792&action=review

> Source/WebKit/efl/ChangeLog:9
> +        g_type_init() is deprecated from 2.35.0 onwards. Don't call it
> +        in that case to avoid warnings and/or build failure.

and it has no replacement?
Comment 10 Martin Robinson 2012-12-11 06:38:48 PST
Comment on attachment 178792 [details]
Patch

One thing you can do instead is to add -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 to the compilation flags and it will disable all deprecation warnings for versions of GLib after that version.
Comment 11 Jussi Kukkonen (jku) 2012-12-11 07:22:50 PST
(In reply to comment #9)
> (From update of attachment 178792 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178792&action=review
> 
> > Source/WebKit/efl/ChangeLog:9
> > +        g_type_init() is deprecated from 2.35.0 onwards. Don't call it
> > +        in that case to avoid warnings and/or build failure.
> 
> and it has no replacement?

No: Earlier calling g_type_init() it was required. 2.35 and after it is not needed at all.

(In reply to comment #10)
> (From update of attachment 178792 [details])
> One thing you can do instead is to add -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 to the compilation flags and it will disable all deprecation warnings for versions of GLib after that version.

Sure, if we know we don't want to see the warnings: Hiding them can lead to surprises later on when functionality is really removed or changed. I guess that's not a very big problem with glib though... Either way works for me.
Comment 12 Jussi Kukkonen (jku) 2012-12-12 02:00:55 PST
(In reply to comment #7)
> I don't understand how the build breaks because of this...

I tested and we do indeed fail on warnings, so must have at least 'Werror=deprecated-declarations'. Personally I wouldn't do that normally, but since we mainly support jhbuild-based building, it kind of makes sense: a developer who checks things out and follows directions should not normally end up with a broken build.

So assuming we want to preserve 'deprecated-declarations' build errors, I think we should go with my patch.
Comment 13 Jussi Kukkonen (jku) 2012-12-13 05:38:25 PST
Comment on attachment 178792 [details]
Patch

No-one's complained so I'll set cq? -- patch still applies cleanly.
Comment 14 WebKit Review Bot 2012-12-13 06:22:50 PST
Comment on attachment 178792 [details]
Patch

Clearing flags on attachment: 178792

Committed r137588: <http://trac.webkit.org/changeset/137588>
Comment 15 WebKit Review Bot 2012-12-13 06:22:55 PST
All reviewed patches have been landed.  Closing bug.