Building from source
From SIPfoundry sipx, The Open Source SIP PBX for Linux - Calivia
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
- Go to Setting up a development environment on Fedora if you are on Fedora, CentOS 5 or RedHat EL5, x86 32-bit
- Go to Setting up a development environment for RHEL4 and CentOS4 if you are building for CentOS4 or RedHat EL4, x86 32-bit.
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?
- Building RPMs - If you want to build RPMS (if you are a developer you probably do not need to build RPMs)
- Installing FTP or TFTP - If you will be provisioning phones.
- SipXecs Start Here - To start configuring your system and network.
- Developer Tips - You a developer? Read this!
NOTE: Because you installed from source and not from RPMS, some system details may be slightly different than documentation you'll read. For example:
- Prepend
/usr/local/sipxto file paths - Replace user
sipxwith your username`whoami`
Troubleshooting
Developer Tips includes troubleshooting information for building from source.
