[asterisk-bugs] [JIRA] (ASTERISK-20407) Asterisk compilation doesn't set rpath when --prefix is something other that /usr

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Jan 30 13:50:28 CST 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-20407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-20407:
-----------------------------------

    Target Release Version/s: 11.3.0
    
> Asterisk compilation doesn't set rpath when --prefix is something other that /usr
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20407
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20407
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/BuildSystem
>    Affects Versions: 11.0.0-beta1
>            Reporter: David M. Lee
>            Severity: Minor
>      Target Release: 11.3.0
>
>         Attachments: ASTERISK-20407-fix-11.diff, ASTERISK-20407-fix-trunk.diff
>
>
> When Asterisk is compiled with {{--prefix}} set to something other than {{/usr}}, it fails to startup on Linux.
> {code:none}
> $ ./configure --prefix=/opt/asterisk
> $ make all install
> $ /opt/asterisk/sbin/asterisk
> /opt/asterisk/sbin/asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory
> {code}
> This is because the Asterisk build scripts do not to set the {{-rpath}} [linker option|http://linux.die.net/man/1/ld], which would allow the {{asterisk}} executable to automagically find the {{libasteriskssl.so}} shared object. This wasn't a problem before Asterisk 11, because there were no non-system shared objects for Asterisk to link to at startup.
> h3. Workarounds
> # Specify the linker flag to configure
> {code:none}
> $ LDFLAGS="-Wl,-rpath,/opt/asterisk/lib" ./configure --prefix=/opt/asterisk
> {code}
> # Specify {{LD_LIBRARY_PATH}} when launching
> {code:none}
> $ export LD_LIBRARY_PATH=/opt/asterisk/lib # DYLD_LIBRARY_PATH on BSD's and OS X
> $ /opt/asterisk/sbin/asterisk
> {code}
> # Use [{{chrpath}}|http://linux.die.net/man/1/chrpath] to add rpath to the exe after the fact.
> {code:none}
> $ chrpath -r /opt/asterisk/lib /opt/asterisk/sbin/asterisk
> {code}
> # Disable the Asterisk SSL wrapper
> {code:none}
> $ ./configure --prefix=/opt/asterisk --disable-asteriskssl
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list