<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2041/1/7/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+on+%28Open%29Solaris">Asterisk on (Open)Solaris</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~bklang">Ben Klang</a>
</h4>
<br/>
<h4>Changes (2)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >h2. Asterisk on Solaris 10 and OpenSolaris <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h6. On this page <br>{toc:maxLevel=5} <br> <br></td></tr>
<tr><td class="diff-unchanged" >h3. Digium's Support Status <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" > <br>At the time of this writing I have had a server up and running reasonably stable. However, there are large sections of Asterisk's codebase I do not use and likely contain more of these uninitialized variable problems and associated potential segfaults. <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"> <br> <br> <br> <br> <br> <br> <br> <br> <br>h6. On this page <br>{toc:maxLevel=5} <br> <br>h4. Symptoms <br>{loremipsum:1} <br> <br>h4. Cause <br>{loremipsum:1} <br> <br>h4. Workaround <br>{loremipsum:1} <br> <br>h4. Resolution <br>{loremipsum:1} <br> <br>Add the following line: <br>{code} <br><osuser key="osuserRepository" name="OSUser Repository"/> <br>{code} <br>*ABOVE* <br>{code} <br><hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/> <br>{code} <br> <br>h4. Related <br>* _Link to any related Knowledge Base articles or External Links_ <br>* _One way to improve this template is by replacing "Related" with either the [related-labels|http://confluence.atlassian.com/x/mDgC] or [contentbylabel|http://confluence.atlassian.com/x/njgC] macro_ <br> <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h2><a name="Asteriskon%28Open%29Solaris-AsteriskonSolaris10andOpenSolaris"></a>Asterisk on Solaris 10 and OpenSolaris</h2>
<h6><a name="Asteriskon%28Open%29Solaris-Onthispage"></a>On this page</h6>
<div>
<ul>
<li><a href='#Asteriskon%28Open%29Solaris-AsteriskonSolaris10andOpenSolaris'>Asterisk on Solaris 10 and OpenSolaris</a></li>
<ul>
<li><a href='#Asteriskon%28Open%29Solaris-Digium%27sSupportStatus'>Digium's Support Status</a></li>
<li><a href='#Asteriskon%28Open%29Solaris-BuildNotes'>Build Notes</a></li>
<ul>
<li><a href='#Asteriskon%28Open%29Solaris-Prerequisites'>Prerequisites</a></li>
<li><a href='#Asteriskon%28Open%29Solaris-LDAPdependencies'>LDAP dependencies</a></li>
<li><a href='#Asteriskon%28Open%29Solaris-Makefilelayouts'>Makefile layouts</a></li>
</ul>
<li><a href='#Asteriskon%28Open%29Solaris-Gotchas'>Gotchas</a></li>
<ul>
<li><a href='#Asteriskon%28Open%29Solaris-Runtimeissues'>Runtime issues</a></li>
<li><a href='#Asteriskon%28Open%29Solaris-Buildissues'>Build issues</a></li>
</ul>
</ul>
</ul></div>
<h3><a name="Asteriskon%28Open%29Solaris-Digium%27sSupportStatus"></a>Digium's Support Status</h3>
<p>According to the README file from 1.6.2: "Asterisk has also been 'ported' and reportedly runs properly on other<br/>
operating systems as well, including Sun Solaris, Apple's Mac OS X, Cygwin,<br/>
and the BSD variants." Digium's developers have also been doing a good job of addressing build and run-time<br/>
issues encountered with Asterisk on Solaris.</p>
<h3><a name="Asteriskon%28Open%29Solaris-BuildNotes"></a>Build Notes</h3>
<h4><a name="Asteriskon%28Open%29Solaris-Prerequisites"></a>Prerequisites</h4>
<p>The following packages are recommend for building Asterisk 1.6 and later on OpenSolaris:</p>
<ul>
        <li>SUNWlibm (math library)</li>
        <li>gcc-dev (compiler and several dependencies)</li>
        <li>SUNWflexlex (GNU flex)</li>
        <li>SUNWggrp (GNU grep)</li>
        <li>SUNWgsed (GNU sed)</li>
        <li>SUNWdoxygen (optional; needed for "make progdocs")</li>
        <li>SUNWopenldap (optional; needed for res_config_ldap; see below)</li>
        <li>SUNWgnu-coreutils (optional; provides GNU install; see below)</li>
</ul>
<p>Caution: installing SUNW gnu packages will change the default application run when<br/>
the user types 'sed' and 'grep' from /usr/bin/sed to /usr/gnu/bin/sed. Just be aware of this change,<br/>
as there are differences between the Sun and GNU versions of these utilities.</p>
<h4><a name="Asteriskon%28Open%29Solaris-LDAPdependencies"></a>LDAP dependencies</h4>
<p>Because OpenSolaris ships by default with Sun's LDAP libraries, you must install the<br/>
SUNWopenldap package to provide OpenLDAP libraries. Because of namespace conflicts,<br/>
the standard LDAP detection will not work.</p>
<p>There are two possible solutions:</p>
<ol>
        <li>Port res_config_ldap to use only the RFC-specified API. This should allow it to link<br/>
against Sun's LDAP libraries. The problem is centered around the use of the OpenLDAP-specific<br/>
ldap_initialize() call. </li>
        <li>Change the detection routines in configure to use OpenSolaris' layout of OpenLDAP. This seems<br/>
