mod_python build error
Tamer Higazi
th982a at googlemail.com
Thu Jul 23 08:32:02 UTC 2020
Hi people,
mod_python fails to build. Any ideas why that happen ?
best, Tamer
making all mod_python
make[5]: Entering directory
'/usr/local/src/freeswitch/src/mod/languages/mod_python'
CC mod_python_la-mod_python.lo
mod_python.c: In function 'print_python_error':
mod_python.c:107:66: error: implicit declaration of function
'PyString_Check'; did you mean 'PyMapping_Check'?
[-Werror=implicit-function-declaration]
107 | if (pyType != NULL && (pyString=PyObject_Str(pyType))!=NULL &&
(PyString_Check(pyString))) {
| ^~~~~~~~~~~~~~
| PyMapping_Check
mod_python.c:108:18: error: implicit declaration of function
'PyString_AsString' [-Werror=implicit-function-declaration]
108 | strcat(buffer, PyString_AsString(pyString));
| ^~~~~~~~~~~~~~~~~
mod_python.c:108:18: error: passing argument 2 of 'strcat' makes pointer
from integer without a cast [-Werror=int-conversion]
108 | strcat(buffer, PyString_AsString(pyString));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from /usr/include/features.h:450,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/limits.h:26,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:194,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/python3.7m/Python.h:11,
from mod_python.c:35:
/usr/include/bits/string_fortified.h:126:1: note: expected 'const char *
restrict' but argument is of type 'int'
126 | __NTH (strcat (char *__restrict __dest, const char *__restrict
__src))
| ^~~~~
mod_python.c:118:18: error: passing argument 2 of 'strcat' makes pointer
from integer without a cast [-Werror=int-conversion]
118 | strcat(buffer, PyString_AsString(pyString));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from /usr/include/features.h:450,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/limits.h:26,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:194,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/python3.7m/Python.h:11,
from mod_python.c:35:
/usr/include/bits/string_fortified.h:126:1: note: expected 'const char *
restrict' but argument is of type 'int'
126 | __NTH (strcat (char *__restrict __dest, const char *__restrict
__src))
| ^~~~~
mod_python.c:136:21: error: passing argument 2 of 'strcat' makes pointer
from integer without a cast [-Werror=int-conversion]
136 | strcat(buffer, PyString_AsString(pyResult));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from /usr/include/features.h:450,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/limits.h:26,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:194,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/python3.7m/Python.h:11,
from mod_python.c:35:
/usr/include/bits/string_fortified.h:126:1: note: expected 'const char *
restrict' but argument is of type 'int'
126 | __NTH (strcat (char *__restrict __dest, const char *__restrict
__src))
| ^~~~~
mod_python.c:153:40: error: format '%s' expects argument of type 'char
*', but argument 3 has type 'int' [-Werror=format=]
153 | sprintf((char*)sTemp, "\n\tFile: \"%s\", line %i, in %s",
| ~^
| |
| char *
| %d
154 | PyString_AsString(pyTB->tb_frame->f_code->co_filename),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
mod_python.c:153:58: error: format '%s' expects argument of type 'char
*', but argument 5 has type 'int' [-Werror=format=]
153 | sprintf((char*)sTemp, "\n\tFile: \"%s\", line %i, in %s",
| ~^
| |
| char *
| %d
......
156 | PyString_AsString(pyTB->tb_frame->f_code->co_name) );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
mod_python.c: In function 'eval_some_python':
mod_python.c:313:18: error: cast to pointer from integer of different
size [-Werror=int-to-pointer-cast]
313 | *str = strdup((char *) PyString_AsString(result));
| ^
mod_python.c: In function 'mod_python_shutdown':
mod_python.c:608:2: error: 'PyEval_AcquireLock' is deprecated
[-Werror=deprecated-declarations]
608 | PyEval_AcquireLock();
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.7m/Python.h:141,
from mod_python.c:35:
/usr/include/python3.7m/ceval.h:198:18: note: declared here
198 | PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
| ^~~~~~~~~~~~~~~~~~
mod_python.c:645:2: error: 'PyEval_AcquireLock' is deprecated
[-Werror=deprecated-declarations]
645 | PyEval_AcquireLock();
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.7m/Python.h:141,
from mod_python.c:35:
/usr/include/python3.7m/ceval.h:198:18: note: declared here
198 | PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:738: mod_python_la-mod_python.lo] Error 1
make[5]: Leaving directory
'/usr/local/src/freeswitch/src/mod/languages/mod_python'
make[4]: *** [Makefile:707: mod_python-all] Error 1
make[4]: Leaving directory '/usr/local/src/freeswitch/src/mod'
make[3]: *** [Makefile:608: all-recursive] Error 1
make[3]: Leaving directory '/usr/local/src/freeswitch/src'
make[2]: *** [Makefile:3741: all-recursive] Error 1
make[2]: Leaving directory '/usr/local/src/freeswitch'
make[1]: *** [Makefile:1448: all] Error 2
make[1]: Leaving directory '/usr/local/src/freeswitch'
make: *** [Makefile:4724: current] Error 2
tamer at tux /usr/local/src/freeswitch $
More information about the FreeSWITCH-users
mailing list