Port to GTK+ 3

Bug #972797 reported by Arturo Torres Sánchez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alex Valavanis

Bug Description

Inkscape should port to GTK+ 3 because GTK+ 2 is already an old technology.

Tags: build
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Work is already in progress on this. Please see the linked blueprint for details.

Changed in inkscape:
status: New → Triaged
importance: Undecided → Medium
tags: added: build
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Test rebuild against GTK+3 reveals a *lot* of issues! Build log attached.

Revision history for this message
ScislaC (scislac) wrote :

There's a good amount of issues, but seems like a lot of duplicate stuff that appears to be wrong with the libs themselves giving errors such as:

/usr/include/gtkmm-3.0/gtkmm/widget.h:6:25: fatal error: gtkmmconfig.h: No such file or directory
/usr/include/gdkmm-3.0/gdkmm/pixbuf.h:6:25: fatal error: gdkmmconfig.h: No such file or directory

Plus it looks like a good number of warnings and errors should not be present once knot.h/.cpp are fixed.

Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Re comment #3:

The good news... The gtkmmconfig.h errors were present because I messed up the path inclusions for the build.

The bad news... The real number of issues is approximately *double* that in the original broken build!!

New build log attached

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Updated build log attached. By building against external GDL (since lp:inkscape r11244) , quite a few of the build errors have become "upstream issues", that do not affect Inkscape.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

In lp:inkscape r11249, I have allowed usage of deprecated symbols in GTK+ 3 builds (although they are still forbidden for GTK+ 2). This leaves us with "only" 4867 lines of error output in the build log!

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Note that once we have fixed these "critical" build errors, and we're able to build against GTK+3, we should work towards stripping out all the newly-deprecated stuff.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Latest build log attached. We now have 2007 lines of compiler errors... an improvement, but still a long way to go!

Revision history for this message
ScislaC (scislac) wrote :

It looks like a significant amount of this would go away by addressing the following:

../../src/display/sp-canvas-item.h:66:40: error: expected class-name before ‘{’ token
../../src/display/sp-canvas-item.h:90:51: error: expected class-name before ‘{’ token

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Yep... that's caused by SPCanvasItem being derived from GtkObject, which has been removed from Gtk+ 3. I think Krzysztof was planning to look into this at some stage, but it would be good to get it fixed soon if anyone has any bright ideas!

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Porting to GObject as an interim solution like you did in 11370 is OK for now.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

SPCanvasItem issues have been fixed in lp:inkscape r11470. Only 186 lines left in the build log!

description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

lp:inkscape r11483 builds against GTK+ 3 with the "--enable-gtk3-experimental" configure flag.

Thorough checking for the inevitable huge pile of runtime errors is needed!

Changed in inkscape:
milestone: none → 0.49
status: In Progress → Fix Committed
assignee: nobody → Alex Valavanis (valavanisalex)
description: updated
Revision history for this message
Kris (kris-degussem) wrote :

Due to the recent changes in sp-canvas, there are compiling issues on win32 (devlibs r29, tested with trunk r11483):

Make error line 289: problem compiling: src/display/sp-canvas.cpp:420:6: warning
: unused parameter 'klass' [-Wunused-parameter]
src/display/sp-canvas.cpp:424:6: warning: unused parameter 'klass' [-Wunused-par
ameter]
src/display/sp-canvas.cpp:456:6: warning: unused parameter 'klass' [-Wunused-par
ameter]
src/display/sp-canvas.cpp: In static member function 'static void SPCanvasImpl::
sizeAllocate(GtkWidget*, GtkAllocation*)':
src/display/sp-canvas.cpp:1466:19: warning: variable 'old_area' set but not used
 [-Wunused-but-set-variable]
src/display/sp-canvas.cpp: In static member function 'static int SPCanvasImpl::p
aint(SPCanvas*)':
src/display/sp-canvas.cpp:2237:19: error: 'Region' is not a member of 'Cairo'
src/display/sp-canvas.cpp:2237:19: note: suggested alternatives:
c:\devlibs/include/gdkmm-2.4/gdkmm/region.h:141:7: note: 'Gdk::Region'
src/2geom/forward.h:107:7: note: 'Geom::Region'
src/display/sp-canvas.cpp:2237:19: error: 'Region' is not a member of 'Cairo'
src/display/sp-canvas.cpp:2237:19: note: suggested alternatives:
c:\devlibs/include/gdkmm-2.4/gdkmm/region.h:141:7: note: 'Gdk::Region'
src/2geom/forward.h:107:7: note: 'Geom::Region'
src/display/sp-canvas.cpp:2237:32: error: template argument 1 is invalid
src/display/sp-canvas.cpp:2237:43: error: invalid type in declaration before '='
 token
src/display/sp-canvas.cpp:2237:52: error: 'Cairo::Region' has not been declared
src/display/sp-canvas.cpp:2244:17: error: 'RectangleInt' is not a member of 'Cai
ro'
src/display/sp-canvas.cpp:2244:37: error: expected ';' before 'rect'
src/display/sp-canvas.cpp:2246:25: error: base operand of '->' is not a pointer
src/display/sp-canvas.cpp:2246:36: error: 'rect' was not declared in this scope
src/display/sp-canvas.cpp:2252:26: error: base operand of '->' is not a pointer
src/display/sp-canvas.cpp:2256:13: error: 'RectangleInt' is not a member of 'Cai
ro'
src/display/sp-canvas.cpp:2256:33: error: expected ';' before 'rect'
src/display/sp-canvas.cpp:2257:22: error: 'rect' was not declared in this scope

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Kris,

Try now (r11485). I have explicitly added the cairomm/region.h header.

Revision history for this message
Kris (kris-degussem) wrote :

Hi Alex

This modification does not solve the issue as cairomm/region.h does not exist (because of the version number?). If not, could it be that the file is missing from the devlibs?:
http://bazaar.launchpad.net/~inkscape.dev/inkscape-devlibs/trunk/files/head:/include/cairomm-1.0/cairomm/

gdkmm/region.h exists:
http://bazaar.launchpad.net/~inkscape.dev/inkscape-devlibs/trunk/view/head:/include/gdkmm-2.4/gdkmm.h

Actually, if the former (prior to r11485) check is there, whether these three lines are completely removed, or whether it is replaced by:
#include <gdkmm/region.h>

does not make a difference: the errors mentioned above are thrown.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hmmm... looks like it is indeed missing from devlibs. However, as far as I know, it's supposed to be there in cairomm 1.10. It's there in the upstream repo[1]. It doesn't look like the cairomm C++ bindings have been touched in devlibs for some time! (last revision in Feb 2010 [2])

[1] http://cgit.freedesktop.org/cairomm/tree/cairomm?id=1.10.0
[2] http://bazaar.launchpad.net/~inkscape.dev/inkscape-devlibs/trunk/revision/9

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Follow-up report for missing Cairomm header is filed at bug #1012036

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.