Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382783 - app-admin/gam-server does not build with recent dev-libs/glib
Summary: app-admin/gam-server does not build with recent dev-libs/glib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard: tracking upstream
Keywords:
Depends on:
Blocks: 384779
  Show dependency tree
 
Reported: 2011-09-13 07:49 UTC by Maciej Piechotka
Modified: 2011-10-20 22:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch (0001-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch,2.41 KB, patch)
2011-09-13 07:51 UTC, Maciej Piechotka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2011-09-13 07:49:42 UTC
app-admin/gam-server does not build with recent dev-libs/glib as G_CONST_RETURN was removed.
Comment 1 Maciej Piechotka 2011-09-13 07:51:17 UTC
Created attachment 286301 [details, diff]
0001-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch

Patch fixing the problem.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2011-09-23 19:18:55 UTC
Ook... since I have absolutely no clue about this, let's wait for review from upstream.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-23 20:04:52 UTC
(In reply to comment #2)
> Ook... since I have absolutely no clue about this, let's wait for review from
> upstream.

No need to wait, the patch is obviously correct. Simply take a look at /usr/include/glib-2.0/glib/gmacros.h installed by glib-2.29.x:

/* Deprecated -- do not use. */
#ifndef G_DISABLE_DEPRECATED
#ifdef G_DISABLE_CONST_RETURNS
#define G_CONST_RETURN
#else
#define G_CONST_RETURN const
#endif
#endif

In other words, unless G_DISABLE_CONST_RETURNS is defined (and I have never, ever seen it defined), G_CONST_RETURN is precisely "const". Since using a 14-character macro to define a 5-character keyword is obviously silly cruft, glib developers have deprecated it, and will likely remove it in a future version.

So the solution is to either (a) replace all instances of G_CONST_RETURN with const (as in Maciej's patch), or (b) ensure that configure and makefiles do not add G_DISABLE_DEPRECATED to CFLAGS (which will work for now, but will break when a near-future version of glib fully drops the deprecated macro from public headers).

Upstream gnome developers always opt for solution (a). For example, see commits such as the following: http://git.gnome.org/browse/gtk+/commit/?id=bf0d8402f5382fadd32a9748d00a4bcd715ea07a
Comment 4 Pacho Ramos gentoo-dev 2011-09-25 16:18:07 UTC
+  25 Sep 2011; Pacho Ramos <pacho@gentoo.org> gam-server-0.1.10.ebuild,
+  +files/gam-server-0.1.10-G_CONST_RETURN-removal.patch,
+  +files/gam-server-0.1.10-armel-features.patch,
+  +files/gam-server-0.1.10-crosscompile-fix.patch:
+  Fix compilation with latest glib, bug #382783 by Maciej Piechotka; fix
+  crosscompilation issues, bug #267604 by Andrei Slavoiu; enable linux specific
+  features on armel, upstream bug #588338; drop DG_DISABLE_DEPRECATED; don't
+  try to even check for python, simplifying ebuild for people running python3
+  as main interpreter; use gnome.org eclass to set SRC_URI and use bz2 tarball
+  instead of gz.
+