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 727977 - dvb: Protect against symbols added in DVB_API v5 minor version > 5
dvb: Protect against symbols added in DVB_API v5 minor version > 5
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-10 16:28 UTC by Josep Torra Valles
Modified: 2014-04-11 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dvbsrc: Handle symbols added in minor version 7 and 8 (1.91 KB, patch)
2014-04-11 06:40 UTC, Edward Hervey
committed Details | Review

Description Josep Torra Valles 2014-04-10 16:28:09 UTC
make[3]: Entering directory `/home/jep/gst/master/gst-plugins-bad/sys/dvb'
  CC     libgstdvb_la-gstdvbsrc.lo
gstdvbsrc.c: In function 'gst_dvbsrc_delsys_get_type':
gstdvbsrc.c:300:6: error: 'SYS_DTMB' undeclared (first use in this function)
gstdvbsrc.c:300:6: note: each undeclared identifier is reported only once for each function it appears in
gstdvbsrc.c: In function 'gst_dvbsrc_class_init':
gstdvbsrc.c:564:22: error: 'NO_STREAM_ID_FILTER' undeclared (first use in this function)
gstdvbsrc.c:564:11: error: passing argument 6 of 'g_param_spec_int' makes integer from pointer without a cast [-Werror]
In file included from /usr/include/glib-2.0/glib-object.h:30:0,
                 from /home/jep/gst/master/gstreamer/gst/gstenumtypes.h:7,
                 from /home/jep/gst/master/gstreamer/gst/gst.h:31,
                 from gstdvbsrc.h:5,
                 from gstdvbsrc.c:43:
I was refreshing my gst-uninstalled master and found the following errors.

/usr/include/glib-2.0/gobject/gparamspecs.h:999:13: note: expected 'gint' but argument is of type 'struct GEnumValue *'
gstdvbsrc.c: In function 'gst_dvbsrc_init':
gstdvbsrc.c:613:23: error: 'NO_STREAM_ID_FILTER' undeclared (first use in this function)
gstdvbsrc.c:613:21: error: assignment makes integer from pointer without a cast [-Werror]
gstdvbsrc.c: In function 'gst_dvbsrc_open_frontend':
gstdvbsrc.c:1045:46: error: 'SYS_DTMB' undeclared (first use in this function)
gstdvbsrc.c:1045:3: error: passing argument 2 of 'gst_dvbsrc_check_delsys' makes integer from pointer without a cast [-Werror]
gstdvbsrc.c:909:1: note: expected 'guchar' but argument is of type 'struct GEnumValue *'
gstdvbsrc.c: In function 'gst_dvbsrc_tune':
gstdvbsrc.c:1613:35: error: 'DTV_STREAM_ID' undeclared (first use in this function)
gstdvbsrc.c:1613:11: error: passing argument 3 of 'set_prop' makes integer from pointer without a cast [-Werror]
gstdvbsrc.c:1496:1: note: expected 'guint32' but argument is of type 'struct GEnumValue *'
gstdvbsrc.c:1627:11: error: passing argument 3 of 'set_prop' makes integer from pointer without a cast [-Werror]
gstdvbsrc.c:1496:1: note: expected 'guint32' but argument is of type 'struct GEnumValue *'
cc1: all warnings being treated as errors
Comment 1 Josep Torra Valles 2014-04-10 16:33:06 UTC
cat /usr/include/linux/dvb/version.h

...

#define DVB_API_VERSION 5
#define DVB_API_VERSION_MINOR 6

...
Comment 2 Edward Hervey 2014-04-11 06:21:35 UTC
The minimum minor version we support is indeed 5, so this should work. We'll need to put some #if to protect against new symbols.
Comment 3 Edward Hervey 2014-04-11 06:40:38 UTC
Created attachment 274062 [details] [review]
dvbsrc: Handle symbols added in minor version 7 and 8

Some symbols were re-defined in minor v8 (GO TEAM BACKWARDS COMPATIBLE!)

Some symbols were added in minor v7
Comment 4 Edward Hervey 2014-04-11 06:52:55 UTC
Josep, can you try that patch ? It should normally fix the issues with new features.
Comment 5 Josep Torra Valles 2014-04-11 08:05:08 UTC
I've tested the patch and build is fixed in Ubuntu 12.10.

Thanks for the quick fix.
Comment 6 Edward Hervey 2014-04-11 08:18:59 UTC
commit c400eef3772b7dc470eefae02a1288c2b125e25c
Author: Edward Hervey <edward@collabora.com>
Date:   Fri Apr 11 08:39:29 2014 +0200

    dvbsrc: Handle symbols added in minor version 7 and 8
    
    Some symbols were re-defined in minor v8 (GO TEAM BACKWARDS COMPATIBLE!)
    
    Some symbols were added in minor v7
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727977