<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div><span>Perfect,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Thanks</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Fx</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family:
 HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> Le Lundi 27 octobre 2014 12h34, Philip Withnall <philip@tecnocode.co.uk> a écrit :<br> </font> </div>  <br><br> <div class="y_msg_container">Ah, you’re absolutely right. I’d forgotten that symbol visibility cannot<br clear="none">be controlled for static libraries (since they’re basically just a<br clear="none">concatenation of .o files).<br clear="none"><br clear="none">I’ve pushed your patch to master with a suitable commit message. Thanks<br clear="none">a lot. :-)<br clear="none"><br clear="none">commit 3bc28d43a5189e561087f9340467ef2bd314c7fb<br clear="none">Author: Curieux Tres <<a shape="rect" ymailto="mailto:trescurieux@yahoo.fr"
 href="mailto:trescurieux@yahoo.fr">trescurieux@yahoo.fr</a>><br clear="none">Date:   Mon Oct 27 11:32:17 2014 +0000<br clear="none"><br clear="none">    stun: Rename a symbol to avoid a naming clash with OpenSSL<br clear="none">    <br clear="none">    The symbol is not exported, but nevertheless leaks in the static<br clear="none">version<br clear="none">    of libnice, due to limitations on symbol visibilities with static<br clear="none">    libraries. OpenSSL has a symbol named RAND_bytes(), which ours<br clear="none">clashes<br clear="none">    with if the two are linked together statically.<br clear="none">    <br clear="none">    Avoid this by prefixing ours with ‘nice_’.<br clear="none"><br clear="none"> stun/rand.c     | 4 ++--<br clear="none"> stun/rand.h     | 2 +-<br clear="none"> stun/stunhmac.c | 2 +-<br clear="none"> 3 files
 changed, 4 insertions(+), 4 deletions(-)<br clear="none"><br clear="none">Philip<br clear="none"><div class="yqt3766105790" id="yqtfd06051"><br clear="none">On Sun, 2014-10-26 at 06:40 +0000, Curieux Tres wrote:<br clear="none">> Hi,<br clear="none">> Looks like when used as static lib, the symbol is fully exported<br clear="none">> nm -AC libnice.a | grep RAND<br clear="none">> libnice.a:rand.o:0000000000000050 T RAND_bytes<br clear="none">> <br clear="none">> libnice.a:stunhmac.o:                 U RAND_bytes<br clear="none">> <br clear="none">> <br clear="none">> (It has been built with regular autoconf/automake with<br clear="none">> --enable-static)<br clear="none">> <br clear="none">> <br clear="none">> Thanks<br clear="none">> Fx<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br
 clear="none">> <br clear="none">> Le Samedi 25 octobre 2014 20h10, Philip Withnall<br clear="none">> <<a shape="rect" ymailto="mailto:philip@tecnocode.co.uk" href="mailto:philip@tecnocode.co.uk">philip@tecnocode.co.uk</a>> a écrit :<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> It really depends entirely on how you’re building libnice. What linker<br clear="none">> flags are you passing in via cmake?<br clear="none">> <br clear="none">> Rather than reinventing the libnice build system, a better approach is<br clear="none">> to build libnice using its own build system for all the platforms<br clear="none">> you’re<br clear="none">> interested in (potentially producing a static library), then link to<br clear="none">> that from the build system of whatever final project you’re using.<br clear="none">> <br clear="none">> I did this recently using Cerbero[1] to build a
 project for multiple<br clear="none">> desktop and mobile platforms. The project used libnice, and used its<br clear="none">> existing automake build system without linker problems.<br clear="none">> <br clear="none">> Philip<br clear="none">> <br clear="none">> [1]: <a shape="rect" href="http://cgit.freedesktop.org/gstreamer/cerbero/" target="_blank">http://cgit.freedesktop.org/gstreamer/cerbero/</a><br clear="none">> <br clear="none">> On Sat, 2014-10-25 at 18:47 +0100, Curieux Tres wrote:<br clear="none">> > we have all the cmake based tool to build for all platforms (i.e.<br clear="none">> > desktop & mobile).<br clear="none">> > Won't the problem happen if libnice is used as static lib ?<br clear="none">> > <br clear="none">> > <br clear="none">> > Thanks<br clear="none">> > Fx<br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">>
 > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > Le Vendredi 24 octobre 2014 20h47, Philip Withnall<br clear="none">> > <<a shape="rect" ymailto="mailto:philip@tecnocode.co.uk" href="mailto:philip@tecnocode.co.uk">philip@tecnocode.co.uk</a>> a écrit :<br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > It certainly will. Why are you not using automake?<br clear="none">> > <br clear="none">> > Philip<br clear="none">> > <br clear="none">> > On Fri, 2014-10-24 at 18:54 +0100, Curieux Tres wrote:<br clear="none">> > > <br clear="none">> > > <br clear="none">> > > Hi<br clear="none">> > > Maybe my fault, i'm
 not using the autoconf/automake build<br clear="none">> > > but a cmake one, it might expose things a little bit differently<br clear="none">> > > <br clear="none">> > > <br clear="none">> > > <br clear="none">> > > Le Vendredi 24 octobre 2014 17h57, Philip Withnall<br clear="none">> > > <<a shape="rect" ymailto="mailto:philip@tecnocode.co.uk" href="mailto:philip@tecnocode.co.uk">philip@tecnocode.co.uk</a>> a écrit :<br clear="none">> > > <br clear="none">> > > <br clear="none">> > > <br clear="none">> > > Hi,<br clear="none">> > > <br clear="none">> > > How are you encountering this symbol clash? RAND_bytes is exposed<br clear="none">> in<br clear="none">> > > the<br clear="none">> > > libstun.la helper library, but that is not installed, and when<br clear="none">> it’s<br clear="none">> > > linked in to
 libnice.so, RAND_bytes becomes a local, non-exported<br clear="none">> > > symbol.<br clear="none">> > > <br clear="none">> > > e.g.<br clear="none">> > > $ nm -g nice/.libs/libnice.so | grep RAND<br clear="none">> > > $ # no results<br clear="none">> > > <br clear="none">> > > Philip<br clear="none">> > > <br clear="none">> > > On Thu, 2014-10-16 at 15:10 +0100, Curieux Tres wrote:<br clear="none">> > > > Hi<br clear="none">> > > > RAND_bytes  is also used/exported by openSSL<br clear="none">> > > > Small patch attached to rename it to nice_RAND_bytes<br clear="none">> > > > <br clear="none">> > > > <br clear="none">> > > > Thanks<br clear="none">> > > > Fx<br clear="none">> > > > <br clear="none">> > > > <br clear="none">> > > >
 _______________________________________________<br clear="none">> > > > nice mailing list<br clear="none">> > > > <a shape="rect" ymailto="mailto:nice@lists.freedesktop.org" href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br clear="none">> > > > <a shape="rect" href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br clear="none">> > > <br clear="none">> > > <br clear="none">> > > <br clear="none">> > > <br clear="none">> > <br clear="none">> > <br clear="none">> > _______________________________________________<br clear="none">> > nice mailing list<br clear="none">> > <a shape="rect" ymailto="mailto:nice@lists.freedesktop.org" href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br clear="none">> > <a shape="rect"
 href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > _______________________________________________<br clear="none">> > nice mailing list<br clear="none">> > <a shape="rect" ymailto="mailto:nice@lists.freedesktop.org" href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br clear="none">> > <a shape="rect" href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br clear="none">> <br clear="none">> <br clear="none">> _______________________________________________<br clear="none">> nice mailing list<br clear="none">> <a shape="rect" ymailto="mailto:nice@lists.freedesktop.org"
 href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br clear="none">> <a shape="rect" href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none"></div><br><div class="yqt3766105790" id="yqtfd23449">_______________________________________________<br clear="none">nice mailing list<br clear="none"><a shape="rect" ymailto="mailto:nice@lists.freedesktop.org" href="mailto:nice@lists.freedesktop.org">nice@lists.freedesktop.org</a><br clear="none"><a shape="rect" href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>