[New-bugs-announce] [issue42835] Can't Built libxml2 When Using Python 3.9.x
Michael L. Boom
report at bugs.python.org
Tue Jan 5 18:53:31 EST 2021
New submission from Michael L. Boom <mikeboom at mikeboom.com>:
When building libxml2 using Python 3.9.0 or Python 3.9.1 and gcc 10.2.0 I get the below error. Others are having this problem according to my Google search.
make[4]: Entering directory '/local/users/michael.l.boom/gits/scoring_engine/git/aae_tmp_dir/libxml2-2.9.10/python'
CC libxml.lo
CC libxml2-py.lo
CC types.lo
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:85,
from libxml_wrap.h:1,
from types.c:9:
types.c: In function ‘libxml_xmlXPathObjectPtrConvert’:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41: error: expected ‘(’ before ‘PyType_HasFeature’
633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
| ^~~~~~~~~~~~~~~~~
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/longobject.h:15:9: note: in expansion of macro ‘PyType_FastSubclass’
15 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)
| ^~~~~~~~~~~~~~~~~~~
types.c:607:15: note: in expansion of macro ‘PyLong_Check’
607 | } else if PyLong_Check(obj) {
| ^~~~~~~~~~~~
types.c:607:33: error: expected ‘;’ before ‘{’ token
607 | } else if PyLong_Check(obj) {
| ^
libxml.c: In function ‘xmlPythonFileCloseRaw’:
libxml.c:259:5: warning: ‘PyEval_CallMethod’ is deprecated [-Wdeprecated-declarations]
259 | ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
| ^~~
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43: note: declared here
28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
| ^~~~~~~~~~~~~~~~~
libxml.c: In function ‘xmlPythonFileReadRaw’:
libxml.c:289:5: warning: ‘PyEval_CallMethod’ is deprecated [-Wdeprecated-declarations]
289 | ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
| ^~~
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43: note: declared here
28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
| ^~~~~~~~~~~~~~~~~
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:85,
from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41: error: expected ‘(’ before ‘PyType_HasFeature’
633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
| ^~~~~~~~~~~~~~~~~
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/unicodeobject.h:115:18: note: in expansion of macro ‘PyType_FastSubclass’
115 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS)
| ^~~~~~~~~~~~~~~~~~~
libxml.c:297:15: note: in expansion of macro ‘PyUnicode_Check’
297 | } else if PyUnicode_Check (ret) {
| ^~~~~~~~~~~~~~~
libxml.c:297:37: error: expected ‘;’ before ‘{’ token
297 | } else if PyUnicode_Check (ret) {
| ^
libxml.c: In function ‘xmlPythonFileRead’:
libxml.c:354:5: warning: ‘PyEval_CallMethod’ is deprecated [-Wdeprecated-declarations]
354 | ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len);
| ^~~
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43: note: declared here
28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
| ^~~~~~~~~~~~~~~~~
In file included from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
from /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:85,
from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41: error: expected ‘(’ before ‘PyType_HasFeature’
633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
| ^~~~~~~~~~~~~~~~~
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/unicodeobject.h:115:18: note: in expansion of macro ‘PyType_FastSubclass’
115 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS)
| ^~~~~~~~~~~~~~~~~~~
libxml.c:362:15: note: in expansion of macro ‘PyUnicode_Check’
362 | } else if PyUnicode_Check (ret) {
| ^~~~~~~~~~~~~~~
libxml.c:362:37: error: expected ‘;’ before ‘{’ token
362 | } else if PyUnicode_Check (ret) {
| ^
----------
components: C API
messages: 384443
nosy: boom0192
priority: normal
severity: normal
status: open
title: Can't Built libxml2 When Using Python 3.9.x
type: compile error
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42835>
_______________________________________
More information about the New-bugs-announce
mailing list