<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>
        instead of gunzip, pipe gzcat directly into tar<br />
    </div>
        <br/>
                         <h4>Changes (2)</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" >$ tar -xvf Downloads/ThirdParty-Sources-3.4.1.tar <br>$ cd ThirdParty-Sources-3.4.1 <br></td></tr>
            <tr><td class="diff-changed-lines" >$ for x in *.tar.gz; do <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">gunzip -d $x;</span> <span class="diff-added-words"style="background-color: #dfd;">gzcat $x | tar -xvf -;</span> done <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">$ for x in *.tar; do tar -xvf $x; done <br></td></tr>
            <tr><td class="diff-unchanged" >$ cd db-4.8.30.NC/build_unix <br>$ ../dist/configure --enable-cxx <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
# 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
# /opt/csw/bin/pkgutil --catalog
exit
</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
# pkgutil --install gcc4 cmake lua wget gmake python
# exit
</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
# pkgadd -d git-1.7.2-sol10-sparc-local; exit
</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
# pkgadd -d git-1.7.2-sol10-x86-local; exit
</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
# crle -c /var/ld/ld.config -l /lib:/usr/lib:/opt/csw/lib:/usr/local/lib:/opt/Ice-3.4.1/lib; exit
</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
# ./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
# gmake install; exit
$ cd ../../mcpp-2.7.2
$ gpatch -p0 &lt; ../mcpp/patch.mcpp.2.7.2
$ ./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared
$ gmake
$ su
# gmake install; exit
</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
# gmake install; exit
</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=13&originalVersion=12">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>