doubtful simply because the filesystem layout of SUNWopenldap is so non-standard.</li>
</ol>
<p>Despite the above to possibilities, there is a workaround to make Asterisk compile with res_config_ldap.</p>
<ul>
        <li>Modify the "configure" script, changing all instances of "-lldap" to "-lldap-2.4". At the time of this writing<br/>
there are only 4 instances. This alone will make configure properly detect LDAP headers. But it will not compile. You must also...</li>
        <li>When running make, specify the use of the OpenLDAP headers like this:<br/>
"make LDAP_INCLUDE=-I/usr/include/openldap"</li>
</ul>
<h4><a name="Asteriskon%28Open%29Solaris-Makefilelayouts"></a>Makefile layouts</h4>
<p>This has been fixed in Asterisk 1.8 and is no longer an issue.</p>
<p>In Asterisk 1.6 the Makefile overrides any usage of --prefix. I suspect the assumptions<br/>
are from back before configure provided the ability to set the installation prefix. Regardless, if you are building on<br/>
OpenSolaris, be aware of this behavior of the Makefile!</p>
<p>If you want to alter the install locations you will need to hand-edit the Makefile. Search for the string "SunOS"<br/>
to find the following section:</p>
<p><sub>pp</sub></p>
<ol>
        <li>Define standard directories for various platforms</li>
        <li>These apply if they are not redefined in asterisk.conf<br/>
ifeq ($(OSARCH),SunOS)<br/>
ASTETCDIR=/etc/asterisk<br/>
ASTLIBDIR=/opt/asterisk/lib<br/>
ASTVARLIBDIR=/var/opt/asterisk<br/>
ASTDBDIR=$(ASTVARLIBDIR)<br/>
ASTKEYDIR=$(ASTVARLIBDIR)<br/>
ASTSPOOLDIR=/var/spool/asterisk<br/>
ASTLOGDIR=/var/log/asterisk<br/>
ASTHEADERDIR=/opt/asterisk/include/asterisk<br/>
ASTBINDIR=/opt/asterisk/bin<br/>
ASTSBINDIR=/opt/asterisk/sbin<br/>
ASTVARRUNDIR=/var/run/asterisk<br/>
ASTMANDIR=/opt/asterisk/man<br/>
else<br/>
<sub>/pp</sub></li>
</ol>
<p>Note that, despite the comment, these definitions have build-time and run-time implications. Make sure you<br/>
make these changes BEFORE you build!</p>
<p>%h4. FAX support with SpanDSP<br/>
I have been able to get this to work reliably. If you are running Asterisk 1.6 note <a href="https://issues.asterisk.org/view.php?id=16342" class="external-link" rel="nofollow">Ticket 16342</a> if<br/>
you do not install SpanDSP to the default locations (/usr/include and /usr/lib). T.38 FAX over SIP works<br/>
reliably as well.</p>
<p>There is one build issue with SpanDSP that I need to document (FIXME)</p>
<h3><a name="Asteriskon%28Open%29Solaris-Gotchas"></a>Gotchas</h3>
<h4><a name="Asteriskon%28Open%29Solaris-Runtimeissues"></a>Runtime issues</h4>
<ul>
        <li>WAV and WAV49 files are not written correctly (see <a href="https://issues.asterisk.org/view.php?id=16610" class="external-link" rel="nofollow">Ticket 16610</a>)</li>
        <li>32-bit binaries on Solaris are limited to 255 file descriptors by default. (see <a href="http://developers.sun.com/solaris/articles/stdio_256.html" class="external-link" rel="nofollow">http://developers.sun.com/solaris/articles/stdio_256.html</a>)</li>
</ul>
<h4><a name="Asteriskon%28Open%29Solaris-Buildissues"></a>Build issues</h4>
<ul>
        <li>bootstrap.sh does not correctly detect OpenSolaris build tools (see <a href="https://issues.asterisk.org/view.php?id=16341" class="external-link" rel="nofollow">Ticket 16341</a>)</li>
        <li>Console documentation is not properly loaded at startup (see <a href="https://issues.asterisk.org/view.php?id=16688" class="external-link" rel="nofollow">Ticket 16688</a>)</li>
        <li>Solaris sed does not properly create AEL parser files (see <a href="https://issues.asterisk.org/view.php?id=16696" class="external-link" rel="nofollow">Ticket 16696</a>; workaround is to install GNU sed with SUNWgsed)</li>
        <li>Asterisk's provided install script, install-sh, is not properly referenced in the makeopts file that is generated during the build. One workaround is to install GNU install from the SUNWgnu-coreutils package. (See <a href="https://issues.asterisk.org/view.php?id=16781" class="external-link" rel="nofollow">Ticket 16781</a>)</li>
</ul>
<p>Finally, Solaris memory allocation seems far more sensitive than Linux. This has resulted in the discovery of several previously unknown bugs related to uninitialized variables that Linux handled silently. Note that this means, until these bugs are found and fixed, you may get segfaults.</p>
<p>At the time of this writing I have had a server up and running reasonably stable. However, there are large sections of Asterisk's codebase I do not use and likely contain more of these uninitialized variable problems and associated potential segfaults.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+on+%28Open%29Solaris">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=12550288&revisedVersion=2&originalVersion=1">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+on+%28Open%29Solaris?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>