<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2036/1/7/_/styles/combined.css?spaceKey=TOP&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/TOP/Building+-+Solaris">Building - Solaris</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~dsessions@digium.com">Darren Sessions</a>
</h4>
<br/>
<h4>Changes (21)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >{info}These instructions explain how to build Asterisk SCF on a *fresh* Solaris 10 9/10 installation (Entire Distribution).{info} <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{note}The instructions currently only cover installing Asterisk SCF on SPARC platforms.{note} <br></td></tr>
<tr><td class="diff-unchanged" >h2.Software Requirements <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">* *SPARC* <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">* *SPARC specific* <br></td></tr>
<tr><td class="diff-unchanged" >** Oracle GCC for Sun Systems 4.3.2 <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">* *Intel* <br>** libiconv <br></td></tr>
<tr><td class="diff-unchanged" >* *Common* <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">** GNU coreutils <br></td></tr>
<tr><td class="diff-unchanged" >** git <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">** ZeroC Ice Third-Party-Sources <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">** cmake <br>** LUA <br></td></tr>
<tr><td class="diff-unchanged" >** Boost libraries <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">** lua <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">** ZeroC Ice Third-Party-Sources <br></td></tr>
<tr><td class="diff-unchanged" > <br>h2.Installation <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >rm -rf gcc <br>{noformat} <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">* h6.Intel - libiconv <br></td></tr>
<tr><td class="diff-unchanged" >* h6.Paths <br>{noformat} <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >Now, we need to update our ld library paths. <br>{noformat} <br></td></tr>
<tr><td class="diff-changed-lines" >su root -c "crle -c /var/ld/ld.config -l <span class="diff-changed-words">/lib:/usr/lib:/opt/gcc/lib:/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/opt/gcc/lib/sys<span class="diff-added-chars"style="background-color: #dfd;">:/opt/Ice-3.4.1/lib</span>"</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-changed-lines" >su root -c "crle -64 -c /var/ld/64/ld.config -l <span class="diff-changed-words">/lib/64:/usr/lib/64:/opt/gcc/lib/sparcv9:/opt/csw/lib/sparcv9:/usr/sfw/lib/sparcv9:/opt/gcc/lib/sys:/usr/sfw/lib/64<span class="diff-added-chars"style="background-color: #dfd;">:/opt/Ice-3.4.1/lib64</span>"</span> <br></td></tr>
<tr><td class="diff-unchanged" >{noformat} <br>* h6.git <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >su root -c "gmake NO_TCLTK=1 install" <br>{noformat} <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">* h6.cmake <br>{noformat} <br>cd <br>wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz <br>gunzip -c cmake-2.8.3.tar.gz | /bin/tar xf - <br>cd cmake-2.8.3 <br>./bootstrap <br>gmake <br>su root -c "gmake install" <br>{noformat} <br>* h6.LUA <br>{noformat} <br>cd <br>wget http://www.lua.org/ftp/lua-5.1.4.tar.gz <br>gunzip -c lua-5.1.4.tar.gz | tar xf - <br>cd lua-5.1.4 <br>{noformat} <br>We need to edit the makefile as the default 'install' in Solaris does not support the '-p' option, we'll comment that section out and un-comment the 'cp' section (starting at line 23). Your makefile should look like this: <br>{noformat} <br># How to install. If your install program does not support "-p", then you <br># may have to run ranlib on the installed liblua.a (do "make ranlib"). <br>#INSTALL= install -p <br>#INSTALL_EXEC= $(INSTALL) -m 0755 <br>#INSTALL_DATA= $(INSTALL) -m 0644 <br># <br># If you don't have install you can use cp instead. <br>INSTALL= cp -p <br>INSTALL_EXEC= $(INSTALL) <br>INSTALL_DATA= $(INSTALL) <br>{noformat} <br>Next, we'll build and install LUA. <br>{noformat} <br>gmake solaris install <br>{noformat} <br></td></tr>
<tr><td class="diff-unchanged" >* h6.Boost <br>{noformat} <br>cd <br>wget http://cdnetworks-us-2.dl.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.gz <br></td></tr>
<tr><td class="diff-changed-lines" >gunzip -c boost_1_44_0.tar.gz | <span class="diff-changed-words"><span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">/bin/</span>tar</span> xf - <br></td></tr>
<tr><td class="diff-unchanged" >cd boost_1_44_0 <br>./bootstrap.sh <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >cd slice-plugins <br>cmake . <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">g</span>make</span> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">make install <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">su root -c "gmake install" <br></td></tr>
<tr><td class="diff-unchanged" >cd .. <br>{noformat} <br></td></tr>
<tr><td class="diff-changed-lines" >* h6.Asterisk SCF <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Source</span> <br></td></tr>
<tr><td class="diff-unchanged" >{noformat} <br>cd <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >cd gitall <br>./gitall-asterisk-scf.sh <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">./cmake/init-cmake.sh <br>cmake --build ./build <br></td></tr>
<tr><td class="diff-unchanged" >{noformat} <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">* h6.Build Asterisk SCF <br>{noformat} <br>cd <br>cd gitall <br>/opt/csw/bin/bash ./cmake/init-cmake.sh <br>cd build <br>gmake <br>{noformat} <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>These instructions explain how to build Asterisk SCF on a <b>fresh</b> Solaris 10 9/10 installation (Entire Distribution).</td></tr></table></div>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The instructions currently only cover installing Asterisk SCF on SPARC platforms.</td></tr></table></div>
<h2><a name="Building-Solaris-SoftwareRequirements"></a>Software Requirements</h2>
<ul>
        <li><b>SPARC specific</b>
        <ul>
                <li>Oracle GCC for Sun Systems 4.3.2</li>
        </ul>
        </li>
        <li><b>Common</b>
        <ul>
                <li>GNU coreutils</li>
                <li>git</li>
                <li>cmake</li>
                <li>LUA</li>
                <li>Boost libraries</li>
                <li>ZeroC Ice Third-Party-Sources</li>
        </ul>
        </li>
