How to build on OSX/Darwin


Tested with OS X 10.4 on iMac PPC 800
Tested with OS X 10.4.8 on and MacBook Pro and G4 PowerBook


You will need to install Apple's Xcode developers tools before trying to compile anything. You can download them from A free membership is required. Or they can be found on any Mac OS X system install disk.

First open a terminal window or enable ssh and login from a remote host.

we will install in /usr/local/
everything will be contained in that directory.

$ sudo mkdir -p /usr/local/

we will download and build everything in our home directory in a newly created directory called "dev"

$ cd ~/
$ mkdir dev
$ cd dev


first download libtiff:

$ curl -O

$ tar zxf tiff-3.8.2.tar.gz
$ cd tiff-3.8.2

$ CFLAGS="-I/usr/local/" LDFLAGS="-L/usr/local/" \
./configure --prefix=/usr/local/
$ make
$ sudo make install


download spandsp-0.0.3pre27.tar.gz

$ cd ~/dev
$ curl -O
$ tar zxf spandsp-0.0.3pre27.tgz
$ cd spandsp-0.0.3/

$ CFLAGS="-I/usr/local/" LDFLAGS="-L/usr/local/" \
./configure --prefix=/usr/local/
$ make
$ sudo make install


(editline has been replaced by readline)

$ cd ~/dev
$ curl -O
$ tar zxf readline-5.2.tar.gz
$ cd readline-5.2

$ CFLAGS="-I/usr/local/" LDFLAGS="-L/usr/local/" \
./configure --prefix=/usr/local/
$ make
$ sudo make install

Create openpbx user and group

To avoid some of the errors in the OpenPBX "make install" step: Do this first:

$ sudo niutil -list / /groups
$ sudo niutil -list / /users
check the lists and pick an unused user and group. (example: 700)

$ sudo niutil -create / /groups/openpbx
$ sudo niutil -createprop / /groups/openpbx gid 700
$ sudo niutil -createprop / /groups/openpbx passwd "*"
$ sudo niutil -createprop / /groups/openpbx users
$ sudo niutil -appendprop / /groups/openpbx users openpbx

$ sudo niutil -create / /users/openpbx
$ sudo niutil -createprop / /users/openpbx uid 700
$ sudo niutil -createprop / /users/openpbx realname "CallWeaver"
$ sudo niutil -createprop / /users/openpbx shell "/bin/bash"
$ sudo niutil -createprop / /users/openpbx gid 700
$ sudo niutil -createprop / /users/openpbx passwd "*"
$ sudo passwd openpbx

this creates the user and group that OpenPBX is looking for, so it
can install the sample configuration in:


Download the main tarball:

$ cd ~/dev
$ curl -O
$ tar zxf
$ cd

$ CFLAGS="-I/usr/local/" LDFLAGS="-L/usr/local/" \
./configure \
--enable-iax-trunking=yes \
--enable-t38=yes \
--prefix=/usr/local/ \
--enable-debug=yes \
--enable-do-crash=yes \
--enable-frame-tracing=yes \
--enable-valgrind=yes \
--enable-debug=yes \
--enable-debug-scheduler=yes \
--enable-stack-backtraces=yes \

NB: The second part, starting from --enable-debug on is optional

$ make
$ sudo make install

If you get and error like: Invalid argument chown: openpbx: that might mean that the user and group named openpbx does not exist

You may need to change the permissions:

$ sudo chown -R openpbx:openpbx /usr/local/
$ sudo chown -R openpbx:openpbx /usr/local/


Let's become root

$ sudo -s

Let's switch to the binary directory

$ cd /usr/local/

and start the openpbx executable

$ ./openpbx

Let's connect to the console

$ ./openpbx -rvvv

NB: If the last command does not work, then start openpbx again
using "./openpbx -c -g" and read the output to see what the problem is

Written by Massimo "CtRiX" Cetra
Updated by Mark Engelhardt to pertain to RC3

More info wiki on | CallWeaver home page | CallWeaver wiki | OpenPBX SVN repository and bugtracker

Created by: STS, Last modification: Thu 04 of Jan, 2007 (07:43 UTC) by coppice
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+