[Freeswitch-users] FreeSWITCH, OSX, Libtool, Macports
Terry Barnum
terry at digital-outpost.com
Wed Jun 20 22:53:16 MSD 2012
On Jun 20, 2012, at 1:05 AM, Daniel O'Connor wrote:
> On 20/06/2012, at 3:51, Terry Barnum wrote:
>> So I did a make clean and ran your env line and then make. I think it got further but fails on mod_spandsp_la-mod_spandsp_fax.lo
>>
>> Creating mod_spandsp_la-mod_spandsp_fax.lo
>> quiet_libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../src/include -I../../../../libs/xmlrpc-c -I/usr/local/src/freeswitch/libs/curl/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/opt/local/include -I/usr/local/src/freeswitch/libs/curl/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -Werror -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -DMACOSX -DHAVE_OPENSSL -Wall -std=c99 -pedantic -Wdeclaration-after-statement -I/usr/local/src/freeswitch/libs/spandsp/src -I/usr/local/src/freeswitch/libs/tiff-3.8.2/libtiff -I/usr/local/src/freeswitch/libs/spandsp/src -I/usr/local/src/freeswitch/libs/tiff-3.8.2/libtiff -I. -g -O2 -pipe -no-cpp-precomp -MT mod_spandsp_la-mod_spandsp_fax.lo -MD -MP -MF .deps/mod_s
> pandsp_la-mod_spandsp_fax.Tpo -c mod_spandsp_fax.c -fno-common -DPIC -o .libs/mod_spandsp_la-mod_spandsp_fax.o
>> cc1: warnings being treated as errors
>> mod_spandsp_fax.c: In function 'spanfax_init':
>> mod_spandsp_fax.c:716: warning: passing argument 2 of 'span_log_set_message_handler' from incompatible pointer type
>> mod_spandsp_fax.c:716: error: too many arguments to function 'span_log_set_message_handler'
>> mod_spandsp_fax.c:717: warning: passing argument 2 of 'span_log_set_message_handler' from incompatible pointer type
>> mod_spandsp_fax.c:717: error: too many arguments to function 'span_log_set_message_handler'
>> mod_spandsp_fax.c:772: warning: passing argument 2 of 'span_log_set_message_handler' from incompatible pointer type
>> mod_spandsp_fax.c:772: error: too many arguments to function 'span_log_set_message_handler'
>> mod_spandsp_fax.c:773: warning: passing argument 2 of 'span_log_set_message_handler' from incompatible pointer type
>
> I think this is because you have spandsp installed in MacPorts and those includes are being used in preference to the ones in libs/spandsp/..
>
> I think to work around this I just removed spandsp while I built freeswitch (bleh).
THanks Daniel. Awhile back I was fooling around with the asterisk macport on this work iMac and spandsp-devel is a dependency. I uninstalled the asterisk port long ago but spandsp-devel was still around.
So it's all in one place, to get freeswitch to compile on this intel iMac running 10.6.8 with macports installed, I uninstalled the spandsp-devel macport, did a fresh git clone, ran your patch <http://freeswitch-users.2379917.n2.nabble.com/FreeSWITCH-OSX-Libtool-Macports-td7579970.html#a7580004> to force the use of C in gsm0610_rpe.c, ran the jira patch to correctly select x86 instead of ppc <http://jira.freeswitch.org/browse/FS-3992>, ran bootstrap.sh, used your env CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure and make.
Now on to actually learning to use freeswitch!
> IMO the "right" solution is to rename spandsp in freeswitch - it has been modified (looking at the git log) so it is really a fork of the original. That is unless those patches get merged back into spandsp and then macports can get an updated one.
>
> The later solution is still pretty bad though unless there is a way to force freeswitch to not look at the bundled version.
>
> There is a similar problem with portaudio although since it has a stable API it doesn't show up. It doesn't however build on OSX (Intel 10.7 anyway) and in the end I hacked src/mod/endpoint/mod_portaudio to use pkg-config to find the right CFLAGS and LIBS to link to it.
Forgive my ignorance, does the freeswitch includes of things like spandsp and portaudio have to be set globally or can there be separate configs?
-Terry
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list