<html>
<head>
<meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font color="black" face="Courier New"
size="2"><span style="font-size:10.0pt;
font-family:"Courier New";color:black" lang="EN-US">CentOS5.7
include python-2.4.3 by default<br>
<br>
I install python 2.6 from sources by default into
/usr/local/bin/ and change a strings in <br>
<br>
/usr/src/freeswitch.git/libs/esl/python/Makefile<br>
<br>
# more /usr/src/freeswitch.git/libs/esl/python/Makefile<br>
LOCAL_CFLAGS=`/usr/local/bin/python ./python-config
--includes`š <br>
LOCAL_LDFLAGS=`/usr/local/bin/python ./python-config
--ldflags`šš </span></font><br>
<font color="black" face="Courier New" size="2"><span
style="font-size:10.0pt; font-family:"Courier
New";color:black" lang="EN-US">SITE_DIR=$(DESTDIR)/`/usr/local/bin/python
-c "from distutils.sysconfig import get_python_lib; print
get_python_lib()"`š <br>
<br>
and<br>
<br>
#more /usr/src/freeswitch.git/libs/esl/python/python-config<br>
<br>
#!/usr/local/bin/python<br>
<br>
SWIG 2.0.8 is also installed intoš </span></font><font
color="black" face="Courier New" size="2"><span
style="font-size:10.0pt; font-family:"Courier
New";color:black" lang="EN-US">/usr/local/bin/</span></font><font
color="black" face="Courier New" size="2"><span
style="font-size:10.0pt; font-family:"Courier
New";color:black" lang="EN-US">š with configure optionsš
--with-python=/usr/local/bin/python --without-python3
--without-pcre<br>
<br>
<br>
run "make pymod" into /usr/src/freeswitch.git/libs/esl
directory<br>
<br>
Output is<br>
<br>
make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x"
CFLAGS="-I/usr/src/freeswitch.git/libs/esl/src/include
-DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2"
CXXFLAGS="-I/usr/src/freeswitch.git/libs/esl/src/include
-DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC"
CXX_CFLAGS="" -C python<br>
make[1]: Entering directory
`/usr/src/freeswitch.git/libs/esl/python'<br>
g++š -I/usr/src/freeswitch.git/libs/esl/src/include
-DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC
`/usr/local/bin/python ./python-config --includes` -c
esl_wrap.cpp -o esl_wrap.o<br>
g++ -shared -Xlinker -x esl_wrap.o ../libesl.a
`/usr/local/bin/python ./python-config --ldflags` -o _ESL.so
-L.<br>
/usr/bin/ld:
/usr/local/lib/python2.6/config/libpython2.6.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be
used when making a shared object; recompile with -fPIC<br>
/usr/local/lib/python2.6/config/libpython2.6.a: could not read
symbols: Bad value<br>
collect2: ld returned 1 exit status<br>
make[1]: *** [_ESL.so] Error 1<br>
make[1]: Leaving directory
`/usr/src/freeswitch.git/libs/esl/python'<br>
make: *** [pymod] Error 2<br>
<br>
# /usr/bin/ld /usr/local/lib/python2.6/config/libpython2.6.a<br>
/usr/bin/ld: warning: cannot find entry symbol _start; not
setting start address<br>
<br>
# file /usr/local/lib/python2.6/config/libpython2.6.a<br>
/usr/local/lib/python2.6/config/libpython2.6.a: current ar
archive<br>
<br>
<br>
<br>
in what there can be a problem?<br>
<br>
<br>
<br>
Vladislav Grishin<br>
</span></font></div>
<br>
</body>
</html>