Building dependencies

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

Jump to: navigation, search

Contents

NOTE

  • You only need to build dependencies if you cannot find the dependencies prebuilt for you on SIPfoundry.
  • This document is for Fedora, RHEL, CentOS and SuSE.
  • Only a few dependencies are not part of the standard distribution.
   - Fedora Core 6, 7, and 8: java-sun, cgicc, ruby-dbi
   - Red Hat 5 / CentOS 5: w3c-libwww, xerces-c, rubygems, ruby-postgres, cgicc, java-sun
   - SuSE 10.2 and 10.3: none

Note: Java-1.7 (icetea) included with Fedora 8 does not yet work with sipXecs.

Prerequisites

You should build under a non-priviledged user (not root). Refer to Building as non-root on how to setup the environment to enable this.

Checkout Build Scripts

The build scripts are included in the sipXecs source and contained in the lib directory. If you haven't already done so check out the source for sipXecs:

svn co http://sipxecs.sipfoundry.org/rep/sipXecs/main

Download Java

Note: This is only required for Fedora, Red Hat 4/5 and CentOS 4/5. Other distributions (eg. SUSE 10.x, Ubuntu) provide Sun Java as part of the standard repository.


The sipXecs project build system requires sun-java-1.5.0 Update 10, but the recommended version is JDK 6 Update 6.

Go to JDK 6 Update 6 and download the JDK 6.0 Update *.bin (not the file containing the rpm, but the self-extracting one) file.

Create the following directory and copy the downloaded file into it.

~/libsrc/java-sun/

Note: For builds on PowerPC (PPC) use the IBM Java version.

Building dependencies using distro-specific make targets

The Makefile included in the lib directory includes pre-defined targets for the different distributions. While it is convenient to use these, you can also go into a directory for a specific dependency and run autoconf and configure commands there.

cd ~/lib
make <distro>

where <distro> is in fc5, fc6, fc7, fc8, centos5, rhel5. NOTE: java-sun is installed from the SUSE non-free repository.

Legacy: RHEL 4 and CentOS 4:
sudo up2date --install postgresql-devel         
sudo up2date --install readline-devel ncurses-devel gdbm-devel tcl-devel tk-devel byacc xorg-x11-devel emacs
./configure --enable-rhe4 --with-distdir=`pwd`/../dist --cache-file=/tmp/ac-cache-file 
make rpm

NOTE: The build will die on ruby-abi on RHEL 4/CentOS 4. You will need to install the freshly built ruby rpm's so that it can continue (use the rpm -i command to install ruby, ruby-devel and ruby-libs from dist/RPM). The additional dependencies listed above are required to build ruby (what a strange list, but they are all needed..). The version of ruby included with RHEL4 / CentOS4 is 1.8.1, but sipX needs at least 1.8.4. That's why it needs to be built from source.


Create local yum repository

Create a file local.repo in the lib directory as follows:

File: local.repo
[local]
name=sipXecs local
baseurl=file:///<absolute path>/main/dist/RPM
enabled=1
gpgcheck=0

Install Dependencies

Look in ../dist/RPM to see what RPMs just got built. Install them using yum from the local repository (or use the rpm -i command. E.g. run:

sudo yum -c local.repo install cgicc-devel java-1.5.0-sun-devel ruby-dbi jain-sip

yum will search both local repository and system repositories to find each dependency

Image:Redhat.jpeg Image:Centos-little.png For CentOS4 and RHEL4 systems, ensure the correct w3c-libwww w/SSL gets installed

  sudo yum -c local.repo --disablerepo=base install sipx-w3c-libwww-devel jain-sip

Where next?

Building from source

Personal tools