<div dir="ltr"><div class="gmail_default" style="font-family:arial narrow,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 6:06 AM, Matthew Jordan <span dir="ltr"><<a href="mailto:mjordan@digium.com" target="_blank">mjordan@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Jan 19, 2016 at 6:04 AM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>George Joseph wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm VERY frustrated with pjproject right now.  Not the software itself<br>
(well maybe a little) but the fact that troubleshooting is a nightmare<br>
because we can't control what version of pjproject was installed along<br>
with Asterisk and we can't control what options it was compiled with.<br>
This leads to issue where we're getting great debugging from Asterisk<br>
but nothing at all from pjproject because the user installed from their<br>
distro and it has no debugging info.  So now we have to walk them though<br>
getting pjproject from source, etc, etc.  This can also cause issues<br>
should Teluu change an API or some behavior that we're not prepared for<br>
and the user just does a 'yum update pjproject' and Asterisk dies.  Then<br>
there's the issue where even though the verison is the same, the<br>
compiled-in options differ, some of them quite fatally.  That unleashes<br>
a whole other mess.<br>
</blockquote>
<br></span>
There is the middle ground which is keep the ability to link against a shared system library if present but also bundle a pjproject and use it if the system library is not present (or you force the bundled version).<span><br></span></blockquote><div><br></div></span><div>I'd certainly still like a packaged pjproject to take precedence if available. This allows package maintainers to meet the guidelines of their distros, and eases their burden.<br></div></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">​I understand the packaging issue and I'd like to hear from packagers like Jared Smith.    We could simply require a specific version of Asterisk to be statically linked to a specific version of pjproject and let the packaging process insure it's there.  For rpms, a BuildRequires would do that.  There's be no runtime dependency after that.</div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
pjproject was deeply embedded in 11 and I don't think that was right but<br>
I think we went too far in 13 by taking the hands-off approach.  Maybe<br>
at the start of 13 it was ok, but we've since put chan_sip into<br>
"extended" support so we're pushing chan_pjsip as the supported stack,<br>
instead of it just being optional.  Not to mention that chan_sip needs<br>
res_rtp_asterisk which is also dependent on pjproject.  Can you see<br>
where I'm going? :)<br>
</blockquote>
<br></span>
In the current shared library method it is not a hard dependency.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I propose that we bring pjproject into a new 'third-party' directory and<br>
statically link our res_pjsip* modules to it.  We should NOT check it<br>
into the Asterisk repository however.  Instead we should use scripts<br>
like get_mp3_source to get a specific pjproject version and a 'patches'<br>
directory that IS checked in that has things we've discovered we need.<br>
The patches should always be proposed upstream.<br>
<br>
It's a lot of work but I'm willing to dig in and I'll bet I could get a<br>
few volunteers to help.<br>
</blockquote>
<br></span>
>From a technical perspective you can not statically link each module to PJSIP, each module will end up with its own isolated running copy. You need to statically link it into one module (res_pjsip, or res_pjproject for example) and have it export all of the symbols to everything else. Additionally because all the symbols aren't actually being used the linker also likes to remove them unless you do magic to force them to be present regardless. This is how the PJSIP support was originally developed before shared library support was added to pjproject. If you go back in time almost everything needed to make it work in a bundled configuration is there already.<span><font color="#888888"><br>
</font></span></blockquote><div><br></div></span><div>Would we automatically download and link pjproject when someone runs 'make', or would it require some different make target? <br></div></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">​The more I think about it, maybe we don't need to bundle.  Maybe it's just enforcing a specific version to be available for static linking.​</div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div></div><span class="HOEnZb"><font color="#888888"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Director of Technology<br></div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div></div></div></div>
</font></span></div></div>
<br></blockquote></div></div></div>