After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697835 - gtkmm-2.24.3 breaks builds because it requires different header includes.
gtkmm-2.24.3 breaks builds because it requires different header includes.
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: gdkmm
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
: 700699 701321 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-11 20:26 UTC by Pacho Ramos
Modified: 2013-06-28 09:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.74 KB, patch)
2013-04-12 16:38 UTC, Hubert Figuiere (:hub)
none Details | Review
work around some problem with gmmproc (1.06 KB, patch)
2013-04-12 20:03 UTC, Edward Sheldrake
rejected Details | Review
more header fixes (1.60 KB, patch)
2013-04-13 07:59 UTC, Edward Sheldrake
none Details | Review
Proposed patch (3.01 KB, patch)
2013-04-23 23:59 UTC, Hubert Figuiere (:hub)
none Details | Review
don't ifdef a signal (1020 bytes, patch)
2013-04-24 13:13 UTC, Edward Sheldrake
none Details | Review
Additional glibmm includes (935 bytes, patch)
2013-04-26 19:16 UTC, David Evans
none Details | Review
headertest.sh (508 bytes, text/plain)
2013-05-03 17:55 UTC, Kjell Ahlstedt
  Details
patch: Add missing includes. (9.46 KB, patch)
2013-05-03 17:57 UTC, Kjell Ahlstedt
none Details | Review
patch: Add missing includes. (6.72 KB, patch)
2013-05-04 07:32 UTC, Kjell Ahlstedt
none Details | Review

Description Pacho Ramos 2013-04-11 20:26:56 UTC
We get errors like:
/usr/include/gdkmm-2.4/gdkmm/dragcontext.h:321:3: error: 'ListHandle_AtomString' in namespace 'Gdk' does not name a type
In file included from document.cc:27:0:

When building multiple reverse deps like inkscape, subtitleeditor...:
https://bugs.gentoo.org/show_bug.cgi?id=464994
https://bugs.gentoo.org/show_bug.cgi?id=465156
https://bugs.gentoo.org/show_bug.cgi?id=465318
Comment 1 Murray Cumming 2013-04-12 05:04:46 UTC
This change in the generated code, from here:
https://bugs.gentoo.org/show_bug.cgi?id=464994

+++ /usr/include/gdkmm-2.4/gdkmm/color.h
@@ -8,3 +8,4 @@
 
-#include <glibmm.h>
+#include <glibmm/ustring.h>
+#include <sigc++/sigc++.h>

is due to the use of a newer gmmmproc (from newer glibmm). That is indeed unfortunate in a bug-fix release, and could be fixed by releasing a gtkmm 2.4 that was built with an older glibmm.

I have no idea if that's what causes the error mentioned here.
Comment 2 Hubert Figuiere (:hub) 2013-04-12 13:31:14 UTC
I did the release.
Comment 3 Hubert Figuiere (:hub) 2013-04-12 14:11:01 UTC
The error in Comment 0 looks like the build errors I was having with gtkmm 2.24 before the 2.24.3 release. 

This is the commit in question:

https://git.gnome.org/browse/gtkmm/commit/?h=gtkmm-2-24&id=42ca7d27e8dd3105d612f8330072416ec889447f
Comment 4 Hubert Figuiere (:hub) 2013-04-12 16:38:47 UTC
Created attachment 241370 [details] [review]
Proposed patch

