HowTo build sipX with SunStudio on Solaris 10

From SIPfoundry sipx, The Open Source SIP PBX for Linux - Calivia

Jump to: navigation, search

Contents

[edit] sipX Build environment on Solaris 10

HowTo setup the build environment for sipX on Solaris 10. See also HowTo_build_sipX_with_GCC_on_Solaris_10. Please note that the configure lines in the examples assume you are utilising the blastwave packages. This works with the Main repository, so hopefully it will continue working for all of 3.5 and 4.0.

[edit] Reference

[edit] Compiler

[edit] Java J2SDK

  • Sun J2SDK 1.5 comes with Solaris 10 (installed into /usr/jdk)
export JAVA_HOME=/usr/jdk/instances/jdk1.5.0

[edit] Build dependencies

Download SFW packages from Sun Freeware for Solaris 10

  • ginstall [SFWgfile - fileutils 4.1)
  • gsed (SFWsed - sed 3.02)
  • libtool (SFWltool - libtool 1.5.2)
  • automake (SFWamake - automake 1.8.3)
  • autoconf (SFWaconf - autoconf 2.59)
  • gawk (SFWgawk - gawk 3.0.6)
  • gm4 (SFWgm4 - m4 1.4)

for blastwave that would be: fileutils (contains ginstall), gsed, libtool, automake, autoconf, gawk and gm4


[edit] make

  • Install GNU make from sunfreeware.com x86 SPARC

Or from Blastwave using pkg-get -i gmake

If your PATH is correct, autotools should find required GNU make before Sun make. Create a softlink if autotools has problems finding gmake (ln -s /opt/csw/bin/gmake /opt/csw/bin/make [for the blastwave package])


BE SURE TO NOT CHANGE YOUR PATH AND OTHER ENVIRONMENT SETTINGS BETWEEN COMPILING AND INSTALLING MODULES !!!!!!


[edit] ruby, rake

[edit] sunfreeware

  • ruby (SFWruby - ruby 1.6.4)

[edit] blastwave

ruby is available from blastwave

/opt/csw/bin/pkg-get -i ruby rubygems
/opt/csw/bin/gem install rake --no-rdoc

[edit] cppunit

cppunit needs to be built as it is not available as a binary package for Solaris 10.

Code: build cppunit
./configure \
  CC=cc \
  CXX=CC \
  CXXFLAGS="-mt -xtarget=generic -g -features=no%transitions -xildoff" \
  LD=CC \
  LDFLAGS=-xildoff 

make
make install

[edit] junit

Code: Install junit

We need junit for the Java tests. Junit is available from blastwave.org

/opt/csw/bin/pkg-get -i junit

[edit] ant

Code: Install ant

We need ant-1.6.5, currently only available from blastwave.org (required option '-e' is not available below ant-1.6.5):

/opt/csw/bin/pkg-get -i ant

export ANT_HOME=/opt/csw/lib/ant
# make sure ant finds junit
cd $ANT_HOME && ln -s /opt/csw/share/java/junit.jar junit.jar

[edit] openssl

  • Is provided by Solaris 10 and OpenSolaris in /usr/sfw
  • Self install usually goes into /usr/local/ssl

[edit] Subversion

  • Download and install from sunfreeware.com x86 SPARC
  • Depends on:
    • apache-2.0.54
    • openssl
    • db-4.2.52.NC
    • expat-1.95.5
    • gdbm-1.8.3
    • libiconv-1.8
    • libxml2-2.6.4
    • zlib-1.2.3
    • libgcc-3.3
  • Installs in: /usr/local
Code: Install Subversion (x86)
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/subversion-1.2.3-sol10-x86-local.gz
gunzip subversion-1.2.3-sol10-x86-local.gz
pkgadd -d subversion-1.2.3-sol10-x86-local
Code: Install (SPARC)
wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/subversion-1.2.3-sol10-sparc-local.gz
gunzip subversion-1.2.3-sol10-sparc-local.gz
pkgadd -d subversion-1.2.3-sol10-sparc-local

If you prefer Blastwave packages the install process will be:

