Inkscape GTK3 build fails with -Werror=deprecated-declarations

Bug #1016020 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

The experimental GTK+ 3 build fails if deprecated declarations are switched off in GCC using:

make -k CPPFLAGS+="-Werror=deprecated-declarations"

Errors are reported for GTK+, GDK and Pango. Although this isn't a major problem, all these symbols will eventually disappear from the upstream libraries, so we should replace them before build-failures start occurring in distros.

Build tested on Ubuntu Utopic (amd64).

== Remaining issues (2014-08-22) ==
Migrate to GtkStyleContext:
* svg-view-widget.cpp
* widgets/button.cpp
* widgets/eek-preview.cpp
* widgets/font-selector.cpp
* widgets/shrink-wrap-button.cpp
* widgets/sp-color-slider.cpp
* widgets/text-toolbar.cpp
* ui/tools/tool-base.cpp
* ui/widget/gimpcolorwheel.c

GtkAction/GtkToggleAction is deprecated:
* ege-adjustment-action.cpp
* ege-output-action.cpp
* ege-select-one-action.cpp
* ink-action.cpp
* ink-comboboxentry-action.cpp
* widgets/arc-toolbar.cpp
* widgets/box3d-toolbar.cpp
* widgets/calligraphy-toolbar.cpp
* widgets/connector-toolbar.cpp
* widgets/desktop-widget.cpp
* widgets/dropper-toolbar.cpp
* widgets/eraser-toolbar.cpp
* widgets/gradient-toolbar.cpp
* widgets/lpe-toolbar.cpp
* widgets/measure-toolbar.cpp
* widgets/mesh-toolbar.cpp
* widgets/node-toolbar.cpp
* widgets/paintbucket-toolbar.cpp
* widgets/pencil-toolbar.cpp
* widgets/rect-toolbar.cpp
* widgets/select-toolbar.cpp
* widgets/spray-toolbar.cpp
* widgets/spiral-toolbar.cpp
* widgets/star-toolbar.cpp
* widgets/text-toolbar.cpp
* widgets/toolbox.cpp
* widgets/tweak-toolbar.cpp
* ui/widget/unit-tracker.cpp

gtk_image_menu_item_set_image:
* ink-action.cpp
* interface.cpp

gtk_icon_source_new:
* widgets/icon.cpp

description: updated
Revision history for this message
su_v (suv-lp) wrote :

> Use new pango font API:
> * libnrtype/FontFactory.cpp
> * libnrtype/FontInstance.cpp

also tracked in
Bug #166276 (sf1115872) “pango_ft2_font_get_face is deprecated”

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

Device pointer issues fixed in lp:inkscape r11511

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

Orientable widgets fixed in lp:inkscape r11512

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

Some widgets were migrated to GtkStyleContext in lp:inkscape r11513

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

Size-request issues fixed in lp:inkscape r11564

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

OCAL dialog transition to Gtk::StyleContext in lp:inkscape r11595

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

Rebuilt today with "-Werror=deprecated-declarations" and the list of failures has grown a bit! I'll update the list in the bug description.

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

desktop-widget migrated to GtkGrid in lp:inkscape r11814

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

toolbox migrated to GtkGrid in lp:inkscape r11815

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

This only affects an experimental feature (GTK3 builds) so I'm dropping the 0.49 milestone.

Changed in inkscape:
milestone: 0.49 → none
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

GdkColor -> GdkRGBA in r11910

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

Inkview migrated from GtkTable to GtkButtonBox in lp:inkscape r11918

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

Dropped unused sp-color-gtkselector code in lp:inkscape r11919

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

Migrated sp-color-wheel-selector to GtkGrid in lp:inkscape r11920

description: updated
Revision history for this message
su_v (suv-lp) wrote :

On OS X 10.7.4 (llvm-gcc-4.2, FSF GCC 4.6.2, GTK+/X11 2.24.13, gtkmm 2.24.2, Glib 2.32.4, glibmm 2.32.1), revision 11920 triggers build failure for regular GTK2 builds:

../../src/widgets/sp-color-wheel-selector.cpp: In member function ‘virtual void ColorWheelSelector::init()’:
../../src/widgets/sp-color-wheel-selector.cpp:177: error: invalid conversion from ‘int’ to ‘GtkAttachOptions’
../../src/widgets/sp-color-wheel-selector.cpp:177: error: initializing argument 7 of ‘void gtk_table_attach(GtkTable*, GtkWidget*, guint, guint, guint, guint, GtkAttachOptions, GtkAttachOptions, guint, guint)’
../../src/widgets/sp-color-wheel-selector.cpp:177: error: invalid conversion from ‘int’ to ‘GtkAttachOptions’
../../src/widgets/sp-color-wheel-selector.cpp:177: error: initializing argument 8 of ‘void gtk_table_attach(GtkTable*, GtkWidget*, guint, guint, guint, guint, GtkAttachOptions, GtkAttachOptions, guint, guint)’
../../src/widgets/sp-color-wheel-selector.cpp:217: error: invalid conversion from ‘int’ to ‘GtkAttachOptions’
../../src/widgets/sp-color-wheel-selector.cpp:217: error: initializing argument 7 of ‘void gtk_table_attach(GtkTable*, GtkWidget*, guint, guint, guint, guint, GtkAttachOptions, GtkAttachOptions, guint, guint)’
../../src/widgets/sp-color-wheel-selector.cpp:240: error: invalid conversion from ‘int’ to ‘GtkAttachOptions’
../../src/widgets/sp-color-wheel-selector.cpp:240: error: initializing argument 7 of ‘void gtk_table_attach(GtkTable*, GtkWidget*, guint, guint, guint, guint, GtkAttachOptions, GtkAttachOptions, guint, guint)’
../../src/widgets/sp-color-wheel-selector.cpp:240: error: invalid conversion from ‘int’ to ‘GtkAttachOptions’
../../src/widgets/sp-color-wheel-selector.cpp:240: error: initializing argument 8 of ‘void gtk_table_attach(GtkTable*, GtkWidget*, guint, guint, guint, guint, GtkAttachOptions, GtkAttachOptions, guint, guint)’

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

Oops... hopefully fixed in r11921

Revision history for this message
houz (houz) wrote :

When I look at the documentation of gtk_table_attach and GtkAttachOptions it seems to expect a single valid value, not some random integer. Are you sure that the api is used in a correct way?

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

Hi hous,

Each member of GtkAttachOptions acts as a binary flag [1], so the zero value in this case means "switch off all options". Hope that makes sense!

[1] http://developer.gnome.org/gtk/2.24/gtk-Standard-Enumerations.html#GtkAttachOptions

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

sp-color-scales migrated to GtkGrid in lp:inkscape r11922

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

Remaining color widgets migrated to GtkGrid in lp:inkscape r11923

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

Remaining stuff migrated to GtkGrid in lp:inkscape r11939

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

GtkHSV widget replaced by GimpColorWheel in lp:inkscape r12011.

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

Pango issues fixed in lp:inkscape r12020

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

GtkHandleBox usage dropped in lp:inkscape r12027

description: updated
Revision history for this message
Alex Valavanis (valavanisalex) wrote :
description: updated
jazzynico (jazzynico)
tags: added: code-design
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

GdkThreads issue (bug #1099832) was hopefully fixed in lp:inkscape r12690

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

Wow... things got a *lot* worse since I last checked!

Attaching a build log using Ubuntu Utopic 64-bit

gtk+ 3.12.2
gtkmm 3.12.0
glibmm 2.40.0
glib 2.41.3
cairo 1.13.0
gdl 3.12.0

I'll update the summary accordingly :/

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

lp:inkscape/experimental r13492:
  "font-selector: Clean up GObject boilerplate & fix deprecation"

lp:inkscape/experimental r13493:
  "gradient-selector: Clean up GObject boilerplate & fix deprecation"

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

lp:inkscape/experimental r13494:
  "gradient-vector: Clean up GObject boilerplate & fix deprecation"

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

lp:inkscape/experimental r13500:
  "paint-selector: Clean up GObject boilerplate & fix deprecation"

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

lp:inkscape/experimental r13501:
  "sp-color-selector: Clean up GObject boilerplate & fix deprecation"

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

lp:inkscape/experimental r13502:
  "Fix gdk_display_get_n_screens deprecation"

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Technically speaking this will forever be a problem as long as things keep getting deprecated. As we already have issues for important deprecations to deal with (e.g. GtkAction[1]) and this bug tracker is being moved to GitLab, closing this bug here.

[1]: https://gitlab.com/inkscape/inkscape/issues/3

Closed by: https://gitlab.com/Qantas94Heavy

Changed in inkscape:
status: Triaged → Invalid
tags: added: bug-migration
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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