0.92.x: autotools-based builds fail on legacy system (GTK3 rev >= 15020, GTK2 rev >= 15249)

Bug #1606018 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Won't Fix
Low
Unassigned

Bug Description

The changes in rev 15020 broke compiling experimental GTK3 with autotools:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15020

$ make -k -j 1
make all-recursive
Making all in src
make all-am
  CXX live_effects/effect.o
In file included from ../../src/live_effects/effect.cpp:40:
In file included from ../../src/live_effects/lpe-lattice2.h:21:
In file included from /Volumes/magenta/mp-trunk/quartz/include/gtkmm-3.0/gtkmm.h:87:
In file included from /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm.h:89:
/Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread')
  GThread gobject_;
          ^
/Volumes/magenta/mp-trunk/quartz/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread'
typedef struct _GThread GThread;
               ^
1 error generated.
make[3]: *** [live_effects/effect.o] Error 1
  CXX ui/tools/freehand-base.o
In file included from ../../src/ui/tools/freehand-base.cpp:25:
In file included from ../../src/live_effects/lpe-simplify.h:9:
In file included from /Volumes/magenta/mp-trunk/quartz/include/gtkmm-3.0/gtkmm.h:87:
In file included from /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm.h:89:
/Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread')
  GThread gobject_;
          ^
/Volumes/magenta/mp-trunk/quartz/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread'
typedef struct _GThread GThread;
               ^
1 error generated.
make[3]: *** [ui/tools/freehand-base.o] Error 1
make[3]: Target `all-am' not remade because of errors.
make[2]: *** [all] Error 2

Reproduced with Inkscape 0.92pre1 rev 15020 on OS X 10.7.5:
- GTK+/X11 3.18.9, glibmm 2.44, gtkmm3 3.16
- GTK+/Quartz 3.20.5, glibmm 2.44, gtkmm3 3.16
Compiler:
$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

AFAICT cmake-based GTK3 builds are not affected, nor GTK2-based builds (autotools, cmake).

Tags: build gtk3
Revision history for this message
Jabiertxof (jabiertxof) wrote :

I go to fix it. First of all I try to compile with cmake. Thanks for report!

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

GTK3 with autotools works by partially reverting r15020 (see attached diff). I haven't investigated though what actually causes the build breakage and whether it could be worked around by changing default (autotools) configure options e.g. wrt strict build.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

With CMAKE compile ok

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

Updated diff for r15023, locally tested successfully with GTK2, GTK3 and autotools-based build.

Revision history for this message
jazzynico (jazzynico) wrote :

Is the patch ready to be committed in 0.92.x?

Changed in inkscape:
importance: Undecided → Low
milestone: none → 0.92
status: New → In Progress
Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 1606018] Re: GTK3 build with autotools broken (rev >= 15020)

On 2016-11-01 18:02 (+0200), jazzynico wrote:
> Is the patch ready to be committed in 0.92.x?

I have not tested the patch with autotools-based GTK3 builds of
lp:inkscape/0.92.x myself; AFAICT the provided diff was not reviewed
code-wise either.

Revision history for this message
jazzynico (jazzynico) wrote : Re: GTK3 build with autotools broken (rev >= 15020)

On Xubuntu 16.04, lp:inkscape/0.92.x compiles correctly without the patch (tested with gtk2, gtk3, cmake and autotools). So it's difficult to confirm that the patch is correct or not here.

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

As expected, unpatched lp:inkscape/0.92.x (rev 15040) fails to compile (experimental) GTK3 the same way as originally reported for trunk unless strict build options are entirely disabled ('--disable-strict-build').

Since the reported build failure is encountered on a legacy (and proprietary) platform with an antiquated system compiler (Mac OS X 10.7.5), limited to the branch's legacy build system (autotools) and GTK3 (rightly considered an "experimental" option for this branch), and can alternatively be worked around by entirely disable all strict build options, I propose to close this report as 'Won't Fix' (I cannot do this myself, since this particular bug status is not available for regular lp users).

In case the same issue is encountered on regular/supported linux distros which want to provide users with an experimental (thus unstable) GTK3 build of the stable release branch or tar ball of 0.92 , they can file separate reports as needed.

Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 1606018] Re: GTK3 build with autotools broken (rev >= 15020)

On 2016-11-02 13:27 (+0200), su_v wrote:
> unpatched lp:inkscape/0.92.x (rev 15040)

Sorry, typo in revno:
unpatched lp:inkscape/0.92.x (rev 15140)

jazzynico (jazzynico)
Changed in inkscape:
status: In Progress → Won't Fix
Revision history for this message
su_v (suv-lp) wrote : Re: GTK3 build with autotools broken (rev >= 15020)

JFTR - with lp:inkscape/0.92.x rev >= 15249, autotools-based GTK2 builds now fail too, unless configured with '--disable-strict-build':

  CXX live_effects/lpe-copy_rotate.o
In file included from ../../src/live_effects/lpe-copy_rotate.cpp:17:
In file included from ../../src/live_effects/lpe-copy_rotate.h:16:
In file included from /Volumes/magenta/mp-trunk/quartz/include/gtkmm-2.4/gtkmm.h:87:
In file included from /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm.h:89:
/Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread')
  GThread gobject_;
          ^
/Volumes/magenta/mp-trunk/quartz/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread'
typedef struct _GThread GThread;
               ^
1 error generated.
make[3]: *** [live_effects/lpe-copy_rotate.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1

su_v (suv-lp)
summary: - GTK3 build with autotools broken (rev >= 15020)
+ 0.92.x: autotools-based builds on legacy system broken (GTK3 rev >=
+ 15020, GTK2 rev >= 15249)
su_v (suv-lp)
summary: - 0.92.x: autotools-based builds on legacy system broken (GTK3 rev >=
- 15020, GTK2 rev >= 15249)
+ 0.92.x: autotools-based builds fail on legacy system (GTK3 rev >= 15020,
+ GTK2 rev >= 15249)
Revision history for this message
su_v (suv-lp) wrote :

Update based on latest changes in rev 15251 by jabiertxof:

1) A clean GTK2 autotools-based build configured with (default) 'strict build' succeeds on the affected legacy system this report was based on (see bug description).

2) A clean GTK3 autotools-based build configured with (default) 'strict build' now only fails in src/file.cpp:76 - likely as side-effect of the recent changes in:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/0.92.x/revision/15220

  CXX file.o
In file included from ../../src/file.cpp:76:
In file included from /Volumes/magenta/mp-trunk/quartz/include/gtkmm-3.0/gtkmm.h:87:
In file included from /Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm.h:89:
/Volumes/magenta/mp-trunk/quartz/include/glibmm-2.4/glibmm/threads.h:209:11: error: field has incomplete type 'GThread' (aka '_GThread')
  GThread gobject_;
          ^
/Volumes/magenta/mp-trunk/quartz/include/glib-2.0/glib/gthread.h:49:16: note: forward declaration of '_GThread'
typedef struct _GThread GThread;
               ^
1 error generated.
make[3]: *** [file.o] Error 1

Disabling strict build options, or moving the inclusion of <gtkmm.h> in src/file.cpp to the top of the includes, allow the experimental GTK3 build of lp:inkscape/0.92.x r15251 on this legacy system to succeed.

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.