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 756882 - spandsp duplicates symbols with other code
spandsp duplicates symbols with other code
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-20 17:12 UTC by Sebastian Dröge (slomo)
Modified: 2015-10-26 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2015-10-20 17:12:01 UTC
See https://ci.gstreamer.net/job/cerbero-ios-universal-7.1/3191/console

Should probably just -D them at build time to have a spandsp prefix.

16:02:19 _noise_free
16:02:19      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/armv7/GStreamer:libgstgeometrictransform_a_armv7_-libgstgeometrictransform_la-geometricmath.o:
16:02:19      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/armv7/GStreamer:libspandsp_a_armv7_-noise.o:
16:02:21 WARNING: The static library contains duplicated symbols
16:02:21 _has_MMX
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libmp3lame_a_i386_-util.o:
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libspandsp_a_i386_-testcpuid.o:
16:02:21 _noise_free
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libgstgeometrictransform_a_i386_-libgstgeometrictransform_la-geometricmath.o:
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libspandsp_a_i386_-noise.o:
16:02:21 _has_3DNow
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libmp3lame_a_i386_-util.o:
16:02:21      /var/folders/cp/lj_27whn5qx_8_fr40mflc3h0000gn/T/tmp3Lghja/i386/GStreamer:libspandsp_a_i386_-testcpuid.o:
Comment 1 George Kiagiadakis 2015-10-24 16:49:01 UTC
It looks like the only really problematic symbol is "noise_free". The has_FOO symbols can be compiled out very easily, as it seems they are not used anywhere in the library and neither exported in any header file.

Now, I *could* patch noise_free out by simply defining it to something else, as you say, but perhaps a better solution would be to fix the gstgeometrictransform plugin to not export unprefixed symbols, as this situation could happen again with another dependency library.
Comment 2 Sebastian Dröge (slomo) 2015-10-24 17:23:00 UTC
Yes, we should patch both unless noise_free() is public spandsp API. Is it?

For the has things, please go ahead :)
Comment 3 George Kiagiadakis 2015-10-24 19:35:33 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> Yes, we should patch both unless noise_free() is public spandsp API. Is it?

It is public api, yes.

 * noise.h - A low complexity audio noise generator, suitable for
 *           real time generation (current just approx AWGN)

The gstspandsp plugin does not use it, so in that sense we could rename it, but it's ugly and can break things.
Comment 4 George Kiagiadakis 2015-10-24 19:42:15 UTC
commit 151099500341bf5903a1218e4fa768afc89ff6d3
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Sat Oct 24 21:30:21 2015 +0200

    spandsp: add patch to stop compiling some conflicting has_MMX/has_3DNow/etc symbols

    Because they conflict with libmp3lame symbols when we link
    everything statically for mobile targets

    https://bugzilla.gnome.org/show_bug.cgi?id=756882
Comment 5 Sebastian Dröge (slomo) 2015-10-24 21:14:54 UTC
(In reply to George Kiagiadakis from comment #3)
> (In reply to Sebastian Dröge (slomo) from comment #2)
> > Yes, we should patch both unless noise_free() is public spandsp API. Is it?
> 
> It is public api, yes.
> 
>  * noise.h - A low complexity audio noise generator, suitable for
>  *           real time generation (current just approx AWGN)
> 
> The gstspandsp plugin does not use it, so in that sense we could rename it,
> but it's ugly and can break things.

Ok, so rename the one in geometrictransform only to have a Gst prefix :)
Comment 6 George Kiagiadakis 2015-10-26 16:30:50 UTC
commit f1ced59ccb5fb17cb0b23fd022ebd2fbb71c5d05
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Mon Oct 26 16:51:06 2015 +0100

    geometrictransform: rename gemetric math functions to have their symbols namespaced

    Otherwise those symbols can conflict with external libraries when
    linking everything statically for mobile targets.

    Use the gst_gm_ prefix, short for gst geometric math.

    https://bugzilla.gnome.org/show_bug.cgi?id=756882