Build pjsip on os x lion (10.7)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Benny Prijono <bennylp <at> teluu.com> writes:

>
> On Tue, Jul 26, 2011 at 5:24 AM, Sebastian de Castelberg
> <sebu <at> kpricorn.org> wrote:
> > ImportError: dlopen(<prefix>/lib/python2.7/site-packages/_pjsua.so,
> > 2): Symbol not found: _AudioOutputUnitStart
> > ?Referenced from: <prefix>/lib/python2.7/site-packages/_pjsua.so
> > ?Expected in: dynamic lookup
> >
> > The ?MacPorts version didn't work either. After playing with different
> > python/pjsip versions, I tried the same thing on os x snow leopard
> > (10.6.8). That worked fine.
> >
>
> Somebody else also reported the same problem, so it looks like
> something breaks under 10.7. Unfortunately we can't fix this for now
> since we don't have 10.7 yet.. For a workaround, maybe you can put the
> relevant linker flags in the user.mak, maybe something like
>
> export LDFLAGS += -framework AudioToolbox
>
>  Benny
>
>

FWIW . . This patch works for me with the stock pjproject download and maintains backwards compatibility with older version of OS X. Additionally, I tested the patch on a CentOS 6.0 virtual machine.

--- pjproject-1.12/pjsip-apps/src/python/setup.py	2008-12-23 11:27:53.000000000 -0600
+++ pjproject-1.12/pjsip-apps/src/python/setup.py	2011-11-15 12:53:27.000000000 -0600
@@ -21,6 +21,7 @@
 from distutils.core import setup, Extension
 import os
 import sys
+import platform

 # find pjsip version
 pj_version=""
@@ -58,9 +59,12 @@
 f.close()

 # Mac OS X depedencies
-if sys.platform == 'darwin':
+if platform.system() == 'Darwin':
     extra_link_args = ["-framework", "CoreFoundation",
                        "-framework", "AudioToolbox"]
+    # OS X Lion Support
+    if platform.mac_ver()[0].startswith("10.7"):
+	extra_link_args += ["-framework", "AudioUnit"]
 else:
     extra_link_args = []


References:
http://developer.apple.com/library/mac/#documentation/AudioUnit/Reference/AudioOutputUnitServicesReference/Reference/reference.html



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux