[libnice] Small patch to avoid symbol clash with openSSL

Curieux Tres trescurieux at yahoo.fr
Sat Oct 25 23:40:18 PDT 2014


Hi,
Looks like when used as static lib, the symbol is fully exported
nm -AC libnice.a | grep RAND
libnice.a:rand.o:0000000000000050 T RAND_bytes
libnice.a:stunhmac.o:                 U RAND_bytes

(It has been built with regular autoconf/automake with --enable-static)

Thanks
Fx




Le Samedi 25 octobre 2014 20h10, Philip Withnall <philip at tecnocode.co.uk> a écrit :
 


It really depends entirely on how you’re building libnice. What linker
flags are you passing in via cmake?

Rather than reinventing the libnice build system, a better approach is
to build libnice using its own build system for all the platforms you’re
interested in (potentially producing a static library), then link to
that from the build system of whatever final project you’re using.

I did this recently using Cerbero[1] to build a project for multiple
desktop and mobile platforms. The project used libnice, and used its
existing automake build system without linker problems.

Philip

[1]: http://cgit.freedesktop.org/gstreamer/cerbero/


On Sat, 2014-10-25 at 18:47 +0100, Curieux Tres wrote:
> we have all the cmake based tool to build for all platforms (i.e.
> desktop & mobile).
> Won't the problem happen if libnice is used as static lib ?
> 
> 
> Thanks
> Fx
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Le Vendredi 24 octobre 2014 20h47, Philip Withnall
> <philip at tecnocode.co.uk> a écrit :
> 
> 
> 
> It certainly will. Why are you not using automake?
> 
> Philip
> 
> On Fri, 2014-10-24 at 18:54 +0100, Curieux Tres wrote:
> > 
> > 
> > Hi
> > Maybe my fault, i'm not using the autoconf/automake build
> > but a cmake one, it might expose things a little bit differently
> > 
> > 
> > 
> > Le Vendredi 24 octobre 2014 17h57, Philip Withnall
> > <philip at tecnocode.co.uk> a écrit :
> > 
> > 
> > 
> > Hi,
> > 
> > How are you encountering this symbol clash? RAND_bytes is exposed in
> > the
> > libstun.la helper library, but that is not installed, and when it’s
> > linked in to libnice.so, RAND_bytes becomes a local, non-exported
> > symbol.
> > 
> > e.g.
> > $ nm -g nice/.libs/libnice.so | grep RAND
> > $ # no results
> > 
> > Philip
> > 
> > On Thu, 2014-10-16 at 15:10 +0100, Curieux Tres wrote:
> > > Hi
> > > RAND_bytes  is also used/exported by openSSL
> > > Small patch attached to rename it to nice_RAND_bytes
> > > 
> > > 
> > > Thanks
> > > Fx
> > > 
> > > 
> > > _______________________________________________
> > > nice mailing list
> > > nice at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/nice
> > 
> > 
> > 
> > 
> 
> 
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice
> 
> 
> 
> 
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice


_______________________________________________
nice mailing list
nice at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20141026/9b0aedda/attachment.html>


More information about the nice mailing list