-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation issue in cflexparser #5
Comments
I think the issue is that the code generated by Cython isn't compatible with Python 3.11 (presumably it was generated for another version). I tried to regenerate it, but it looks like the source code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to compile the cflexparser part of the program, i've ran into compilations erros on my Python.h file. I suspect it is an issue with either my gcc version or with my Python libclang version. since i couldn't find the version you recommend on the documentation, I've opened this issue.
Here's the error if it helps in any way
cc -o clangparser.so -shared clangparser.c -fPIC -I/usr/include/python3.11 -I/usr/include/python3.11 -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -DNDEBUG -g -fwrapv -O3 -Wall -L/usr/lib -lpython3.11 -ldl -lm
clangparser.c: In function ‘__Pyx_PyBytes_Equals’:
clangparser.c:21917:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]
21917 | hash1 = ((PyBytesObject*)s1)->ob_shash;
| ^~~~~
In file included from /usr/include/python3.11/bytesobject.h:62,
from /usr/include/python3.11/Python.h:50,
from clangparser.c:4:
/usr/include/python3.11/cpython/bytesobject.h:7:35: note: declared here
7 | Py_DEPRECATED(3.11) Py_hash_t ob_shash;
| ^~~~~~~~
clangparser.c:21918:13: warning: ‘ob_shash’ is deprecated [-Wdeprecated-declarations]
21918 | hash2 = ((PyBytesObject*)s2)->ob_shash;
| ^~~~~
/usr/include/python3.11/cpython/bytesobject.h:7:35: note: declared here
7 | Py_DEPRECATED(3.11) Py_hash_t ob_shash;
| ^~~~~~~~
clangparser.c: In function ‘__Pyx_AddTraceback’:
clangparser.c:434:61: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
434 | #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
| ^~
clangparser.c:22634:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
22634 | __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
clangparser.c: In function ‘__Pyx_main’:
clangparser.c:22656:9: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations]
22656 | Py_SetProgramName(argv[0]);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.11/Python.h:94:
/usr/include/python3.11/pylifecycle.h:37:38: note: declared here
37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
| ^~~~~~~~~~~~~~~~~
clangparser.c:22659:9: warning: ‘PySys_SetArgv’ is deprecated [-Wdeprecated-declarations]
22659 | PySys_SetArgv(argc, argv);
| ^~~~~~~~~~~~~
In file included from /usr/include/python3.11/Python.h:96:
/usr/include/python3.11/sysmodule.h:13:38: note: declared here
13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
| ^~~~~~~~~~~~~
clangparser.c: In function ‘__Pyx_Coroutine_SendEx’:
clangparser.c:23836:14: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
23836 | f->f_back = PyThreadState_GetFrame(tstate);
| ^~
In file included from /usr/include/python3.11/Python.h:38:
clangparser.c: In function ‘__Pyx_Coroutine_ResetFrameBackpointer’:
clangparser.c:23873:19: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
23873 | Py_CLEAR(f->f_back);
| ^~
/usr/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
24 | #define _Py_CAST(type, expr) ((type)(expr))
| ^~~~
/usr/include/python3.11/object.h:581:29: note: in expansion of macro ‘_PyObject_CAST’
581 | PyObject *_py_tmp = _PyObject_CAST(op);
| ^~~~~~~~~~~~~~
clangparser.c:23873:9: note: in expansion of macro ‘Py_CLEAR’
23873 | Py_CLEAR(f->f_back);
| ^~~~~~~~
In file included from /usr/include/python3.11/Python.h:44:
clangparser.c:23873:19: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
23873 | Py_CLEAR(f->f_back);
| ^~
/usr/include/python3.11/object.h:583:14: note: in definition of macro ‘Py_CLEAR’
583 | (op) = NULL;
| ^~
make: *** [Makefile:12: clangparser.so] Error 1
Thanks in advance.
The text was updated successfully, but these errors were encountered: