Build error on in GTK3-configure switch

Bug #1193841 reported by Stefan Husmann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned

Bug Description

On Arch Linux using the configure switch for gtk3 causes:

ui/dialog/input.cpp:1917:16: warning: enumeration value
'GDK_SOURCE_TOUCHSCREEN' not handled in switch [-Wswitch]
ui/dialog/input.cpp:1917:16: warning: enumeration value
'GDK_SOURCE_TOUCHPAD' not handled in switch [-Wswitch] CXX
ui/dialog/layer-properties.o CXX ui/dialog/layers.o CXX
ui/dialog/livepatheffect-add.o CXX
ui/dialog/livepatheffect-editor.o CXX ui/dialog/memory.o
  CXX ui/dialog/messages.o
  CXX ui/dialog/ocaldialogs.o
  CXX ui/dialog/object-attributes.o
  CXX ui/dialog/object-properties.o
  CXX ui/dialog/print.o
  CXX ui/dialog/print-colors-preview-dialog.o
  CXX ui/dialog/scriptdialog.o
  CXX ui/dialog/spellcheck.o
  CXX ui/dialog/svg-fonts-dialog.o
  CXX ui/dialog/swatches.o
  CXX ui/dialog/symbols.o
In file included from ui/dialog/symbols.cpp:49:0:
ui/dialog/symbols.h:105:5: error: 'ToggleButton' in namespace 'Gtk'
does not name a type Gtk::ToggleButton* fitSymbol;
     ^
ui/dialog/symbols.cpp: In constructor
'Inkscape::UI::Dialog::SymbolsDialog::SymbolsDialog(const gchar*)':
ui/dialog/symbols.cpp:240:3: error: 'fitSymbol' was not declared in
this scope fitSymbol = Gtk::manage(new Gtk::ToggleButton()); ^
ui/dialog/symbols.cpp:240:31: error: expected type-specifier
   fitSymbol = Gtk::manage(new Gtk::ToggleButton());
                               ^
