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 614167 - gstinfo: no previous prototype for 'xxx' when buildign with --disable-gst-debug
gstinfo: no previous prototype for 'xxx' when buildign with --disable-gst-debug
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-28 11:11 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2010-03-29 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix build warnings (4.53 KB, patch)
2010-03-28 12:53 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
give dummy sybmols a uniqe name (1.53 KB, patch)
2010-03-28 13:15 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-28 11:11:36 UTC
This is the effect of recent compile warning aditions. The problem here is that in the case of GST_DISABLE_GST_DEBUG we nullify the function calls with #defines. If we want to fix that we would need to have uppercase macros for most of them and either nullify them or call the function.

cc1: warnings being treated as errors
gstinfo.c:1720: error: no previous prototype for ‘gst_debug_message_get’
gstinfo.c:1726: error: no previous prototype for ‘gst_debug_log_default’
gstinfo.c:1733: error: no previous prototype for ‘gst_debug_level_get_name’
gstinfo.c:1739: error: no previous prototype for ‘gst_debug_add_log_function’
gstinfo.c:1744: error: no previous prototype for ‘gst_debug_remove_log_function’
gstinfo.c:1750: error: no previous prototype for ‘gst_debug_remove_log_function_by_data’
gstinfo.c:1756: error: no previous prototype for ‘gst_debug_set_active’
gstinfo.c:1761: error: no previous prototype for ‘gst_debug_is_active’
gstinfo.c:1767: error: no previous prototype for ‘gst_debug_set_colored’
gstinfo.c:1772: error: no previous prototype for ‘gst_debug_is_colored’
gstinfo.c:1778: error: no previous prototype for ‘gst_debug_set_default_threshold’
gstinfo.c:1783: error: no previous prototype for ‘gst_debug_get_default_threshold’
gstinfo.c:1789: error: no previous prototype for ‘gst_debug_set_threshold_for_name’
gstinfo.c:1794: error: no previous prototype for ‘gst_debug_unset_threshold_for_name’
gstinfo.c:1799: error: no previous prototype for ‘gst_debug_category_free’
gstinfo.c:1804: error: no previous prototype for ‘gst_debug_category_set_threshold’
gstinfo.c:1810: error: no previous prototype for ‘gst_debug_category_reset_threshold’
gstinfo.c:1815: error: no previous prototype for ‘gst_debug_category_get_threshold’
gstinfo.c:1821: error: no previous prototype for ‘gst_debug_category_get_name’
gstinfo.c:1827: error: no previous prototype for ‘gst_debug_category_get_color’
gstinfo.c:1833: error: no previous prototype for ‘gst_debug_category_get_description’
gstinfo.c:1839: error: no previous prototype for ‘gst_debug_get_all_categories’
gstinfo.c:1851: error: no previous prototype for ‘gst_debug_construct_term_color’
gstinfo.c:1857: error: no previous prototype for ‘gst_debug_construct_win_color’
Comment 1 Benjamin Otte (Company) 2010-03-28 11:27:24 UTC
Why do we even compile these functions?

Also if we compile them, they should be declared in the headers.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-28 11:30:25 UTC
Good point, will make a patch that ifdefs them in .c file.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-28 12:53:07 UTC
Created attachment 157324 [details] [review]
fix build warnings

erm, no. We built them to have maintain ABI compatibility. Attached patch fixes the issues mostly,

Now it breaks with:
  CC     libgstbase_0.10_la-gstdataqueue.lo
cc1: warnings being treated as errors
gstdataqueue.c:36: error: redundant redeclaration of ‘_gst_dummy_declaration’
gstdataqueue.c:34: note: previous declaration of ‘_gst_dummy_declaration’ was here
Comment 4 Benjamin Otte (Company) 2010-03-28 13:09:38 UTC
I think what we should do is:
- fix the headers so they export the still existing functions.
- make GST_DISABLE_GST_DEBUG only turn off GST_LOG/DEBUG/INFO/... messages
- advertise GST_DISABLE_GST_DEBUG the same way we advertise GST_DISABLE_DEPRECATED.
- remove GST_DISABLE_GST_DEBUG from gstconfig.h

Then we don't change ABI in any way even with that flag enabled in a core build.
And people can set this flag per module - so they can enable debugging for their own plugins even though core and plugins come with debugging turned off.

Does that make sense? Is that too much of a change for 0.10?
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-28 13:15:43 UTC
Created attachment 157325 [details] [review]
give dummy sybmols a uniqe name

With this patch applied too, things build again.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-28 15:07:57 UTC
(In reply to comment #4)
> I think what we should do is:
> - fix the headers so they export the still existing functions.
> - make GST_DISABLE_GST_DEBUG only turn off GST_LOG/DEBUG/INFO/... messages
> - advertise GST_DISABLE_GST_DEBUG the same way we advertise
> GST_DISABLE_DEPRECATED.
> - remove GST_DISABLE_GST_DEBUG from gstconfig.h
> 
> Then we don't change ABI in any way even with that flag enabled in a core
> build.
> And people can set this flag per module - so they can enable debugging for
> their own plugins even though core and plugins come with debugging turned off.

I can't speak for others, but when we turn gst-debug off an maemo, we want that all modules rebuilt afterwards have no trace of debugging code and for all code that was not rebuild have as cheap as possible debug-log calles (aka stubs).

> 
> Does that make sense? Is that too much of a change for 0.10?
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-29 13:39:53 UTC
commit 477a5d09393be54ec5629dfb6573406551e6ae0b
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon Mar 29 16:34:03 2010 +0300

    gstinfo: add a comment explaining the reason for using fucntion protos here.

commit e55d18baa24e8ce5864bdb7a32d4fcab58003e2b
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon Mar 29 16:13:54 2010 +0300

    gstinfo: always define dummy debug category as a function prototype
    
    It does not seem to make sense to define this as a function only if we have
    varargs macros.

commit b40c2f81145510c0e34e8010da0365f6e80b6bdb
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Sun Mar 28 15:10:20 2010 +0300

    build: fix redeclaration erors when building with --gst-disable-gst-debug
    
    Give dummy symbols a uniqe name.

commit f89ccf7d3dc42cc6326b8c48a7c83fa85bb91e21
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Sun Mar 28 14:49:03 2010 +0300

    build: move some prototypes out of #ifndef GST_DISABLE_GST_DEBUG
    
    Move the prototypes up together. We only define the macros differently.
    Fixes bug #614167 mostly.

commit 04bf54c58f2df65fda597e499fa8c2f3bc277017
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon Mar 29 16:05:44 2010 +0300

    info: readd the use of GstDebugFuncPtr typedef and tell why
    
    This reverts the related changes from 3f4954e42d0440a7a598a908325c45ea9db076e4
    and ffb0a4e1905a873191f8c802346261e8c4435065.