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

conversion to Py_UNICODE issue #19

Closed
dfateyev opened this issue Aug 15, 2018 · 5 comments
Closed

conversion to Py_UNICODE issue #19

dfateyev opened this issue Aug 15, 2018 · 5 comments

Comments

@dfateyev
Copy link

Another weird build issue, reproduced under Cython 0.28.5.
Cannot build llfuse-1.3.4 for some architectures (failed for x86_64 and i686; although works fine with ppc64le, ppc64le, aarch64, s390x and armv7hl ):

src/llfuse.c:53780:76: warning: cast between incompatible function types from 'int (*)(__pyx_CyFunctionObject *, PyObject *)' {aka 'int (*)(struct <anonymous> *, struct _object *)'} to 'int (*)(PyObject *, PyObject *, void *)' {aka 'int (*)(struct _object *, struct _object *, void *)'} [-Wcast-function-type]
     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
                                                                            ^
src/llfuse.c: In function '__Pyx_CyFunction_CallMethod':
src/llfuse.c:53932: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);
                  ^
src/llfuse.c: In function '__Pyx_PyUnicode_BuildFromAscii':
src/llfuse.c:54161:67: error: conversion to 'Py_UNICODE' {aka 'unsigned int'} from 'char' may change the sign of the result [-Werror=sign-conversion]
             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
                                                                   ^~~~~~~~~~~~
src/llfuse.c:420:83: note: in definition of macro '__Pyx_PyUnicode_WRITE'
   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
                                                                                   ^~
src/llfuse.c:54165:71: error: conversion to 'Py_UNICODE' {aka 'unsigned int'} from 'char' may change the sign of the result [-Werror=sign-conversion]
         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
                                                                       ^~~~~
src/llfuse.c:420:83: note: in definition of macro '__Pyx_PyUnicode_WRITE'
   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
                                                                                   ^~
cc1: some warnings being treated as errors
error: command 'gcc' failed with exit status 1

Probably requires another patch from the repo.

Detailed build logs:
x64, fail: https://kojipkgs.fedoraproject.org//work/tasks/751/29090751/build.log
armv7hl, success: https://kojipkgs.fedoraproject.org//work/tasks/756/29090756/build.log

@Nikratio
Copy link
Contributor

Thanks for the report! This is a Cython bug, it'd be great if you could report it on the Cython bugtracker.

@cfergeau
Copy link

dfb7d2b avoids this failure though when building from a tarball.

@hroncok
Copy link

hroncok commented Aug 30, 2018

Actually, if I recythonize the sources, I get this instead:

src/llfuse.c: In function '__pyx_f_6llfuse_fuse_setxattr':
src/llfuse.c:22793:60: error: 'ENOATTR' undeclared (first use in this function); did you mean 'ENOTTY'?
                           __pyx_t_8 = __Pyx_PyInt_From_int(ENOATTR); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 582, __pyx_L63_error)
                                                            ^~~~~~~
                                                            ENOTTY

@cfergeau
Copy link

This is #17

@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants