<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/2030/1/7/_/styles/combined.css?spaceKey=TOP&amp;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+%28WIP%29">Building - Solaris (WIP)</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~dlee">David M. Lee</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        Make use of su -c<br />
    </div>
        <br/>
                         <h4>Changes (20)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >We need to enable gpg in the pkgutil configuration file. <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;vi /etc/opt/csw/pkgutil.conf&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># vi /etc/opt/csw/pkgutil.conf <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>Make sure that the gpg and md5 lines are NOT commented out and save. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >We need to grab a new catalog. <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;/opt/csw/bin/pkgutil --catalog&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># /opt/csw/bin/pkgutil --catalog <br>exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>Lastly, we&#39;ll need to edit the PATH to add support for packages we install. Edit both the &#39;/etc/default/su&#39; and the &#39;/etc/default/login&#39; files and add &#39;/opt/csw/bin&#39;, &#39;/usr/sfw/bin&#39;, &#39;/usr/ccs/bin&#39;, and &#39;/usr/local/bin&#39; to the PATH and SUPATH variables. Once you&#39;ve done this, you&#39;ll need to log out and log back in unless you update the variables manually. They should look something like this: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* h6.GCC, CMake, LUA, wget, gmake, python <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;pkgutil --install gcc4 cmake lua wget gmake python&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># pkgutil --install gcc4 cmake lua wget gmake python <br># exit <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" >$ wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/openssl-1.0.0a-sol10-sparc-local.gz <br>$ gunzip *.gz <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;pkgadd -d git-1.7.2-sol10-sparc-local&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># pkgadd -d git-1.7.2-sol10-sparc-local; exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>and for x86 systems: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >$ wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssl-1.0.0a-sol10-x86-local.gz <br>$ gunzip *.gz <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;pkgadd -d git-1.7.2-sol10-x86-local&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># pkgadd -d git-1.7.2-sol10-x86-local; exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>Now, we need to update our library paths. <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/csw/lib:/usr/local/lib:/opt/Ice-3.4.1/lib&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/csw/lib:/usr/local/lib:/opt/Ice-3.4.1/lib; exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>* h6.Boost Libraries <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >$ ./bootstrap.sh <br>$ ./bjam <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;./bjam install&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># ./bjam install <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>* h6.Ice Third Party Sources <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >$ ../dist/configure --enable-cxx <br>$ gmake <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;gmake install&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># gmake install; exit <br></td></tr>
            <tr><td class="diff-unchanged" >$ cd ../../mcpp-2.7.2 <br>$ gpatch -p0 &lt; ../mcpp/patch.mcpp.2.7.2 <br>$ ./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared <br>$ gmake <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;gmake install&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># gmake install; exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>* h6.Digium&#39;s Ice Distribution <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >$ cd ../py <br>$ gmake <br></td></tr>
            <tr><td class="diff-changed-lines" >$ su <span class="diff-added-words"style="background-color: #dfd;">root -c &quot;gmake install&quot;</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"># gmake install; exit <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br>* h6.Asterisk SCF Source <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="Building-Solaris%28WIP%29-Thisdocisaworkinprogress"></a>This doc is a work in progress</h1>
<h2><a name="Building-Solaris%28WIP%29-Preface"></a>Preface</h2>
<p>These instructions explain how to build Asterisk SCF on a clean, patched, basic Solaris 10 installation as a non-root user.</p>

<h2><a name="Building-Solaris%28WIP%29-SoftwareRequirements"></a>Software Requirements</h2>

<ul>
        <li>Blastwave Repository - <a href="http://www.blastwave.org/jir/blastwave.fam" class="external-link" rel="nofollow">http://www.blastwave.org/jir/blastwave.fam</a></li>
        <li>Git - <a href="http://sunfreeware.com" class="external-link" rel="nofollow">http://sunfreeware.com</a></li>
        <li>Ice Third Party Sources - <a href="http://www.zeroc.com/download.html" class="external-link" rel="nofollow">http://www.zeroc.com/download.html</a></li>
        <li>Boost Libraries - <a href="http://www.boost.org/doc/libs/1_44_0/more/getting_started/unix-variants.html" class="external-link" rel="nofollow">http://www.boost.org/doc/libs/1_44_0/more/getting_started/unix-variants.html</a></li>
        <li>LUA - <a href="http://www.lua.org/" class="external-link" rel="nofollow">http://www.lua.org/</a></li>
        <li>pjsip - <a href="http://www.pjsip.org/download.htm" class="external-link" rel="nofollow">http://www.pjsip.org/download.htm</a></li>
</ul>


<h2><a name="Building-Solaris%28WIP%29-Installation"></a>Installation</h2>
<ul>
        <li><h6><a name="Building-Solaris%28WIP%29-BlastwaveRepository"></a>Blastwave Repository</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ su
# pkgadd -d http://download.blastwave.org/csw/pkgutil_`/sbin/uname -p`.pkg
/opt/csw/bin/pkgutil --catalog 
/opt/csw/bin/pkgutil --install gnupg textutils
# exit
</pre>
</div></div>
<p>Use gpg directly to fetch the Blastwave repository digital key from the MIT key server:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ /opt/csw/bin/gpg --keyserver pgp.mit.edu --recv-keys A1999E90
gpg: directory `/export/home/digium/.gnupg' created
gpg: new configuration file `/export/home/digium/.gnupg/gpg.conf' created
gpg: WARNING: options in `/export/home/digium/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/export/home/digium/.gnupg/secring.gpg' created
gpg: keyring `/export/home/digium/.gnupg/pubring.gpg' created
gpg: requesting key A1999E90 from hkp server pgp.mit.edu
gpg: /export/home/digium/.gnupg/trustdb.gpg: trustdb created
gpg: key A1999E90: public key "€œBlastwave Software (Blastwave.org Inc.) &lt;software@blastwave.org&gt;"€ imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
</pre>
</div></div>
<p>Check to make sure you have the Blastwave repository key properly installed:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ /opt/csw/bin/gpg --list-keys
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: checking the trustdb
gpg: no ultimately trusted keys found
/export/home/digium/.gnupg/pubring.gpg
--------------------------------------
pub   1024D/A1999E90 2008-08-17 [expires: 2011-08-17]
uid                  Blastwave Software (Blastwave.org Inc.) &lt;software@blastwave.org&gt;
sub   2048g/E4845389 2008-08-17 [expires: 2011-08-17]
</pre>
</div></div>
<p>We need to mark the key as being trusted now by selecting 'trust' at the command prompt, selecting option #5, and then exiting.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ /opt/csw/bin/gpg --edit-key A1999E90
gpg (GnuPG) 1.4.10; Copyright (C) 2008 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: please see http://www.gnupg.org/faq.html for more information

pub  1024D/A1999E90  created: 2008-08-17  expires: 2011-08-17  usage: SC  
                     trust: full          validity: unknown
sub  2048g/E4845389  created: 2008-08-17  expires: 2011-08-17  usage: E   
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) &lt;software@blastwave.org&gt;

Command&gt; Trust
pub  1024D/A1999E90  created: 2008-08-17  expires: 2011-08-17  usage: SC  
                     trust: full          validity: unknown
sub  2048g/E4845389  created: 2008-08-17  expires: 2011-08-17  usage: E   
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) &lt;software@blastwave.org&gt;

Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

  1 = I don't know or won't say
  2 = I do NOT trust
  3 = I trust marginally
  4 = I trust fully
  5 = I trust ultimately
  m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
                                                             
pub  1024D/A1999E90  created: 2008-08-17  expires: 2011-08-17  usage: SC  
                     trust: ultimate      validity: unknown
sub  2048g/E4845389  created: 2008-08-17  expires: 2011-08-17  usage: E   
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) &lt;software@blastwave.org&gt;
Please note that the shown key validity is not necessarily correct
unless you restart the program.

