[asterisk-dev] Feedback requested for rpath patch
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Sep 26 21:29:44 CDT 2012
On Wed, Sep 26, 2012 at 01:30:36PM -0500, David M. Lee wrote:
> Hello, all!
>
> If you would please take a look at ASTERSIK-20407[1], I'd like some
> input from the fine folks on asterisk-dev.
>
> (tl;dr - Asterisk fails to start if prefix isn't /usr, b/c we don't
> specify the rpath when building the asterisk binary)
>
> I have a patch which fixes this problem[2]. This patch will:
>
> * For OS's other than OS X, add the -rpath linker option if libdir is
> anything other than /lib or /usr/lib. This can be disabled by
> passing --disable-rpath to ./configure.
>
> * For OS X, we have macosx_version_min set to 10.4, which doesn't
> support rpath. So instead, the patch adds the -dynamiclib and
> -install_name flags for linking libasteriskssl.dylib, along with
> cleaning up some of the other OS X specific linker flags.
The patch sets rpath on just about everything. This is wrong. If you
need to set rpath on libasteriskssl, set it on libasteriskssl. Please
don't potentially break other thing with rpath.
Q: What's wrong with rpath?
A: it works after you install things but magically fails to work if you
move things around.
I prefer an explicit LD_LIBRARY_PATH.
>
> So here's where I can use some input. Please reply to the list, or
> comment on my review[3].
>
> * I don't immediately have a way to check my patch for Solaris, BSD's
> and whatever else someone might be interested in building Asterisk
> on. If you're interesting in building Asterisk on not Linux, mind
> checking out my patch and providing feedback?
>
> * I really don't like the check against /lib and /usr/lib. Is there a
> better way to check whether the rpath flag should be set? Should
> rpath always be set unless --disable-rpath is passed in?
Note that Debian and Ubuntu systems now have [/usr]/lib/<arch-triplet>,
such as /usr/lib/x86_64-linux-gnu .
I prefer that it won't be set at all.
>
> * Having the rpath thing differ just because of OS X 10.4 (Tiger)
> bothers me. That version of OS X hasn't even received a security
> update since 2009. For trunk, I'd like to bump the min version to
> 10.5 (Leopard) and set rpath consistently across platforms.[4] Any
> objections?
>
> [1]: https://issues.asterisk.org/jira/browse/ASTERISK-20407
> [2]: https://issues.asterisk.org/jira/secure/attachment/44760/ASTERISK-20407-fix-11.diff
> [3]: https://reviewboard.asterisk.org/r/2132
> [4]: https://issues.asterisk.org/jira/secure/attachment/44761/ASTERISK-20407-fix-trunk.diff
>
> Thanks!
> --
> David M. Lee
> Digium, Inc. | Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: www.digium.com & www.asterisk.org
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list