Build failure (trunk) on Ubuntu Raring and Fedora 18

Bug #1122774 reported by su_v on 2013-02-12
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Alex Valavanis
Arch Linux
New
Undecided
Unassigned

Bug Description

Trunk fails to build since 2013-02-08 (r12109) on Ubuntu Raring (PPA build bot):

  CXX arc-context.o
In file included from /usr/include/glibmm-2.4/glibmm.h:89:0,
                 from ./io/inkscapestream.h:14,
                 from xml/repr.h:24,
                 from arc-context.cpp:36:
/usr/include/glibmm-2.4/glibmm/threads.h:142:11: error: field 'gobject_' has incomplete type
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'GThread* Glib::Threads::Thread::gobj()':
/usr/include/glibmm-2.4/glibmm/threads.h:138:41: error: 'gobject_' was not declared in this scope
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'const GThread* Glib::Threads::Thread::gobj() const':
/usr/include/glibmm-2.4/glibmm/threads.h:139:41: error: 'gobject_' was not declared in this scope
make[4]: *** [arc-context.o] Error 1
make[4]: Leaving directory `/build/buildd/inkscape-trunk-0.48+devel+12118+34~raring1/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/build/buildd/inkscape-trunk-0.48+devel+12118+34~raring1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/inkscape-trunk-0.48+devel+12118+34~raring1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/inkscape-trunk-0.48+devel+12118+34~raring1'

<https://launchpad.net/~inkscape.dev/+archive/trunk/+build/4293238>

The same problem was also reported for Fedora 18 on irc (#inkscape) by jimmac on 2013-02-07:
12:21 * jimmac having trouble building trunk.
12:55 * jimmac is jhbuilding
12:55 jimmac : on f18

(jimmac's fpaste with relevant build log has expired unfortunately, but it was exactly the same the PPA builds now have on Raring)

su_v (suv-lp) on 2013-02-12
description: updated
Kris (kris-degussem) wrote :

I removed src/dom/util/thread.cpp and src/dom/util/thread.h in trunk revision 12109, because there was nowhere an inclusion of thread.h in Inkscape's source tree (or at least I did not find one). So it seems weird to me that there is an error referring to thread related headers (moreover the glibmm file has a different name).
If anyone can shine some light on this issue, that would be great.

Alex Valavanis (valavanisalex) wrote :

I think the error is actually caused by raring upgrading the glib package but not glibmm. We disable deprecated glib symbols so we're causing newly deprecated glib api to be hidden from glibmm. We can workaround by making sure glibmm inclusions happen before glib.h.

Changed in inkscape:
status: New → Triaged
Alex Valavanis (valavanisalex) wrote :

Config now checks Glibmm and Glib versions for this situation

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
status: Triaged → Fix Released
Alex Valavanis (valavanisalex) wrote :
PeterPall (peterpall) wrote :

For me the error has popped up again ;-(

Alex Valavanis (valavanisalex) wrote :

Committed a workaround in lp:inkscape r12243. Fingers crossed!

Xavier Fung (xavier114fch) wrote :

I got r12244 and still got this error. It is from the inkscape-bzr package from ArchLinux AUR.

  CXX common-context.o
In file included from /usr/include/glibmm-2.4/glibmm.h:89:0,
                 from /usr/include/gdkmm-2.4/gdkmm/color.h:9,
                 from color-profile.cpp:7:
/usr/include/glibmm-2.4/glibmm/threads.h:142:11: error: field ‘gobject_’ has incomplete type
/usr/include/glibmm-2.4/glibmm/threads.h: In member function ‘GThread* Glib::Threads::Thread::gobj()’:
/usr/include/glibmm-2.4/glibmm/threads.h:138:41: error: ‘gobject_’ was not declared in this scope
/usr/include/glibmm-2.4/glibmm/threads.h: In member function ‘const GThread* Glib::Threads::Thread::gobj() const’:
/usr/include/glibmm-2.4/glibmm/threads.h:139:41: error: ‘gobject_’ was not declared in this scope
make[3]: *** [color-profile.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/xavier/dev/yaourt-tmp-xavier/aur-inkscape-bzr/src/inkscape-build/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/xavier/dev/yaourt-tmp-xavier/aur-inkscape-bzr/src/inkscape-build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xavier/dev/yaourt-tmp-xavier/aur-inkscape-bzr/src/inkscape-build'
make: *** [all] Error 2

jazzynico (jazzynico) wrote :

Another error, GTK3 build on Debian testing, revision 12244:

----
  CXX event-context.o
In file included from event-context.cpp:21:0:
shortcuts.h:52:38: error: variable or field ‘sp_shortcut_get_file_names’ declared void
shortcuts.h:52:33: error: ‘vector’ is not a member of ‘std’
shortcuts.h:52:58: error: expected primary-expression before ‘>’ token
shortcuts.h:52:61: error: ‘names’ was not declared in this scope
shortcuts.h:52:68: error: ‘vector’ is not a member of ‘std’
shortcuts.h:52:93: error: expected primary-expression before ‘>’ token
shortcuts.h:52:96: error: ‘paths’ was not declared in this scope
----

No error with GTK2.

Alex Valavanis (valavanisalex) wrote :

Should be fixed in r12247!

Xavier Fung (xavier114fch) wrote :

Still getting the same error with r12251. The version of glibmm of my system: extra/glibmm 2.34.1-1

jazzynico (jazzynico) wrote :

Still affected on Windows XP, Inkscape trunk revision 12336 with the gtk3 experimental devlibs (glibmm2-2.36).
Error message (simplified):

=============================
Make error line 303: problem compiling: In file included from src/ui/dialog/filedialogimpl-win32.h:1
8:0, from src/ui/dialog/filedialog.cpp:20:
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:203:11: error: field 'gobject_' has incomplete type
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h: In member function 'GThread* Glib::Threads::Thread::gobj()':
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:199:41: error: 'gobject_' was not declared in this scope
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h: In member function 'const GThread* Glib::Threads::Thread::gobj() const':
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:200:41: error: 'gobject_' was not declared in this scope

    cc : compile of build/obj/ui/dialog/filedialogimpl-win32.o required by source: src/ui/dialog/filedialogimpl-win32.cpp
=============================
Make error line 303: problem compiling: In file included from src/ui/dialog/filedialogimpl-win32.h:18:0, from src/ui/dialog/filedialogimpl-win32.cpp:45:
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:203:11: error: field 'gobject_' has incomplete type
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h: In member function 'GThread* Glib::Threads::Thread::gobj()':
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:199:41: error: 'gobject_' was not declared in this scope
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h: In member function 'const GThread* Glib::Threads::Thread::gobj() const':
c:\devlibs-gtk3\files/include/glibmm-2.4/glibmm/threads.h:200:41: error: 'gobject_' was not declared in this scope

Alex, I've recently fixed some glibmm deprecations in the win32 specific code for the Open/Save dialogs and noticed no problem with the current gtk3 experimental devlibs (glibmm2-2.32). But it fails when I update the devlibs with glibmm2-2.36 and I can't find a way to fix the error. Could you please take a look or give a tip?

Alex Valavanis (valavanisalex) wrote :

Hi Nico,

Sorry I haven't been particularly active of late...

I'm struggling to precisely reproduce this build failure because it's win32 specific. I've attached a patch to ensure that the <glibmm/thread.h> header is included before any <glib.h> in order to allow internal use of deprecated Glib symbols in Glibmm. Please could you test?

jazzynico (jazzynico) wrote :

> Please could you test?

I was a good start. I've just had to move or add some includes in filedialogimpl-win32.cpp and .h.
Patch committed revision 12337.

Many thanks for your help!

su_v (suv-lp) wrote :

AFAIU related newer report (glib 2.36, glibmm 2.36, gtkmm 2.24.3 (patched)):
- Bug #1179338 “0.49.X "desktop.o" build failure (MacPorts, latest gtkmm, glibmm)”
  <https://bugs.launchpad.net/inkscape/+bug/1179338>

John (john-jcoppens) wrote :

In 0.91pre3, the error is still present (though it went from line 7 to line 10):

  CXX color-profile.o
In file included from /usr/include/glibmm-2.4/glibmm.h:89:0,
                 from /usr/include/gdkmm-2.4/gdkmm/color.h:9,
                 from color-profile.cpp:10:
/usr/include/glibmm-2.4/glibmm/threads.h:142:11: error: field 'gobject_' has incomplete type
   GThread gobject_;
           ^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'GThread* Glib::Threads::Thread::gobj()':
/usr/include/glibmm-2.4/glibmm/threads.h:138:41: error: 'gobject_' was not declared in this scope
   GThread* gobj() { return &gobject_; }
                                         ^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'const GThread* Glib::Threads::Thread::gobj() const':
/usr/include/glibmm-2.4/glibmm/threads.h:139:41: error: 'gobject_' was not declared in this scope
   const GThread* gobj() const { return &gobject_; }
                                         ^
In file included from /usr/include/glibmm-2.4/glibmm.h:89:0,
                 from /usr/include/gtkmm-2.4/gtkmm/box.h:7,
                 from ui/widget/panel.h:24,
                 from main.cpp:33:
/usr/include/glibmm-2.4/glibmm/threads.h:142:11: error: field 'gobject_' has incomplete type
   GThread gobject_;
           ^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'GThread* Glib::Threads::Thread::gobj()':
/usr/include/glibmm-2.4/glibmm/threads.h:138:41: error: 'gobject_' was not declared in this scope
   GThread* gobj() { return &gobject_; }
                                         ^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function 'const GThread* Glib::Threads::Thread::gobj() const':
/usr/include/glibmm-2.4/glibmm/threads.h:139:41: error: 'gobject_' was not declared in this scope
   const GThread* gobj() const { return &gobject_; }
                                         ^
color-profile.cpp: At global scope:
color-profile.cpp:196:7: warning: '{anonymous}::rectRegistered' defined but not used [-Wunused-variable]
  bool rectRegistered = SPFactory::instance().registerObject("svg:color-profile", createColorProfile);
       ^

This with glib-2.40.0.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers