Skip to content
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

C files need re-building with newer Cython for Python 3.7 compatibility #18

Closed
dfateyev opened this issue Jul 31, 2018 · 5 comments
Closed
Assignees
Labels

Comments

@dfateyev
Copy link

I have just tried to build the current snapshot, and there is an issue on python3.7:

src/llfuse.c:46967:16: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
   {"__exit__", (PyCFunction)__pyx_pw_6llfuse_13NoLockManager_5__exit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6llfuse_13NoLockManager_4__exit__},
                ^
src/llfuse.c: In function ‘__Pyx_PyCFunction_FastCall’:
src/llfuse.c:52240:19: warning: cast between incompatible function types from ‘PyCFunction’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t,  PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object * const*, long int,  struct _object *)’} [-Wcast-function-type]
         return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
                   ^
src/llfuse.c:52242:19: warning: cast between incompatible function types from ‘PyCFunction’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t)’ {aka ‘struct _object * (*)(struct _object *, struct _object * const*, long int)’} [-Wcast-function-type]
         return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
                   ^
src/llfuse.c: In function ‘__Pyx__ExceptionSave’:
src/llfuse.c:52536:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     *type = tstate->exc_type;
                     ^~~~~~~~
                     curexc_type
src/llfuse.c:52537:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     *value = tstate->exc_value;
                      ^~~~~~~~~
...
src/llfuse.c: In function ‘__Pyx_CyFunction_CallMethod’:
src/llfuse.c:53799:18: warning: cast between incompatible function types from ‘PyCFunction’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} [-Wcast-function-type]
         return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
                  ^
error: command 'gcc' failed with exit status 1

Although under python2.7 there are no issues.
Some build logs:
https://kojipkgs.fedoraproject.org//work/tasks/2675/28742675/build.log
https://kojipkgs.fedoraproject.org//work/tasks/2671/28742671/build.log

@Nikratio
Copy link
Contributor

Nikratio commented Aug 1, 2018

Thanks for the report! This needs to be fixed in Cython. Probably it already has been fixed, so the problem will disappear when re-generating the .c file with a more recent Cython version. Will keep this bug open as a reminder to upgrade Cython before the next release, but you can already do this locally (setup.py build_cython).

@Nikratio Nikratio changed the title Build issue: no member named ‘exc_value' C files need re-building with newer Cython for Python 3.7 compatibility Aug 1, 2018
@Nikratio Nikratio self-assigned this Aug 1, 2018
@Nikratio Nikratio added the bug label Aug 1, 2018
@dfateyev
Copy link
Author

dfateyev commented Aug 2, 2018

Managed to build it with Cython-0.28.4 (earlier versions, e.g. 0.27.1, were failing).
Do you have any plans to prepare a new release which includes all recent fixes?
Thanks!

@Nikratio
Copy link
Contributor

Nikratio commented Aug 5, 2018

Next release is scheduled for 8/24.

@dfateyev
Copy link
Author

I would call to release it sooner, due to the situation we haven't got a stable build everywhere because of various Cython issues. To my experience, at least Cython-0.28.4 appeared to be working against the repo snapshot.
In all cases, please provide us with RC before the release, it would allow to test it under various environments. Thanks in advance.

@Nikratio
Copy link
Contributor

Should be fixed in release 1.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants