Skip to content

Build and Installation

Germán Luis Aracil Boned edited this page Apr 30, 2026 · 10 revisions

Build And Installation

This page documents the normal source build for GABPBX.

Do not edit generated configure or make scripts for a normal build. Use the standard build method.

Base Build

./configure
make menuselect
make
make install

For an already configured tree, this is also valid:

make install

make install builds pending objects first and then installs them.

For first-time lab installs only:

make samples

Be careful: make samples can overwrite existing files under /etc/gabpbx.

Parallel Build

Use lowercase -j:

make -j$(nproc)

Uppercase -J is not the GNU make parallel-build option.

Required Source File: default.exports

default.exports is required by module link rules when GNU ld version scripts are used. The file contains:

{
	local:
		*;
};

The rule in Makefile.rules calls:

build_tools/make_linker_version_script

That helper needs default.exports as the default symbol visibility script. If the file is missing, builds can fail with:

cp: cannot stat '/opt/gabpbx/default.exports': No such file or directory
make[1]: *** [Makefile.rules:134: chan_agent.so] Error 1

The repository must track default.exports. .gitignore should ignore generated *.exports files but explicitly allow the base file:

*.exports
!default.exports

chan_sofia Build

chan_sofia requires Sofia-SIP installed in the layout used by the current make rules:

/usr/local/include/sofia-sip-1.13
/usr/local/lib

Library:

lsofia-sip-ua

Install Sofia-SIP From Source

In the GABPBX development layout, the Sofia-SIP source is normally available beside the GABPBX tree:

../sofia-sip

On this source server the absolute path is:

/home/sources/voip/futurepbx/sofia-sip

Build and install it into /usr/local:

cd ../sofia-sip
./configure --prefix=/usr/local
make
make install
ldconfig

If you are building from another checkout path, replace ../sofia-sip with the real Sofia-SIP source path.

Missing Sofia-SIP Header Error

If Sofia-SIP is not installed, chan_sofia fails like this:

[CC] chan_sofia.c -> chan_sofia.o
chan_sofia.c:120:10: fatal error: sofia-sip/nua.h: No such file or directory
  120 | #include <sofia-sip/nua.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/opt/gabpbx/Makefile.rules:108: chan_sofia.o] Error 1
make: *** [Makefile:369: channels] Error 2

This means the compiler cannot find Sofia-SIP headers. The missing header comes from Sofia-SIP's NUA API:

sofia-sip/nua.h

After installing Sofia-SIP, verify:

test -f /usr/local/include/sofia-sip-1.13/sofia-sip/nua.h
test -f /usr/local/lib/libsofia-sip-ua.so || test -f /usr/local/lib/libsofia-sip-ua.a
ldconfig -p | grep sofia-sip-ua

Then run the normal GABPBX build again:

cd /opt/gabpbx
./configure
make menuselect
make -j$(nproc)
make install

Inside make menuselect, enable chan_sofia before running the final build:

Channel Drivers -> chan_sofia

Runtime rule:

noload => chan_sip.so
load => chan_sofia.so

Do not load chan_sip and chan_sofia together.

Opus Build

codec_opus requires libopus and pkg-config.

Debian/Ubuntu package:

apt install libopus-dev pkg-config

Enable:

Codec Translators -> codec_opus

Verify after startup:

*CLI> module show like opus
*CLI> opus show

Other Common Optional Dependencies

Install only the libraries needed by the modules you select in menuselect. Common useful packages on Debian/Ubuntu:

apt install build-essential pkg-config ncurses-dev libssl-dev zlib1g-dev
apt install libxml2-dev libsqlite3-dev libpq-dev unixodbc-dev
apt install libopus-dev libsrtp2-dev libspandsp-dev
apt install libspeex-dev libspeexdsp-dev

Module mapping:

Dependency Used by
Sofia-SIP source installed to /usr/local chan_sofia
libopus-dev codec_opus
libsrtp2-dev and res_srtp.so SRTP/encryption
libspandsp-dev fax/T.38 support through SpanDSP modules
libpq-dev PostgreSQL realtime/CDR/CEL modules
unixodbc-dev ODBC realtime/CDR/CEL/function modules
libsqlite3-dev SQLite realtime/CDR modules
libspeex-dev, libspeexdsp-dev Speex codec and DSP functions

Useful Build Checks

test -f default.exports
test -d /usr/local/include/sofia-sip-1.13
test -f /usr/local/lib/libsofia-sip-ua.so || test -f /usr/local/lib/libsofia-sip-ua.a
pkg-config --libs opus

Runtime Verification

*CLI> core show version
*CLI> module show
*CLI> module show like sofia
*CLI> module show like opus
*CLI> sip show settings
*CLI> sip show peers

Clone this wiki locally