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 673712 - dia-0.97.2 fails to build against glib-2.32 due to glib/gstrfuncs.h and glib/gtestutils.h includes
dia-0.97.2 fails to build against glib-2.32 due to glib/gstrfuncs.h and glib/...
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: install
0.97.x
Other Linux
: Normal normal
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-08 01:09 UTC by Alexandre Rostovtsev
Modified: 2012-05-20 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.52 KB, patch)
2012-04-08 01:13 UTC, Alexandre Rostovtsev
none Details | Review

Description Alexandre Rostovtsev 2012-04-08 01:09:40 UTC
In >=glib-2.31, most glib subheaders cannot be included directly. Attempting to build dia-0.97.2 against glib-2.32 results in the following error:

In file included from shape_typeinfo.c:30:0:
/usr/include/glib-2.0/glib/gstrfuncs.h:28:2: error: #error "Only <glib.h> can be included directly."
make[3]: *** [shape_typeinfo.lo] Error 1
Comment 1 Alexandre Rostovtsev 2012-04-08 01:13:49 UTC
Created attachment 211562 [details] [review]
proposed patch

Patch to replace prohibited glib/gstrfuncs.h and glib/gtestutils.h includes with #include <glib.h>.

Note that the

#if GLIB_CHECK_VERSION(2,16,0)
#include <glib/gtestutils.h>
#endif

check had never made sense because glib.h #includes <glib/gtestutils.h> in all glib versions starting with 2.15.1
Comment 2 Hans Breuer 2012-04-08 11:06:34 UTC
That issue is addressed by bug 665335 for the master version. Given that dia-0-97 does not even require gtk-2-16 I'd said the check still makes (some) sense:

dia-0-97 $ grep gtk configure.in
GTK_MODULES="gtk+-2.0 >= 2.6.0 glib-2.0 >= 2.6.0 libxml-2.0 gdk-pixbuf-2.0 gthread-2.0"
dnl with gtk+ >= 2.8 this is no longer optional
[  --enable-deprecation=[no,glib,pango,gtk,yes] turn on glib/pango/gtk deprecations [default=no]],
      if test "x$enable_deprecation" = "xgtk"; then 
  AM_CHECK_PYMOD(gtk,,,[AC_MSG_RESULT(could not find pygtk module)])

If there ever will be another release from the dia-0-97 branch the issues should be revisited.
Comment 3 Alexandre Rostovtsev 2012-04-08 14:39:48 UTC
(In reply to comment #2)
> the check still makes (some) sense

I am sorry, but I think you misunderstood.

glib.h has #included glib/gtestutils.h from the first moment that glib/gtestutils.h was added (which was in glib-2.15.1, see http://git.gnome.org/browse/glib/commit/?id=6332518cc25ff682bd2e9eacd02f9a5febf6c75e)

test-boundingbox.c and test-objects.c #include <glib.h>, and so automatically get glib/gtestutils.h when building against >=glib-2.16. Therefore,

#if GLIB_CHECK_VERSION(2,16,0)
#include <glib/gtestutils.h>
#endif

in test-boundingbox.c and test-objects.c has never had any useful effect, no matter which glib version dia was being built against.