GNOME Bugzilla – Bug 143334
[build] break when gstfileindex.c compiled with no debug
Last modified: 2005-08-25 23:44:31 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.
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?
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"
Benjamin, David, Wim; can one of you verify that this issue Michael reported is resolved now?
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.