#1899 closed defect (fixed)
GTK deprecated API troubles
Reported by: | alsroot | Owned by: | benzea |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | 0.88.x |
Severity: | Blocker | Keywords: | r- |
Cc: | sdz, pbrobinson, sascha_silbe | Distribution/OS: | |
Bug Status: | Resolved |
Description
Since Makefile.am contains -DGTK_DISABLE_DEPRECATED and there are deprecated API calls(at least GTK_WIDGET_HAS_FOCUS), libsugar.so is broken.
Attachments (2)
Change History (20)
comment:1 Changed 13 years ago by alsroot
Changed 13 years ago by alsroot
comment:2 Changed 13 years ago by alsroot
- Keywords r? added
- Severity changed from Unspecified to Critical
comment:3 Changed 13 years ago by pbrobinson
- Cc sdz pbrobinson added
comment:4 Changed 13 years ago by sascha_silbe
- Bug Status changed from Unconfirmed to New
- Cc sascha_silbe added
- Distribution/OS Unspecified deleted
- Milestone changed from Unspecified by Release Team to 0.88.x
- Severity changed from Critical to Blocker
Prevents Sugar from starting up (run-time error, not compile-time) on several distros, upgrading severity to Blocker.
comment:5 Changed 13 years ago by sascha_silbe
Patch is straightforward and fixes the issue. Benzea, can we get this into mainline (i.e. r+ from you) ASAP, please?
comment:6 follow-up: ↓ 8 Changed 13 years ago by benzea
- Keywords r+ added; r? removed
Sorry, patch looks good. Feel free to commit it (I can do so too if prefered.)
Though I am not sure why it is a good idea to even have the -DGTK_DISABLE_DEPRECATED in the Makefile. It really only makes sense during development.
comment:7 Changed 13 years ago by alsroot
- Resolution set to fixed
- Status changed from new to closed
comment:8 in reply to: ↑ 6 Changed 13 years ago by sascha_silbe
Replying to benzea:
Though I am not sure why it is a good idea to even have the -DGTK_DISABLE_DEPRECATED in the Makefile. It really only makes sense during development.
My thought exactly, though I'm also wondering why GTK doesn't just spit out compile-time warnings instead of failing horribly at run-time... :-/
comment:9 Changed 13 years ago by sascha_silbe
- Keywords r+ removed
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from Do not use deprecated API to GTK deprecated API troubles
Fun never stops.
With this patch applied, we fail to build on older GTK versions (e.g. 2.16.1 as shipped by Ubuntu Jaunty) because they only have the macro version (GTK_WIDGET_HAS_FOCUS), but not the function one (gtk_widget_has_focus).
comment:10 Changed 13 years ago by sascha_silbe
- Owner changed from benzea to alsroot
- Status changed from reopened to assigned
Sorry, meant "we fail to run" - because it's a run-time failure instead of a build-time one, it was never catched on the build slaves. :(
Changed 13 years ago by alsroot
comment:11 Changed 13 years ago by alsroot
- Keywords r? added
- Owner changed from alsroot to benzea
I guess we can only revert deprecated macroses and remove check
(last patch enable this check in maintainer mode).
comment:12 Changed 13 years ago by benzea
I am not sure about enabling the macro in maintainer mode. That just forces the maintainer to update the macro to the function call, and then things break again. We just need to live with using newly deprecated API as long as sugar-artwork is supposed to work with such an old version of GTK+.
So, I would prefere to just go back to using the Macro, and entirely removing the compile time flags.
comment:13 follow-up: ↓ 14 Changed 13 years ago by benzea
If that would be fine with you, then I can push the fix.
comment:14 in reply to: ↑ 13 Changed 13 years ago by alsroot
Replying to benzea:
If that would be fine with you, then I can push the fix.
yeah, I guess we don't have other options
comment:15 Changed 13 years ago by benzea
- Bug Status changed from New to Resolved
- Keywords r- added; r? removed
- Resolution set to fixed
- Status changed from assigned to closed
Ok, pushed.
comment:16 Changed 11 years ago by humitos
Here is the commit that reverts this change: http://git.sugarlabs.org/sugar-artwork/mainline/commit/ac029997d30ed0e76b319d0ccadb058e21f4d054
comment:17 Changed 10 years ago by dnarvaez
- Component changed from sugar-artwork to Sugar
At least in Mandriva cooker, libsugar.so contains GTK_WIDGET_HAS_FOCUS symbol