[vlc-devel] [PATCH] contrib: rnnoise: prefix common symbols

Alexandre Janniaux ajanni at videolabs.io
Tue Oct 20 12:53:21 CEST 2020


Hi,

On Tue, Oct 20, 2020 at 11:33:09AM +0300, Rémi Denis-Courmont wrote:
> Hi,
>
> No, there is nothing unavoidable about it.

Sure, instead you can provide something different than a static framework
like a bunch of static libraries or a dynamic frameworks. Both are
tradeoff on library complexity, startup cost and potential code elision.

But if you want to ship a static framework on iOS, you don't have the
choice, you cannot wrap «libraries into libraries» so you need a single
library and reduce conflicts both by partial linking and symbol collision
elision.

> Partial linking is the only way to avoid overlapping symbols with different definitions, and is the only supported way to link VLC modules statically. Anything else is known broken for well over a decade.

You cannot partially link a static library into an object
without extracting the objects and including them in the
linking, which defeat the argument on static library.

So what you're saying is that we should partially link the
contrib itself to mask the symbols we don't want exposed.
It's possible yes, but orders of magnitude more difficult
than just be aware of duplicated symbols.

> But that's not even the problem here. Multiple equivalent definitions of the same function in different libraries is fine even without partial linking. If there is a duplicate symbol error the build flags are wrong, very very wrong.

Like I said twice, this is not about build flags/link flags.

> This patch is only (yet again) highlighting bugs elsewhere.
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list