Command&gt; quit
</pre>
</div></div>
<p>We need to enable gpg in the pkgutil configuration file.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ su root -c "vi /etc/opt/csw/pkgutil.conf"
</pre>
</div></div>
<p>Make sure that the gpg and md5 lines are NOT commented out and save.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>use_gpg=true
use_md5=true
</pre>
</div></div>
<p>;<br/>
We need to grab a new catalog.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ su root -c "/opt/csw/bin/pkgutil --catalog"
</pre>
</div></div>
<p>Lastly, we'll need to edit the PATH to add support for packages we install. Edit both the '/etc/default/su' and the '/etc/default/login' files and add '/opt/csw/bin', '/usr/sfw/bin', '/usr/ccs/bin', and '/usr/local/bin' to the PATH and SUPATH variables. Once you've done this, you'll need to log out and log back in unless you update the variables manually. They should look something like this:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># PATH sets the initial shell PATH variable
#
PATH=/usr/bin:/opt/csw/bin:/usr/sfw/bin:/usr/ccs/bin

# SUPATH sets the initial shell PATH variable for root
#
SUPATH=/usr/sbin:/usr/bin:/opt/csw/bin:/usr/sfw/bin:/usr/ccs/bin
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-GCC%2CCMake%2CLUA%2Cwget%2Cgmake%2Cpython"></a>GCC, CMake, LUA, wget, gmake, python</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ su root -c "pkgutil --install gcc4 cmake lua wget gmake python"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-Git"></a>Git</h6>
<p>For sparc systems:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ cd ~
$ wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/git-1.7.2-sol10-sparc-local.gz
$ wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/openssl-1.0.0a-sol10-sparc-local.gz
$ gunzip *.gz
$ su root -c "pkgadd -d git-1.7.2-sol10-sparc-local"
</pre>
</div></div>
<p>and for x86 systems:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ cd ~
$ wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/git-1.7.2-sol10-x86-local.gz
$ wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/openssl-1.0.0a-sol10-x86-local.gz
$ gunzip *.gz
$ su root -c "pkgadd -d git-1.7.2-sol10-x86-local"
</pre>
</div></div>
<p>Now, we need to update our 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/csw/lib:/usr/local/lib:/opt/Ice-3.4.1/lib"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-BoostLibraries"></a>Boost Libraries</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 boost_1_44_0.tar.gz
$ tar -xvf boost_1_44_0.tar
$ cd boost_1_44_0
$ ./bootstrap.sh
$ ./bjam
$ su root -c "./bjam install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-IceThirdPartySources"></a>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 -d ThirdParty-Sources-3.4.1.tar.gz
$ tar -xvf Downloads/ThirdParty-Sources-3.4.1.tar
$ 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 &lt; ../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%28WIP%29-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 DB_HOME=/usr/local/BerkeleyDB.4.8 MCPP_HOME=/usr/local ICONV_HOME=/opt/csw BZIP2_HOME=/opt/csw
# gmake install; exit
$ cd ../py
$ gmake
$ su root -c "gmake install"
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-AsteriskSCFSource"></a>Asterisk SCF Source</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
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-PJSipSource"></a>PJSip Source</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ cd ~/gitall
$ wget http://www.pjsip.org/release/1.8/pjproject-1.8.tar.bz2
$ bunzip2 pjproject-1.8.tar.bz2
$ tar -xvf pjproject-1.8.tar
$ mv pjproject-1.8 pjproject
</pre>
</div></div></li>
        <li><h6><a name="Building-Solaris%28WIP%29-BuildAsteriskSCF"></a>Build Asterisk SCF</h6>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>$ cd ~
$ cd gitall
$ /opt/csw/bin/bash ./cmake/init-cmake.sh
$ cd build
$ gmake
</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+%28WIP%29">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=6980010&revisedVersion=14&originalVersion=13">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/TOP/Building+-+Solaris+%28WIP%29?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>