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]
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’; did you mean ‘PyBytes_AsString’? [-Werror=implicit-function-declaration]
strcat(buffer, PyString_AsString(pyString));
^~~~~~~~~~~~~~~~~
PyBytes_AsString
mod_python.c:108:18: error: passing argument 2 of ‘strcat’ makes pointer from integer without a cast [-Werror=int-conversion]
strcat(buffer, PyString_AsString(pyString));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.7m/Python.h:30,
from mod_python.c:35:
/usr/x86_64-linux-gnu/include/string.h:129:14: note: expected ‘const char * restrict’ but argument is of type ‘int’
extern char *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]
strcat(buffer, PyString_AsString(pyString));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.7m/Python.h:30,
from mod_python.c:35:
/usr/x86_64-linux-gnu/include/string.h:129:14: note: expected ‘const char * restrict’ but argument is of type ‘int’
extern char *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]
strcat(buffer, PyString_AsString(pyResult));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.7m/Python.h:30,
from mod_python.c:35:
/usr/x86_64-linux-gnu/include/string.h:129:14: note: expected ‘const char * restrict’ but argument is of type ‘int’
extern char *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=]
sprintf((char*)sTemp, "\n\tFile: \"%s\", line %i, in %s",
~^
%d
PyString_AsString(pyTB->tb_frame->f_code->co_filename),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_python.c:153:58: error: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Werror=format=]
sprintf((char*)sTemp, "\n\tFile: \"%s\", line %i, in %s",
~^
%d
mod_python.c:156:6:
PyString_AsString(pyTB->tb_frame->f_code->co_name) );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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]
*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]
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
PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
^~~~~~~~~~~~~~~~~~
mod_python.c:645:2: error: ‘PyEval_AcquireLock’ is deprecated [-Werror=deprecated-declarations]
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
PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:743: mod_python_la-mod_python.lo] Error 1
With Best Regards,
Girish Dharmaraj