[Freeswitch-users] mod_python

Gilbert T. Gutierrez, Jr. mailing-lists at phoenixinternet.net
Sat Aug 18 02:58:19 MSD 2012


Hello List!
You will have to excuse me if this has been answered before, but I am 
having an issue compiling mod_python. At the end of my message is my 
output. I am running Centos 6 x64 and following the instructions from 
FreePyBX (I want to see and test the interface). I have successfully 
compiled FreeSwitch on Centos6 before but in this instance, FreePyBX 
requests that I use Python 2.7.3 in their instructions. I have even 
tried including '--enable-shared' in my Python compilation with the same 
results when I compile FreeSwitch. Can someone help me on getting past 
this error?

Thank you,
Gilbert T. Gutierrez, Jr.

making all mod_python
Compiling freeswitch_python.cpp...
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /usr/include/python2.7/Python.h:8,
                  from freeswitch_python.h:5,
                  from freeswitch_python.cpp:3:
/usr/include/python2.7/pyconfig.h:1161:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from /usr/include/stdlib.h:25,
                  from /usr/local/src/freeswitch/src/include/switch.h:76,
                  from freeswitch_python.cpp:2:
/usr/include/features.h:162:1: warning: this is the location of the 
previous definition
In file included from /usr/include/python2.7/Python.h:8,
                  from freeswitch_python.h:5,
                  from freeswitch_python.cpp:3:
/usr/include/python2.7/pyconfig.h:1183:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                  from /usr/local/src/freeswitch/src/include/switch.h:76,
                  from freeswitch_python.cpp:2:
/usr/include/features.h:164:1: warning: this is the location of the 
previous definition
freeswitch_python.cpp: In member function âvirtual switch_status_t 
PYTHON::Session::run_dtmf_callback(void*, switch_input_type_t)â:
freeswitch_python.cpp:287: warning: deprecated conversion from string 
constant to âchar*â
freeswitch_python.cpp:302: warning: deprecated conversion from string 
constant to âchar*â
freeswitch_python.cpp:304: warning: deprecated conversion from string 
constant to âchar*â
Compiling mod_python_wrap.cpp...
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
mod_python_wrap.cpp: In function âPyObject* _wrap_new_Stream(PyObject*, 
PyObject*)â:
mod_python_wrap.cpp:4178: warning: âargv[0]â may be used uninitialized 
in this function
Compiling 
/usr/local/src/freeswitch/src/mod/languages/mod_python/mod_python.c...
quiet_libtool: compile:  gcc -I/usr/include/python2.7 
-I/usr/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes 
-I/usr/local/src/freeswitch/libs/curl/include 
-I/usr/local/src/freeswitch/src/include 
-I/usr/local/src/freeswitch/src/include 
-I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -Werror 
-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g 
-ggdb -DHAVE_OPENSSL -g -O2 -Wall -std=c99 -pedantic 
-Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c 
/usr/local/src/freeswitch/src/mod/languages/mod_python/mod_python.c 
-fPIC -DPIC -o .libs/mod_python.o
quiet_libtool: compile:  gcc -I/usr/include/python2.7 
-I/usr/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes 
-I/usr/local/src/freeswitch/libs/curl/include 
-I/usr/local/src/freeswitch/src/include 
-I/usr/local/src/freeswitch/src/include 
-I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -Werror 
-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g 
-ggdb -DHAVE_OPENSSL -g -O2 -Wall -std=c99 -pedantic 
-Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c 
/usr/local/src/freeswitch/src/mod/languages/mod_python/mod_python.c -o 
mod_python.o >/dev/null 2>&1
Creating mod_python.la...
/usr/bin/ld: 
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libpython2.7.a(abstract.o): 
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when 
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libpython2.7.a: could 
not read symbols: Bad value
collect2: ld returned 1 exit status
cat: .libs/mod_python.log: No such file or directory
make[5]: *** [mod_python.la] Error 1
make[4]: *** [all] Error 1
make[3]: *** [mod_python-all] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2






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