#285 ✓resolved
Bastien Nocera

Can't compile Cython bindings

Reported by Bastien Nocera | September 13th, 2012 @ 01:36 PM | in 1.2.0 Release

Using current git master with Cython-0.17-1.fc18.x86_64

make[2]: Entrando no diretório `/home/hadess/Projects/jhbuild/libimobiledevice/cython'
/usr/bin/cython -I/usr/include/plist/cython -I../src -o imobiledevice.c imobiledevice.pyx

Error compiling Cython file:

...

cpdef disconnect(self):
    cdef idevice_error_t err
    err = idevice_disconnect(self._c_connection)
    self.handle_error(err)

cdef inline BaseError _error(self, int16_t ret):
    ^

imobiledevice.pyx:133:9: Overriding final methods is not allowed

Error compiling Cython file:

...

def __dealloc__(self):
    if self._c_dev is not NULL:
        self.handle_error(idevice_free(self._c_dev))

cdef inline BaseError _error(self, int16_t ret):
    ^

imobiledevice.pyx:151:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    return lockdownd_send(self._c_client, node)

cdef inline int16_t _receive(self, plist.plist_t* node):
    return lockdownd_receive(self._c_client, node)

cdef inline BaseError _error(self, int16_t ret):
    ^

lockdown.pxi:277:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    return mobilesync_send(self._c_client, node)

cdef int16_t _receive(self, plist.plist_t* node):
    return mobilesync_receive(self._c_client, node)

cdef inline BaseError _error(self, int16_t ret):
    ^

mobilesync.pxi:158:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    cdef np_error_t err
    if self._c_client is not NULL:
        err = np_client_free(self._c_client)
        self.handle_error(err)

cdef inline BaseError _error(self, int16_t ret):
    ^

notification_proxy.pxi:100:9: Overriding final methods is not allowed

Error compiling Cython file:

...

def __dealloc__(self):
    if self._c_client is not NULL:
        err = sbservices_client_free(self._c_client)
        self.handle_error(err)

cdef inline BaseError _error(self, int16_t ret):
    ^

sbservices.pxi:40:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    return mobilebackup_send(self._c_client, node)

cdef inline int16_t _receive(self, plist.plist_t* node):
    return mobilebackup_receive(self._c_client, node)

cdef inline BaseError _error(self, int16_t ret):
    ^

mobilebackup.pxi:50:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    finally:
        free(c_data)

    return bytes_written

cdef inline BaseError _error(self, int16_t ret):
    ^

afc.pxi:149:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    cdef afc_error_t err
    if self._c_client is not NULL:
        err = afc_client_free(self._c_client)
        self.handle_error(err)

cdef BaseError _error(self, int16_t ret):
    ^

afc.pxi:165:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    err = file_relay_request_sources(self._c_client, <const_sources_t>c_sources, &conn._c_connection)
    free(c_sources)
    self.handle_error(err)
    return conn

cdef inline BaseError _error(self, int16_t ret):
    ^

file_relay.pxi:65:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    except Exception, e:
        if c_data != NULL:
            free(c_data)
        raise

cdef inline BaseError _error(self, int16_t ret):
    ^

screenshotr.pxi:61:9: Overriding final methods is not allowed

Error compiling Cython file:

...

        raise
    finally:
        if free_options:
            plist.plist_free(c_options)

cdef inline BaseError _error(self, int16_t ret):
    ^

installation_proxy.pxi:284:9: Overriding final methods is not allowed

Error compiling Cython file:

...

    cdef mobile_image_mounter_error_t err
    if self._c_client is not NULL:
        err = mobile_image_mounter_free(self._c_client)
        self.handle_error(err)

cdef inline BaseError _error(self, int16_t ret):
    ^

mobile_image_mounter.pxi:43:9: Overriding final methods is not allowed

Error compiling Cython file:

...

        try:
            self.handle_error(err)
            return udid
        except Exception, e:
            if udid != NULL:
                free(udid)
                   ^

imobiledevice.pyx:182:24: undeclared name not builtin: free

Error compiling Cython file:

...

            while infos[i]:
                info = infos[i]
                result.append(info)
                free(infos[i])
                i = i + 1
            free(infos)
                     ^

afc.pxi:187:26: Cannot convert 'char **' to Python object

Error compiling Cython file:

...

            while dir_list[i]:
                f = dir_list[i]
                result.append(f)
                free(dir_list[i])
                i = i + 1
            free(dir_list)
                        ^

afc.pxi:210:29: Cannot convert 'char **' to Python object

Error compiling Cython file:

...

            while c_result[i]:
                info = c_result[i]
                result.append(info)
                free(c_result[i])
                i = i + 1
            free(c_result)
                        ^

afc.pxi:259:29: Cannot convert 'char **' to Python object

Error compiling Cython file:

...

cpdef iDeviceConnection request_sources(self, list sources):
    cdef:
        file_relay_error_t err
        Py_ssize_t count = len(sources)
        char** c_sources = <char**>malloc(sizeof(char*) * (count + 1))
                                        ^

file_relay.pxi:53:45: undeclared name not builtin: malloc

Error compiling Cython file:

...

cpdef iDeviceConnection request_sources(self, list sources):
    cdef:
        file_relay_error_t err
        Py_ssize_t count = len(sources)
        char** c_sources = <char**>malloc(sizeof(char*) * (count + 1))
                          ^

file_relay.pxi:53:31: Casting temporary Python object to non-numeric non-Python type

Error compiling Cython file:

...

cpdef iDeviceConnection request_sources(self, list sources):
    cdef:
        file_relay_error_t err
        Py_ssize_t count = len(sources)
        char** c_sources = <char**>malloc(sizeof(char*) * (count + 1))
                          ^

file_relay.pxi:53:31: Python objects cannot be cast to pointers of primitive types

Error compiling Cython file:

...

    for i, value in enumerate(sources):
        c_sources[i] = value
    c_sources[count] = NULL

    err = file_relay_request_sources(self._c_client, <const_sources_t>c_sources, &conn._c_connection)
    free(c_sources)
                 ^

file_relay.pxi:61:22: Cannot convert 'char **' to Python object

Comments and changes to this ticket

  • Martin S.

    Martin S. September 13th, 2012 @ 05:27 PM

    • State changed from “new” to “open”
    • Tag set to bindings, cython, python
    • Milestone set to 1.2.0 Release
    • Milestone order changed from “190974” to “0”

    I have a bad feeling about dropping Cython again...

    The developers tell me "we don't care about compiler warnings as long as it builds".
    Furthermore it appears each release breaks binding definitions and in a not backwards compatible way.

    Need to start thinking about how to fix this properly and provide consistent Python bindings for all service APIs in the longterm.

  • Martin S.

    Martin S. February 27th, 2013 @ 02:21 PM

    • State changed from “open” to “resolved”
    • Assigned user set to “Martin S.”

    Fixed in git master.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

Pages