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 143334 - [build] break when gstfileindex.c compiled with no debug
[build] break when gstfileindex.c compiled with no debug
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.0
Other AIX
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-28 14:43 UTC by Michael.Wilson
Modified: 2005-08-25 23:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Michael.Wilson 2004-05-28 14:43:23 UTC
When the build platform does not support varargs in macros. gstinfo.h forces no
debug flags and defines a certain number of macros as NOPs, e.g. ,

#define GST_DEBUG_CATEGORY_STATIC(var)  /* NOP */

Unfortunately, source file gstreamer/gst/indexers/gstfileindex.c has the line :

GST_DEBUG_CATEGORY_STATIC (DC);

and therefore DC is undefined in a further 8 lines of the code.

gstreamer/gst/indexers/gstfileindex.c", line xxx.20: 1506-045 (S) Undeclared
identifier DC.
Comment 1 Benjamin Otte (Company) 2004-06-06 23:39:05 UTC
Those lines of code should not be compiled either, so all code that uses DC
should be disabled already.
I checked the file and didn't find any wrong references to the DC variable.

Does it compile again for you?
Comment 2 Michael.Wilson 2004-06-07 08:15:46 UTC
I do not understand your comment.

The 28 lines where DC is used (the AIX compiler appears to give diagnostic
messages only for the 8 "first appearances" in each subroutine) are compiled and
there does not appear to be an "ifdef" or something else to prevent it from
occurring.

Unfortunately, the header file gstinfo.h and the intermixing of
G_HAVE_ISO_VARARGS/G_HAVE_GNUC_VARARGS                and
GST_DISABLE_GST_DEBUG/__GST_DISABLE_GST_DEBUG
does not work (contains bugs) for a C89 compiler which does not support macro
varargs.

I have worked around the problem by adding the following lines near the end of
header file gstinfo.h (just before line 516 "#endif /* G_HAVE_ISO_VARARGS */") :

#undef GST_DEBUG_CATEGORY_STATIC
#define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = "No debug"
Comment 3 Christian Fredrik Kalager Schaller 2004-12-07 23:59:57 UTC
Benjamin, David, Wim; can one of you verify that this issue Michael reported is
resolved now? 
Comment 4 Ronald Bultje 2005-01-29 11:31:56 UTC
Hi Michael, can you please update line numbers? I believe this bug to be fixed.
You're talking about non-debug build (while line 516 really is part of the debug
build), and you're saying the category is not there, whereas the non-vararg
build really does have defined categories in the non-debug build (and the debug
build also), see gstinfo.c:633:

#if !defined(G_HAVE_GNUC_VARARGS) && !defined(G_HAVE_ISO_VARARGS)
#define GST_DEBUG_CATEGORY_STATIC(var)                  static GstDebugCategory
*var = NULL
#else
#define GST_DEBUG_CATEGORY_STATIC(var)                  /* NOP */
#endif

Therefore, I think this has been long fixed. Please try current CVS or a recent
release (0.8.8), and update line numbers in gstinfo.c and provide line numbers
in gstfileindex.c if compiling still fails. I will then happily fix it.