GNOME Bugzilla – Bug 756882
spandsp duplicates symbols with other code
Last modified: 2015-10-26 16:53:18 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:
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.
Yes, we should patch both unless noise_free() is public spandsp API. Is it? For the has things, please go ahead :)
(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.
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
(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 :)
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