[Freeswitch-dev] OpenBSD compatibility

Nathanael Rensen nathanael at list.polymorpheus.com
Sat Feb 15 10:39:46 MSK 2014

I noticed Brian's request for help with OpenBSD support. I've been using
FreeSWITCH on OpenBSD since 1.0.6 and for my simple soft-switch usage it
works very well.

I have a general question about linking. For the customised versions of
libraries used by FreeSWITCH, I prefer to create libtool convenience
libraries and statically link into libfreeswitch.so or mod_xxx.so rather
than install shared libraries which have the potential to become confused
with OS supplied libraries. Mostly this means replacing lib_LTLIBRARIES
with noinst_LTLIBRARIES in various automake Makefile.am files. For example:

diff --git a/libs/curl/lib/Makefile.am b/libs/curl/lib/Makefile.am
--- a/libs/curl/lib/Makefile.am
+++ b/libs/curl/lib/Makefile.am
@@ -38,7 +38,7 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.r
iscos   \


-lib_LTLIBRARIES = libcurl.la
+noinst_LTLIBRARIES = libcurl.la

 # we use srcdir/include for the static global include files
 # we use builddir/lib for the generated lib/config.h file to get found

Some modification to LIBADD variables is also required to avoid including
the same objects multiple times.

Would the project be receptive to this approach?

Based on this approach and also including various OpenBSD compatibility
fixes I have created demonstration OpenBSD ports for both FreeSWITCH 1.2.22
and the master branch:


Those ports have been tested on OpenBSD-current (5.5-beta). They should
work on OpenBSD 5.5. All default modules are built, excluding mod_v8, but
I have only tested the limited subset I use.

The tarball includes patches against the FreeSWITCH git repo:
	v1.2.stable branch (at 5bddc33113a319825c23201ccd0bd981ff47aed1)
	master branch (at bfd1a5a9dc2949ebd9efbcad098f74201ce1e569).

I have confirmed that FreeSWITCH still compiles with default modules
(including mod_v8) on debian wheezy x86-64 with the master diff applied.

It's an intrusive diff but if the convenience library approach is a bridge
too far then hopefully some of the less intrusive OpenBSD compat bits can
still be cherry picked.


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev mailing list