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

Daniel O'Connor darius at dons.net.au
Tue Jun 19 09:26:48 MSD 2012


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.

There are probably other places where you will gave to do this though :(

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C









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