Can you try this patch to 2.24.3 on you gentoo?
Comment 5 Edward Sheldrake 2013-04-12 20:01:32 UTC
(In reply to comment #4)
> Created an attachment (id=241370) [details] [review]
> Proposed patch
> 
> Can you try this patch to 2.24.3 on you gentoo?

(Not on gentoo) I had to use --enable-maintainer-mode to get the files re-generated.
Then I had to create a patch to fix some problem with gtk/widget.h (a deprecated signal causing problems I think due to the #ifndef ending up in the middle of the gtk-doc comment block).
Then I had to work around the docs failing to build in maintainer mode:
$ cp -r docs/reference/html __html_saved
$ make || cp -nv __html_saved/* docs/reference/html/ && make

After all that, the patch isn't sufficient to fix all the header problems. The first errors when attempting to build inkscape are:

In file included from color-profile.cpp:9:0:
/usr/include/gdkmm-2.4/gdkmm/color.h:61:10: error: 'GType' does not name a type
In file included from color-profile.cpp:9:0:
/usr/include/gdkmm-2.4/gdkmm/color.h:188:29: error: 'RefPtr' in namespace 'Glib' does not name a type
/usr/include/gdkmm-2.4/gdkmm/color.h:188:35: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
/usr/include/gdkmm-2.4/gdkmm/color.h:188:41: error: expected ',' or '...' before '<' token
/usr/include/gdkmm-2.4/gdkmm/color.h:241:9: error: 'ArrayHandle' in namespace 'Glib' does not name a type
/usr/include/gdkmm-2.4/gdkmm/color.h:294:7: error: 'Value' is not a template
/usr/include/gdkmm-2.4/gdkmm/color.h:294:51: error: expected template-name before '<' token
/usr/include/gdkmm-2.4/gdkmm/color.h:294:51: error: expected '{' before '<' token
/usr/include/gdkmm-2.4/gdkmm/color.h:294:51: error: expected unqualified-id before '<' token
In file included from /usr/include/glibmm-2.4/glibmm/value.h:196:0,
                 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/wrap.h:26,
                 from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:26,
                 from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:23,
                 from /usr/include/glibmm-2.4/glibmm/spawn.h:26,
                 from ./io/sys.h:19,
                 from color-profile.cpp:18:
/usr/include/glibmm-2.4/glibmm/value_custom.h:109:7: error: 'Glib::Value' is not a template type
/usr/include/glibmm-2.4/glibmm/value_custom.h:135:7: error: 'Value' is not a template
Comment 6 Edward Sheldrake 2013-04-12 20:03:05 UTC
Created attachment 241394 [details] [review]
work around some problem with gmmproc

Work around for compilation error:
In file included from ../gtkmm/container.h:30:0,
                 from ../gtkmm/box.h:59,
                 from ../gtkmm/dialog.h:31,
                 from ../gtkmm/aboutdialog.h:31,
                 from aboutdialog.cc:8:
../gtkmm/widget.h:4222:2: error: #endif without #if
make[2]: *** [aboutdialog.lo] Error 1
make[2]: Leaving directory `/home/ejs/rpmbuild/BUILD/gtkmm-2.24.3/gtk/gtkmm'
Comment 7 Edward Sheldrake 2013-04-13 07:59:15 UTC
Created attachment 241437 [details] [review]
more header fixes

More header fixes, enough to be able to compile inkscape 0.48.4 (when combined with both previous patches).
Comment 8 Hubert Figuiere (:hub) 2013-04-15 08:11:07 UTC
Ok, I'll look at these. Thanks !
Comment 9 Francisco J. Vazquez 2013-04-15 10:09:38 UTC
Tried in gentoo, now emerge gtkmm-2.24.3 fails (due to the first "Proposed patch") with:

In file included from ../gdkmm/region.h:67:0,
                 from ../gdkmm/screen.h:33,
                 from ../gdkmm/visual.h:32,
                 from ../gdkmm/colormap.h:38,
                 from ../gdkmm/rgb.h:23,
                 from rgb.cc:21:
../gdkmm/types.h:358:9: error: 'ListHandle' in namespace 'Glib' does not name a type
 typedef Glib::ListHandle<std::string,AtomStringTraits> ListHandle_AtomString;
         ^
In file included from ../gdkmm/visual.h:32:0,
                 from ../gdkmm/colormap.h:38,
                 from ../gdkmm/rgb.h:23,
                 from rgb.cc:21:
../gdkmm/screen.h:379:3: error: 'ListHandle' in namespace 'Glib' does not name a type
   Glib::ListHandle< Glib::RefPtr<Visual> > list_visuals();
   ^
../gdkmm/screen.h:388:3: error: 'ListHandle' in namespace 'Glib' does not name a type
   Glib::ListHandle< Glib::RefPtr<Window> > get_toplevel_windows();
   ^
../gdkmm/screen.h:616:3: error: 'ListHandle' in namespace 'Glib' does not name a type
   Glib::ListHandle< Glib::RefPtr<Window> > get_window_stack();
   ^
make[2]: *** [rgb.lo] Error 1


Removing the first patch gtkmm compiles fine, but inkscape fails.
Comment 10 Kjell Ahlstedt 2013-04-15 13:01:15 UTC
There are some messages on gtkmm-list concerning gtkmm 2.24.3:

https://mail.gnome.org/archives/gtkmm-list/2013-April/msg00006.html
https://mail.gnome.org/archives/gtkmm-list/2013-April/msg00007.html
https://mail.gnome.org/archives/gtkmm-list/2013-April/msg00008.html

The first of these messages contains a patch which I think is not mentioned in
this bug. (Add #include <glibmm/error.h> in gdk/gdkmm/pixbuf.h, although it
should be added to gdk/src/pixbuf.hg.) That patch is or is not necessary,
depending on which version of glibmm you use. It's necessary with glibmm
2.32.0, but it's not necessary with the version of glibmm I pulled from the git
repository on April 7.
Comment 11 Dominique Leuenberger 2013-04-19 19:48:08 UTC
I can confirm that for openSUSE, the collection of patches above fixes 'our' build of for example inkscape as well.
Comment 12 Hubert Figuiere (:hub) 2013-04-21 09:52:28 UTC
Great. I'll cook a final one for you to test, and then see about doing a 2.24.4 release.

Thanks for the help.
Comment 13 Hubert Figuiere (:hub) 2013-04-23 23:36:45 UTC
Review of attachment 241394 [details] [review]:

::: gtkmm-2.24.3.orig/gtk/src/widget.hg
@@ +993,3 @@
    */
+  _WRAP_SIGNAL(Glib::RefPtr<Atk::Object> get_accessible(), "get_accessible", ifdef GTKMM_ATKMM_ENABLED, refreturn)
+#endif // GTKMM_DISABLE_DEPRECATED

It was just said in the comment that putting a virtual function in ifdef isn't a good idea. And I agree.
Comment 14 Hubert Figuiere (:hub) 2013-04-23 23:59:34 UTC
Created attachment 242296 [details] [review]
Proposed patch

Combined the first and third patch.

Can someone confirm it all work with it?
Comment 15 Hubert Figuiere (:hub) 2013-04-24 00:01:18 UTC
Comment on attachment 241394 [details] [review]
work around some problem with gmmproc

Marking as rejected. See comment 13.
Comment 16 Edward Sheldrake 2013-04-24 13:13:37 UTC
Created attachment 242322 [details] [review]
don't ifdef a signal

The current tarball release does have that signal within #ifndef, the trouble is the current gmmproc puts the #ifndef within the doc comment block, like this:

  //Note that the deprecated keyword has no effect on _WRAP_SIGNAL() yet.
  //It doesn't seem like a good idea to put virtual functions in #ifdefs, because that would change the size of the class instances.
  /** @deprecated This should never have been in the API. It was never meaningful.
   *
#ifndef GTKMM_DISABLE_DEPRECATED

* @par Slot Prototype:
   * <tt>Glib::RefPtr<Atk::Object> on_my_%get_accessible()</tt>
   *
   */

  Glib::SignalProxy0< Glib::RefPtr<Atk::Object> > signal_get_accessible();
#endif // GTKMM_DISABLE_DEPRECATED
Comment 17 Hubert Figuiere (:hub) 2013-04-25 01:13:32 UTC
This make more sense IMHO.
Comment 18 David Evans 2013-04-26 19:11:37 UTC
Using the attached patch in addition to the proposed above (comment 14) allows the current inkscape release version (0.48.4) as well as the current development
version (bzr rev 12304) to build correctly on MacPorts, OS X 10.8.3.

Note that this is using glibmm 2.34.1.  Building with glibmm 2.36.0 has problems
due to breakage in gmmproc as reported in bz 698989.

It's possible that there are other missing glibmm includes that are not exposed
by this testing.  Continuing to test with other MacPorts ports that depend
on gtkmm.

Probably should be a thorough review of gtkmm to look for Glib::* usages
without the corresponding includes before a new release is issued.
Comment 19 David Evans 2013-04-26 19:16:52 UTC
Created attachment 242614 [details] [review]
Additional glibmm includes
Comment 20 Kjell Ahlstedt 2013-05-03 17:55:27 UTC
Created attachment 243235 [details]
headertest.sh

The shell script headertest.sh compiles all header files, one at a time.
The compiler generates error messages if a header file does not include all
other header files that it depends on.
Comment 21 Kjell Ahlstedt 2013-05-03 17:57:04 UTC
Created attachment 243236 [details] [review]
patch: Add missing includes.

This patch adds missing includes (mainly glibmm header files).
It makes it possible to build and check gtkmm, and execute headertest.sh
with no errors.

Even with this patch there is no guarantee that all application programs that
can be built with gtkmm 2.24.2 can be built. It's possible that an application
program depends on some glibmm header file that it does not explicitly include,
and that gtkmm does not depend on and does not include.

I have used glibmm 2.32.0. It does not handle a deprecated signal the way it's
described in comment 16. The generated code is

  //Note that the deprecated keyword has no effect on _WRAP_SIGNAL() yet.
  //It doesn't seem like a good idea to put virtual functions in #ifdefs, because that would change the size of the class instances.
  /** @deprecated This should never have been in the API. It was never meaningful.
   *
* @par Slot Prototype:
   * <tt>Glib::RefPtr<Atk::Object> on_my_%get_accessible()</tt>
   *
   */

#ifndef GTKMM_DISABLE_DEPRECATED

  Glib::SignalProxy0< Glib::RefPtr<Atk::Object> > signal_get_accessible();
#endif // GTKMM_DISABLE_DEPRECATED
Comment 22 Kjell Ahlstedt 2013-05-04 07:32:48 UTC
Created attachment 243277 [details] [review]
patch: Add missing includes.

Here's a smaller patch. I had copied more than necessary from gtkmm 3.0.
It was a mistake to add #include <gtk/gtk.h> in gtk/src/enums.hg. It's not
necessary, and it can be a problem when application programs are built.
Comment 23 Kjell Ahlstedt 2013-05-14 18:05:39 UTC
Bug 700069 also concerns missing include files. If there will ever be another
2.24.x release of gtkmm, both these bugs should be fixed in it, IMO.
Comment 24 Kjell Ahlstedt 2013-05-15 09:16:28 UTC
Disclaimer! Bug 700069 shall not be fixed in 2.24.x. See bug 700069 comment 3
and 4.
Comment 25 Murray Cumming 2013-05-17 10:28:28 UTC
See also bug #700495 about a runtime problem with this release.
Comment 26 Kjell Ahlstedt 2013-05-18 10:17:35 UTC
I have pushed a rewritten version of headertest.sh (comment 20) to
glibmm/tools/test_scripts/testheaders.sh
https://git.gnome.org/browse/glibmm/commit/?id=8cb94c761cfed43204d814d9494ed9ad98694193
Comment 27 Murray Cumming 2013-05-20 10:23:28 UTC
*** Bug 700699 has been marked as a duplicate of this bug. ***
Comment 28 Murray Cumming 2013-06-06 10:38:14 UTC
*** Bug 701321 has been marked as a duplicate of this bug. ***
Comment 29 Kalev Lember 2013-06-25 12:58:18 UTC
What's the plan here, to roll a new gtkmm 2.24.4 release with older gmmmproc? I could volunteer to help do that.
Comment 30 Murray Cumming 2013-06-25 14:33:46 UTC
Kalev, yes, please, that would be very helpful. Maybe we could test a tarball before we release it officially.
Comment 31 Kalev Lember 2013-06-25 21:06:37 UTC
https://people.gnome.org/~klember/gtkmm-2.24.4.tar.bz2 , much appreciated if someone could give it a quick try.
Comment 32 Kalev Lember 2013-06-27 16:30:57 UTC
Seems fine in my own testing, mind if I go ahead and release this? We'll surely get feedback then when distros pick it up.

The diff to 2.24.2 looks good, only minimal changes in the generated code files. And inkskape builds fine with this release, again.

I have a virtual machine set up with older glibmm, so if there's ever a need to roll another tarball in the future, I can easily do that.
Comment 33 Hubert Figuiere (:hub) 2013-06-27 16:34:07 UTC
Thanks for dealing with this.
Comment 34 Murray Cumming 2013-06-28 08:41:37 UTC
Kalev, yes, please. If you have git commit rights, and gnome release access, please go ahead.

Please don't forget to commit the ChangeLog and NEWS changes (that's all, right?) and tag the release.
Comment 35 Kalev Lember 2013-06-28 09:01:25 UTC
All done, 2,24.4 is out: https://mail.gnome.org/archives/ftp-release-list/2013-June/msg00112.html