我正在运行Freeswitch 1.6和Mac 10.10.5
我的Freeswitch服务器将在AWS中,并且需要在我的本地环境中安装Python ESL模块才能开始使用ESL进行开发。
我无法找到ESL模块。我得到了整个源代码,并尝试仅构建Python库。

我使用了this指令。

git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd /usr/src/freeswitch
./bootstrap.sh -j
./configure
cd /usr/src/freeswitch/libs/esl


当我转到libs/esl文件夹并键入:

make pymod -v


我得到:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0


当我跑步时:

make pymod


我收到此错误:

/Applications/Xcode.app/Contents/Developer/usr/bin/make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/libs/esl/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/libs/libteletone/src -Werror -DMACOSX -DHAVE_OPENSSL" CXXFLAGS="-I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/libs/esl/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/src/include -I/Users/spicyramen/Documents/OpenSource/Development/freeswitch.git/libs/libteletone/src -fPIC" CXX_CFLAGS="" -C python
c++ -shared -Xlinker -x esl_wrap.o .././.libs/libesl.a `python ./python-config --ldflags` -o _ESL.so -L.
ld: internal error: atom not found in symbolIndex(__ZN24SWIG_Python_Thread_Allow3endEv) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [_ESL.so] Error 1
make: *** [pymod] Error 2


在我的Makefile中,我有:

PYTHON = /Users/spicyramen/anaconda/bin/python
PYTHON_CFLAGS = -I/Users/spicyramen/anaconda/include/python2.7 -I/Users/spicyramen/anaconda/include/python2.7 -fno-strict-aliasing -I/Users/spicyramen/anaconda/include  -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
PYTHON_LDFLAGS = -L/Users/spicyramen/anaconda/lib -ldl -framework CoreFoundation -lpython2.7
PYTHON_SITE_DIR = /Users/spicyramen/anaconda/lib/python2.7/site-packages

最佳答案

以下解决方案为我解决了问题:

来自https://freeswitch.org/jira/browse/ESL-92

Mac OS X post Mavericks附带的ld命令中有一个错误,由于该错误,“-x”标志会去除多余的符号。该错误在-x link flag causing link errors on Mac OSX 10.9 (bug?)中进行了描述(我已在https://llvm.org/bugs/show_bug.cgi?id=23337上游提交了故障单)。

解决方法:

链接_ESL.so时删除“ -x”标志

cd libs/esl
sed -i '' 's/\(SOLINK = .*\)-x/\1/p' Makefile
make pymod

关于python - 适用于ESL python的Freeswitch 1.6安装,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38072591/

10-12 18:04