Code: Install (same for SPARC as for x86)
/opt/csw/bin/pkg-get -i subversion

[edit] unixODBC

Code: Install unixODBC from blastwave
/opt/csw/bin/pkg-get -i unixodbc

[edit] Dependencies

[edit] PCRE

[edit] PCRE 4.5

  • pcre (SFWpcre - pcre 4.5.0) x86 SPARC
  • Depends on SFWgcmn, SFWgcc34l

or just install with pkg-get -i pcre from blastwave

[edit] PCRE > 4.5

  • pcre >4.5 needs to be compiled as it is not available as a binary package for Solaris 10

[edit] Xerces-C

  • Install from blastwave.org
  • Installs into: /opt/csw
/opt/csw/bin/pkg-get -i xerces_c

[edit] libwww

  • Install from blastwave.org
  • Installs into: /opt/csw
/opt/csw/bin/pkg-get -i libwww

[edit] Environment

  • Make sure that /opt/SUNWspro is in the path before every other c compiler containing directory
  • Make sure NOT to have /usr/ucb in your path
Code: Environment
export PATH=/usr/bin:/opt/SUNWspro/bin:/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/opt/csw/bin
export P=/opt/SFDsipx
export wwwdir=$P/www
export SIPXPBXUSER=sipxpbx
export JAVA_HOME=/usr/jdk/instances/jdk1.5.0
export ANT_HOME=/opt/csw/lib/ant

[edit] Build

[edit] sipXportLib

Code: Build sipXportLib
autoreconf -i -f
./configure \
  --prefix=$P \
  --with-cppunit-prefix=/usr/local \
  --with-pcre=/opt/csw \
  --with-openssl=/usr/sfw \
  --enable-sip-tls

make
make check
make install

[edit] sipXtackLib

  • BIND named is required for unittests but is an integral part of Solaris
  • --disable-sipviewer to build without sipviewer
Code: Build sipXtackLib
autoreconf -i -f
./configure \
  --prefix=$P \
  --with-cppunit-prefix=/usr/local \
  --with-pcre=/opt/csw \
  --with-openssl=/usr/sfw \
  --enable-sip-tls \
  --with-sipxportinc=$P/include \
  --with-sipxportlib=$P/lib \
  --with-named=/usr/sbin/named

make
make check
make install

[edit] sipXcommserverLib

Code: Build sipXcommserverLib
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --with-xerces=/opt/csw \
   --with-odbc=/opt/csw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib

make
make check
make install

[edit] sipXmediaLib

Code: Build sipXmediaLib
autoreconf -i -f
./configure \
  --prefix=$P \
  --with-cppunit-prefix=/usr/local \
  --with-pcre=/opt/csw \
  --with-openssl=/usr/sfw \
  --enable-sip-tls \
  --with-sipxportinc=$P/include \
  --with-sipxportlib=$P/lib \
  --with-sipxtackinc=$P/include \
  --with-sipxtacklib=$P/lib

make
LD_LIBRARY_PATH=/usr/sfw/lib make check
make install

[edit] sipXmediaAdapterLib

Code: Build sipXmediaAdapterLib
autoreconf -i -f
./configure \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --prefix=$P \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxmediainc=$P/include \
   --with-sipxmedialib=$P/lib

make
make check
make install

[edit] sipXcallLib

Code: Build sipXcallLib
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --with-xerces=/opt/csw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxmediainc=$P/include \
   --with-sipxmedialib=$P/lib \
   --with-sipxmediaadapterinc=$P/include \
   --with-sipxmediaadapterlib=$P/lib

make
make check
make install

[edit] sipXpublisher

Code: Build sipXpublisher
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxcommserverinc=$P/include \
   --with-sipxcommserverlib=$P/lib \
   --with-sipxcommservertest=$P/lib

make
make check
make install

[edit] sipXregistry

Code: Build sipXregistry
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxcommserverinc=$P/include \
   --with-sipxcommserverlib=$P/lib \
   --with-sipxcommservertest=$P/lib

make
make check
make install

[edit] sipXproxy

Code: Build sipXproxy
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxcommserverinc=$P/include \
   --with-sipxcommserverlib=$P/lib \
   --with-sipxcommservertest=$P/lib \
   --with-odbc=/opt/csw

make
make check
make install

[edit] sipXvxml

  • libwww
  • xerces_c
Code: Build sipXvxml
autoreconf -i -f
./configure \
   --prefix=$P \
   --with-cppunit-prefix=/usr/local \
   --with-pcre=/opt/csw \
   --with-openssl=/usr/sfw \
   --enable-sip-tls \
   --with-sipxportinc=$P/include \
   --with-sipxportlib=$P/lib \
   --with-sipxtackinc=$P/include \
   --with-sipxtacklib=$P/lib \
   --with-sipxmediainc=$P/include \
   --with-sipxmedialib=$P/lib \
   --with-sipxcallinc=$P/include \
   --with-sipxcalllib=$P/lib \
   --with-libwww=/opt/csw \
   --with-xerces=/opt/csw

make
make check
make install

[edit] sipXconfig

Code: Build sipXconfig
autoreconf -i -f
ANT=/opt/csw/bin/ant \
ANT_HOME=/opt/csw/lib/ant \
JUNIT_HOME=/usr/jdk/sha/opt/csw/share/java/junit-4.0.jar \
./configure \
  --prefix=$P \
  --enable-ruby-bindings

make
make check
make install

[edit] sipXpbx

[edit] mod_cplusplus

  • Remove -Wall and -Werror from the Makefile
  • Header files are not installed by make install
Code: Build mod_cplusplus
./autogen.sh \
  --with-apxs=/usr/apache2/bin/apxs

make
make install
cp include/*.h /usr/apache2/include/

[edit] cgicc

  • Install into /usr/local (so that cgicc-config gets installed in a dir in our PATH)
Code: Build cgicc
wget ftp://ftp.cgicc.org/archives/cgicc-3.2.2.tar.gz

Version 3.2.3 has problems with the SUN Compiler so please use 3.2.2

autoreconf -i -f
./configure \
  --prefix=/usr/local \
  --enable-demos=no

make
make install
Code: Build sipXpbx
autoreconf -i -f
CPPFLAGS="-I/usr/local/include" \
./configure \
  --prefix=$P \
  --with-apache-include=/usr/apache2/include \
  --with-apr=/usr/apache2/include \
  --with-apache-modules=/usr/apache2/libexec \
  --with-apache-httpd=/usr/apache2/bin/httpd \
  --with-apache-apxs=/usr/apache2/bin \
  --with-apache-home=/var/apache2 \
  --with-mod_cplusplus=/usr/apache2/include \
  --with-cgicc=/usr/local \
  --with-pcre=/opt/csw \
  --with-openssl=/usr/sfw \
  --with-sipxportinc=$P/include \
  --with-sipxportlib=$P/lib \
  --with-sipxtackinc=$P/include \
  --with-sipxtacklib=$P/lib \
  --with-sipxcommserverinc=$P/include \
  --with-sipxcommserverlib=$P/lib \
  --with-sipxcommservertest=$P/lib \
  --with-sipxmediainc=$P/include \
  --with-sipxmedialib=$P/lib \
  --with-sipxcallinc=$P/include \
  --with-sipxcalllib=$P/lib

[edit] Progress

Package Status
sipXportlib build ok, checks fail, XPL-154 implementation of getdomainname
sipXtackLib build ok, checks fail (seem to be lookup tests that are basically buggy)
sipXmediaLib build ok, check ok
sipXmediaAdapterLib build ok
sipXcommserverLib build ok, checks ok
sipXcallLib build ok, checks ok (after getting rid of the tapi stuff)
sipXproxy build ok, checks ok
sipXpublisher build ok
sipXregistry build ok, checks ok
sipXconfig build ok, checks ok
sipXvxml build ok
sipXpbx build ok, checks ok

Currently we are working on the configure scripts, plus independance of blastwave because the isolated run of the blastwave packages creates a lot of problems with double linkage of libssl etc.

Personal tools