</ul>
<h2><a name="Building-Solaris-Installation"></a>Installation</h2>
<ul>
        <li><h6><a name="Building-Solaris-SPARCGCCforSunSystems4.3.2"></a>SPARC - GCC for Sun Systems 4.3.2</h6>
<p>The GCC components can be downloaded <a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=GCC-4.3.2-G-F@CDS-CDS_SMI" class="external-link" rel="nofollow">here</a> (login / registration required). You'll need to download both GCC and the 'Sun Code Generator' components into your user directory.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
su root -c "mkdir /opt/gcc; chown -R <USERNAME DIR>:other /opt/gcc"
gunzip -c SUNWgccfss432.tar.gz | tar -xf /opt -
mkdir -p SUNW0scgfss/4.3.2
ln -s /opt/gcc/ SUNW0scgfss/4.3.2/prod
gunzip -c SUNW0scgfss432.tar.gz | tar -xf -
</pre>
</div></div>
<p>Double check that '/opt/gcc/lib/libgcc_s.so.1' and '/opt/gcc/lib/libstdc++.so.6.0.10' files have a byte count greater than zero. If they are zero bytes, you can copy news ones over like this:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
tar -xvf SUNWgccfss432.tar
mv gcc/lib/libgcc_s.so.1 /opt/gcc/lib/
mv gcc/lib/libstdc++.so.6.0.10 /opt/gcc/lib/
rm -rf gcc
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-Paths"></a>Paths</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>su root -c "vi /etc/default/su"
su root -c "vi /etc/default/login"
</pre>
</div></div>
<p>We'll need to edit the PATH and SUPATH environment variables in these two files to look like the ones in the example below. Once you've done this, you'll need to log out and log back in unless you update your path environment manually.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># PATH sets the initial shell PATH variable
#
PATH=/opt/gcc/bin:/usr/local/bin:/usr/sfw/bin:/usr/bin:/opt/csw/bin:/usr/ccs/bin
# SUPATH sets the initial shell PATH variable for root
#
SUPATH=/opt/gcc/bin:/usr/local/bin:/usr/sfw/bin:/usr/bin:/usr/sbin:/opt/csw/bin:/usr/ccs/bin
</pre>
</div></div>
<p>Now, we need to update our ld library paths.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>su root -c "crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/gcc/lib:/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/opt/gcc/lib/sys:/opt/Ice-3.4.1/lib"
su root -c "crle -64 -c /var/ld/64/ld.config -l /lib/64:/usr/lib/64:/opt/gcc/lib/sparcv9:/opt/csw/lib/sparcv9:/usr/sfw/lib/sparcv9:/opt/gcc/lib/sys:/usr/sfw/lib/64:/opt/Ice-3.4.1/lib64"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-git"></a>git</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
wget http://www.kernel.org/pub/software/scm/git/git-1.7.4.tar.gz
gunzip -c git-1.7.4.tar.gz | tar -xf -
cd git-1.7.4
./configure
gmake NO_TCLTK=1
su root -c "gmake NO_TCLTK=1 install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-cmake"></a>cmake</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
gunzip -c cmake-2.8.3.tar.gz | /bin/tar xf -
cd cmake-2.8.3
./bootstrap
gmake
su root -c "gmake install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-LUA"></a>LUA</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
gunzip -c lua-5.1.4.tar.gz | tar xf -
cd lua-5.1.4
</pre>
</div></div>
<p>We need to edit the makefile as the default 'install' in Solaris does not support the '-p' option, we'll comment that section out and un-comment the 'cp' section (starting at line 23). Your makefile should look like this:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># How to install. If your install program does not support "-p", then you
# may have to run ranlib on the installed liblua.a (do "make ranlib").
#INSTALL= install -p
#INSTALL_EXEC= $(INSTALL) -m 0755
#INSTALL_DATA= $(INSTALL) -m 0644
#
# If you don't have install you can use cp instead.
INSTALL= cp -p
INSTALL_EXEC= $(INSTALL)
INSTALL_DATA= $(INSTALL)
</pre>
</div></div>
<p>Next, we'll build and install LUA.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>gmake solaris install
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-Boost"></a>Boost</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
wget http://cdnetworks-us-2.dl.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.gz
gunzip -c boost_1_44_0.tar.gz | tar xf -
cd boost_1_44_0
./bootstrap.sh
./bjam
su root -c "./bjam install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-ZeroCIceThirdPartySources"></a>ZeroC Ice - Third Party Sources</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
wget http://www.zeroc.com/download/Ice/3.4/ThirdParty-Sources-3.4.1.tar.gz
gunzip -c ThirdParty-Sources-3.4.1.tar.gz | /bin/tar xf -
cd ThirdParty-Sources-3.4.1
for x in *.tar.gz; do gzcat $x | tar -xvf -; done
cd db-4.8.30.NC/build_unix
../dist/configure --enable-cxx
gmake
su root -c "gmake install"
cd ../../mcpp-2.7.2
gpatch -p0 < ../mcpp/patch.mcpp.2.7.2
./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared
gmake
su root -c "gmake install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-Digium%27sIceDistribution"></a>Digium's Ice Distribution</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
git clone git://git.asterisk.org/asterisk-scf/release/ice
cd ~/ice/cpp
gmake MCPP_HOME=/usr/local EXPAT_HOME=/usr/sfw OPENSSL_HOME=/usr/sfw DB_HOME=/usr/local/BerkeleyDB.4.8
su root -c "gmake install"
cd ../py
gmake
su root -c "gmake install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-SliceTranslatorPlugins"></a>Slice Translator Plugins</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>git clone git://git.asterisk.org/asterisk-scf/release/slice-plugins
cd slice-plugins
cmake .
gmake
su root -c "gmake install"
cd ..
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris-AsteriskSCF"></a>Asterisk SCF</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>cd
git clone git://git.asterisk.org/asterisk-scf/integration/gitall
cd gitall
./gitall-asterisk-scf.sh
./cmake/init-cmake.sh
cmake --build ./build
</pre>
</div></div></li>
</ul>
</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/TOP/Building+-+Solaris">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=6980010&revisedVersion=33&originalVersion=32">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Building+-+Solaris?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>