[Freeswitch-users] FreeSWITCH, OSX, Libtool, Macports

Terry Barnum terry at digital-outpost.com
Wed Jun 20 11:17:07 MSD 2012


On Jun 18, 2012, at 10:26 PM, Daniel O'Connor wrote:

> On 19/06/2012, at 11:01, Terry Barnum wrote:
>>> That said, I had trouble getting the bundled PortAudio working so I mangled the mod_portaudio Makefile.am to use the MP PortAudio and it worked fine.
>> 
>> That's really encouraging. Based on the threads I was reading it looked like people and the devs were saying that FS isn't happy with macports installed.
>> 
>> I've tried installing it on a PPC mac mini running 10.5.8 and an Intel i5 iMac running 10.6.8, both with macports installed. I've forgotten now at what build phase the mac mini failed on (I'm not in front of the machine). The iMac fails during make:
>> 
>> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2 -I/usr/local/src/freeswitch/libs/tiff-3.8.2/libtiff -DNDEBUG -msse2 -std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -DHAVE_VISIBILITY=1 -g -O2 -MT gsm0610_rpe.lo -MD -MP -MF .deps/gsm0610_rpe.Tpo -c gsm0610_rpe.c  -fno-common -DPIC -o gsm0610_rpe.o
>> /var/folders/B7/B7ea9Uvl2RWJ6k+1YxF5D++++TI/-Tmp-//ccF7gvqy.s:58:suffix or operands invalid for `lea'
>> /var/folders/B7/B7ea9Uvl2RWJ6k+1YxF5D++++TI/-Tmp-//ccF7gvqy.s:63:suffix or operands invalid for `movq'
>> Any ideas?
> 
> I have an Intel mac and configured with..
> 
> env CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure
> 
> I am running Lion which uses clang and I think that in this case spandsp doesn't use any asm which is why it probably works.
> 
> I don't know why the asm wouldn't work in your case though.
> 
> You can probably work around it by applying this patch..
> --- a/libs/spandsp/src/gsm0610_rpe.c
> +++ b/libs/spandsp/src/gsm0610_rpe.c
> @@ -59,7 +59,7 @@
> static void weighting_filter(int16_t x[40],
>                              const int16_t *e)      // signal [-5..0.39.44] IN)
> {
> -#if defined(__GNUC__)  &&  defined(SPANDSP_USE_MMX)  &&  defined(__x86_64__)
> +#if 0 && defined(__GNUC__)  &&  defined(SPANDSP_USE_MMX)  &&  defined(__x86_64__)
>     /* Table 4.4   Coefficients of the weighting filter */
>     /* This must be padded to a multiple of 4 for MMX to work */
>     static const union
> @@ -114,7 +114,7 @@ static void weighting_filter(int16_t x[40],
>         : "c" (e), "D" (x), [gsm_H] "X" (gsm_H)
>         : "rax", "rdx", "rsi", "memory"
>     );
> -#elif defined(__GNUC__)  &&  defined(SPANDSP_USE_MMX)  &&  defined(__i386__)
> +#elif 0 && defined(__GNUC__)  &&  defined(SPANDSP_USE_MMX)  &&  defined(__i386__)
>     /* Table 4.4   Coefficients of the weighting filter */
>     /* This must be padded to a multiple of 4 for MMX to work */
>     static const union
> 
> ie disable the asm version and use the C one.

So I tried installing on another Mac, an intel xeon MacPro running 10.6.8 and ran into the problem listed on jira <http://jira.freeswitch.org/browse/FS-3992> where ppc code is getting called instead of x86. I did a fresh git clone, applied your above patch and the jira configure.in.diff patch, used your env configure and it compiled and installed! I'll test it out tomorrow. Thanks for you help.

-Terry




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list