Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 215395 - =dev-libs/glib-2.16* fails to compile with -DG_DISABLE_ASSERT
Summary: =dev-libs/glib-2.16* fails to compile with -DG_DISABLE_ASSERT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All All
: High trivial (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-29 23:44 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2008-04-02 19:43 UTC (History)
0 users

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


Attachments
glib-2.16.1-G_DISABLE_ASSERT.patch (glib-2.16.1-G_DISABLE_ASSERT.patch,517 bytes, patch)
2008-03-29 23:45 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
glib-2.16.1.ebuild.patch (glib-2.16.1.ebuild.patch,290 bytes, patch)
2008-03-29 23:46 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-03-29 23:44:32 UTC
=dev-libs/glib-2.16* fails to compile with -DG_DISABLE_ASSERT.

/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I..  -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -pthread  -march=athlon64 -msse3 -pipe -O2 -fomit-frame-pointer -DG_DISABLE_ASSERT -Wall -MT ghash.lo -MD -MP -MF .deps/ghash.Tpo -c -o ghash.lo ghash.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -pthread -march=athlon64 -msse3 -pipe -O2 -fomit-frame-pointer -DG_DISABLE_ASSERT -Wall -MT ghash.lo -MD -MP -MF .deps/ghash.Tpo -c ghash.c  -fPIC -DPIC -o .libs/ghash.o
ghash.c: In function 'IA__g_hash_table_iter_next':
ghash.c:425: error: 'GHashTable' has no member named 'version'
ghash.c: In function 'iter_remove_or_steal':
ghash.c:487: error: 'GHashTable' has no member named 'version'
make[4]: *** [ghash.lo] Error 1

glib/ghash.c contains:
<snip>
struct _GHashTable
{
  gint             size;
  gint             nnodes;
  GHashNode      **nodes;
  GHashFunc        hash_func;
  GEqualFunc       key_equal_func;
  volatile gint    ref_count;
#ifndef G_DISABLE_ASSERT
  /*
   * Tracks the structure of the hash table, not its contents: is only
   * incremented when a node is added or removed (is not incremented
   * when the key or data of a node is modified).
   */
  int              version;
#endif
  GDestroyNotify   key_destroy_func;
  GDestroyNotify   value_destroy_func;
};

typedef struct
{
  GHashTable    *hash_table;
  GHashNode     *prev_node;
  GHashNode     *node;
  int           position;
  gboolean      pre_advanced;
  int           version;
} RealIter;
</snip>

G_DISABLE_ASSERT is supported by upstream developers, but they forgot to additionally place 2 lines inside '#ifndef G_DISABLE_ASSERT' and '#endif'.

$ cd /var/tmp/portage/dev-libs/glib-2.16.1/work/glib-2.16.1
$ grep -r '#ifndef G_DISABLE_ASSERT' . | wc -l
11
$
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-03-29 23:45:10 UTC
Created attachment 147667 [details, diff]
glib-2.16.1-G_DISABLE_ASSERT.patch
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-03-29 23:46:01 UTC
Created attachment 147669 [details, diff]
glib-2.16.1.ebuild.patch
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-03-29 23:50:19 UTC
fill a bug upstream and attach you patch their. I think it will interest them.
Comment 5 Rafał Mużyło 2008-04-02 10:09:11 UTC
So, it's fixed in 2.16.2, right ?
(Consider this 0-day bump request)
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-04-02 10:36:18 UTC
oh noes, god killed a kitten because of you...
Comment 7 Mart Raudsepp gentoo-dev 2008-04-02 19:43:09 UTC
The world has too many kitten anyway. Fixed in 2.16.2