GNOME Bugzilla – Bug 440544
glib.symbols: g_slice_debug_tree_statistics and G_ENABLE_DEBUG
Last modified: 2007-09-24 17:00:57 UTC
Please describe the problem: Please see #390940, same problem occurred again at revision 5492. Steps to reproduce: 1. compile without G_ENABLE_DEBUG Actual results: Following message is displayed.(Visual C++) glib.def : error LNK2001: unresolved external symbol g_slice_debug_tree_statistics Expected results: Exporting g_slice_debug_tree_statistics should be limited. Does this happen every time? Revision 5492 or later Other information: Please see ChangeLog about g_slice_debug_tree_statistics. http://svn.gnome.org/viewcvs/glib?view=revision&revision=5492 http://svn.gnome.org/viewcvs/glib?view=revision&revision=5318 http://svn.gnome.org/viewcvs/glib?view=revision&revision=5190
hmm, I'll look at that. As a workaround, does building with --enable-debug=yes work for you ?
Yes. If building with --enable-debug=yes, G_ENABLE_DEBUG is defined. It is successful.
FYI, this still occurs with glib-2.14.0 (compiling with MinGW). The build fails with the following error: Cannot export g_slice_debug_tree_statistics: symbol not defined The build was configured to use the default debugging, minimum.
2007-08-06 Tor Lillqvist <tml@novell.com> * glib/gslice.c: Move the G_ENABLE_DEBUG ifdef inside g_slice_debug_tree_statistics() so that the function exists (but doesn't do anything) also in a non-debug build. (#440544)
Hey Tor I did that earlier during 2.13.x, and timj objected...
Ah ok... Should we instead then just remove g_slice_debug_tree_statistics from glib.symbols?
that'll make make check break even in debug builds, I guess I just need to sit down and figure out how to fix make check
Reverted in SVN...
So different lists of exported symbols in debug and non-debug builds?
2007-08-08 Matthias Clasen <mclasen@redhat.com> * glib/glib.symbols: * glib/Makefile.am: * glib/abicheck.sh: Make it work regardless of --enable-debug
That might fix the abicheck.sh problem, but doesn't fix the actual problem initially reported in this bug report, does it? g_slice_debug_tree_statistics() is still inside #ifdef G_ENABLE_DEBUG, but always gets included in glib.def. Should we surround it with #ifdef G_ENABLE_DEBUG also in glib.symbols, and pass also $(GLIB_DEBUG_FLAGS) to $(CPP) when making glib.def? (Or did you forget to commit a change to glib.symbols?)
forgotten file, indeed. Committed now.
*** Bug 463354 has been marked as a duplicate of this bug. ***