Building from source

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

Jump to: navigation, search

Contents

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.

Step 1: Installing Dependencies

Option 1: Installing dependencies from binaries

Option 2: Building dependencies from source

Go to Building dependencies for how to build dependencies from source. This is when dependencies for the platform are not available (e.g. 64bit, PowerPC)

Step 2: Downloading from Subversion

Refer to Building as non-root for how to build under a non privileged user.

Unless you have a good reason not to get your source from subversion, this is the recommended approach over building from tarballs only because of the number files you would need to download, build and install in the correct order.

To build the latest code, first download the source (The main sipXecs repository is here). For example, this command downloads to a directory named "sipx".

svn co http://sipxecs.sipfoundry.org/rep/sipXecs/main sipx
or:
svn co http://sipxecs.sipfoundry.org/rep/sipXecs/branches/3.10 sipx

Step 3: Building

This step builds the source and runs all the unit tests. It does not build RPMS. For building RPMs see below. The names and locations of the build(ex. sipx/BUILD) and target(ex. /usr/local/sipx) directories can be chosen at will.

Tip: see Building Tips page for more options here

cd sipx
autoreconf -if
mkdir BUILD
cd BUILD
../configure --cache-file=`pwd`/ac-cache-file SIPXPBXUSER=`whoami`
sudo mkdir -p /usr/local/sipx
sudo chown `whoami`:`whoami` /usr/local/sipx
make build

This will compile all the code, run all the unit tests, and install all the headers, binaries, and configuration files into (ex.)/usr/local/sipx.

Rebuilding

You can do successive builds after modifying source or performing a subversion update with just:

make build

Where next?

NOTE: Because you installed from source and not from RPMS, some system details may be slightly different than documentation you'll read. For example:

  1. Prepend /usr/local/sipx to file paths
  2. Replace user sipx with your username `whoami`

Troubleshooting

Developer Tips includes troubleshooting information for building from source.

Personal tools