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

Tristan Matthews tmatth at videolan.org
Tue Oct 20 21:20:46 CEST 2020


Hi,

On Tue, Oct 20, 2020 at 12:19 PM Rémi Denis-Courmont <remi at remlab.net> wrote:
>
> Le tiistaina 20. lokakuuta 2020, 11.48.32 EEST Thomas Guillem a écrit :
> > We have the same kind issue with a recent version of libsmb2 on iOS.
> >
> > There is a crash in the md5 helper (MD5Init(), MD5Update()...).
>
> That is exactly what should happen when there are duplicate symbols in
> different libraries imported by different modules, while the modules are
> haphazardly linked together without an intermediate partial linking pass.
>
> > These symbols are found in other contribs and VLC.
>
> Well yeah, don't tell me. I've been pointing out that it was unrealistic to
> assume otherwise for over a decade by now. It's even less realistic now that
> contribs has gotten 2-3 times larger than it was then (i.e., when I rewrote it
> for MeeGo).
>
> > The linker doesn't output any errors, but there is a crash from MD5Update().
> > I guess smb2 use the symbol of a contrib and it's not expected.
>
> That's the point: this should not cause duplicate symbol errors. It should
> work fine if the replicated symbols are compatible, and fail at run-time if
> they are not.
>
> > What is the correct solution to fix this issue?
>
> When all is said and done, the correct solution is to hide symbols and link
> dynamically. The poor man's alternative is to link modules in two pass with
> partial linking to rename or eliminate symbols.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

I wasn't really intending on stirring up so much controversy with such
a dumb patch. It does seem broken that only the android build seems to
fail on these, and further since these functions are only used
internally by the lib (they are not in the installed header or called
directly by the module) it was a bit surprising that this was
happening. In any case, I'll see about fixing it upstream as Steve
suggested, unless there's a more straightforward solution for contrib
(that allows duplicate symbols in separate libs).

Best,
-t


More information about the vlc-devel mailing list