ui/dialog/symbols.cpp: In member function 'Glib::RefPtr<Gdk::Pixbuf>
Inkscape::UI::Dialog::SymbolsDialog::create_symbol_image(const gchar*,
SPObject*)': ui/dialog/symbols.cpp:776:9: error: 'fitSymbol' was not
declared in this scope if( fitSymbol->get_active() ) { ^
make[3]: *** [ui/dialog/symbols.o] Error 1
make[3]: Leaving directory
`/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[2]: *** [all] Error 2 make[2]: Leaving directory
`/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
`/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape'
make: *** [all] Error 2 ==> ERROR: A failure occurred in build().
    Aborting...

Tags: build gtk3
Revision history for this message
su_v (suv-lp) wrote :

Confirmed on OS X with GTK3 (3.4, 3.6), IIRC regression introduced in r12363
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12363>

tags: added: gtk3
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
tags: added: build
Revision history for this message
jazzynico (jazzynico) wrote :

Also fails on Debian Wheezy, trunk revision 12387.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
su_v (suv-lp) wrote :

@Martin - any chance you could take a look at the recent changes for the symbols dialog, and fix the GTK3 build?

GTK3 build proceeds [*] for me on OS X 10.7.5 with attached patch - please review (I don't actually know a lot about C++, GTK+ in general).

--
[*] to fail - depending on glib and gdl version - later on, see <https://bugs.launchpad.net/inkscape/+bug/1179338/comments/13> (no separate report filed yet).

Revision history for this message
Martin Owens (doctormo) wrote : Re: [Bug 1193841] Re: Build error on in GTK3-configure switch

~suv: I'm committing your change, it's sensible minus the duplicate
check for Gtk3. See r12390.

Could you tell me how to enable Gtk3 building, I'd like to be able to
check for these problems myself.

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

Note: To build with (experiemental) GTK+ 3, you need to have upstream gdl installed - not sure what other additional dev packages one needs to add on Ubuntu (or any Linux distro in general):
<http://article.gmane.org/gmane.comp.graphics.inkscape.devel/38477/>
<http://article.gmane.org/gmane.comp.graphics.inkscape.devel/38702>

Revision history for this message
Martin Owens (doctormo) wrote :

libgdl in Ubuntu 13.04 is 3.6.0, so libgtl-3-dev needs to be installed. No upstream required (so far)

Thanks for the links.

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

Sorry about the lack of input recently... I've been stupidly busy!

One minor point about the patch. I think it should be fine to include <gtkmm/togglebutton.h> unconditionally. The header's still available in Gtkmm 2 and it's best to minimise the delta between Gtkmm 2 and 3 builds wherever possible.

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

Also, at some point I intend to add a Gtk+ 3 build to the PPA so that we have an automated warning system for build failures.

Martin Owens (doctormo)
Changed in inkscape:
status: Triaged → Fix Committed
Revision history for this message
Stefan Husmann (stefan-husmann) wrote :
Download full text (3.2 KiB)

gdl in Arch Linux is 3.8.1. Is this too recent?

In file included from /usr/include/glib-2.0/gobject/gobject.h:26:0,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from /usr/include/glibmm-2.4/glibmm/value.h:25,
                 from /usr/include/glibmm-2.4/glibmm/propertyproxy_base.h:25,
                 from /usr/include/glibmm-2.4/glibmm/propertyproxy.h:25,
                 from /usr/include/glibmm-2.4/glibmm/objectbase.h:24,
                 from /usr/include/glibmm-2.4/glibmm/object.h:29,
                 from /usr/include/pangomm-1.4/pangomm/context.h:32,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:32,
                 from /usr/include/gtkmm-3.0/gtkmm/container.h:29,
                 from /usr/include/gtkmm-3.0/gtkmm/box.h:28,
                 from ui/widget/dock.h:23,
                 from ui/widget/dock.cpp:13:
ui/widget/dock.cpp: In constructor 'Inkscape::UI::Widget::Dock::Dock(Gtk::Orientation)':
ui/widget/dock.cpp:52:72: error: cannot convert 'GdlDock* {aka _GdlDock*}' to 'GObject* {aka _GObject*}' for argument '1' to 'GtkWidget* gdl_dock_bar_new(GObject*)'
       _gdl_dock_bar (GDL_DOCK_BAR (gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))),
                                                                        ^
/usr/include/glib-2.0/gobject/gtype.h:1735:57: note: in definition of macro '_G_TYPE_CIC'
     ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
                                                         ^
/usr/include/libgdl-3.0/gdl/gdl-dock-bar.h:34:39: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
 #define GDL_DOCK_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_BAR, GdlDockBar))
                                       ^
ui/widget/dock.cpp:52:22: note: in expansion of macro 'GDL_DOCK_BAR'
       _gdl_dock_bar (GDL_DOCK_BAR (gdl_dock_bar_new(GDL_DOCK(_gdl_dock)))),
                      ^
ui/widget/dock.cpp:55:5: warning: 'void gdl_dock_bar_set_orientation(GdlDockBar*, GtkOrientation)' is deprecated (declared at /usr/include/libgdl-3.0/gdl/gdl-dock-bar.h:86): Use gtk_orientable_set_orientation instead [-Wdeprecated-declarations]
     gdl_dock_bar_set_orientation(_gdl_dock_bar, static_cast<GtkOrientation>(orientation));
     ^
ui/widget/dock.cpp:55:89: warning: 'void gdl_dock_bar_set_orientation(GdlDockBar*, GtkOrientation)' is deprecated (declared at /usr/include/libgdl-3.0/gdl/gdl-dock-bar.h:86): Use gtk_orientable_set_orientation instead [-Wdeprecated-declarations]
     gdl_dock_bar_set_orientation(_gdl_dock_bar, static_cast<GtkOrientation>(orientation));
                                                                                         ^
make[3]: *** [ui/widget/dock.o] Error 1
make[3]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape'
make: *** [all] E...

Read more...

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

> gdl in Arch Linux is 3.8.1. Is this too recent?

No - see footnote in comment #3: this is a separate issue which started with the changes to fix bug #1179338.

Would you mind filing a new report for this?

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

<off-topic>
> this is a separate issue which started with the changes to fix bug #1179338.

The changes in r12355 broke GTK3 builds in 'src/ui/widget' with GDL 3.6.2/glib 2.34.3 and GDL 3.8.1/glib 2.36.3.
</off-topic

Revision history for this message
Stefan Husmann (stefan-husmann) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Commit (revno) unkown - assuming fix is included in 0.91 (based on the date the report status was last changed).

Changed in inkscape:
milestone: none → 0.91
status: Fix Committed → Fix Released
Revision history for this message
David Mathog (mathog) wrote :

This bug reappeared on my Ubuntu 14.04 system with revno 15222. The problem is that the patch uses:

#if WITH_GDL_3_6

but libgdl is 3.8 and is subject to the same issue. I was able to get it to compile by adding
an explicit

  -DWITH_GDL_3_6

to the (very long) compile command.

Earlier revisions compiled on this box, but they all used the automake/configure mechanism, which presumably was adding this flag. The new cmake version is not, at least on my system.

Revision history for this message
David Mathog (mathog) wrote :

This is still broken at revno 15387.

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.