renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
325 stars 63 forks source link

Compile problem: Exception values are incompatible. #151

Closed patlefort closed 5 months ago

patlefort commented 5 months ago

Example:

Error compiling Cython file:
------------------------------------------------------------
...
            sf.base = base
            sf.length = length
            sf.tell = 0

            rv = SDL_AllocRW()
            rv.size = subfile_size
                      ^
------------------------------------------------------------

src/pygame_sdl2/rwobject.pyx:453:22: Cannot assign type 'Sint64 (SDL_RWops *) except? -1 nogil' to 'Sint64 (*)(SDL_RWops *) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to type 'Sint64 (SDL_RWops *) except? -1 nogil'.

pygame_sdl2.log

This is on Arch Linux.

renpytom commented 5 months ago

You need Cython 2 to compile. Cython 3 will be compatible soon, but not yet.

patlefort commented 5 months ago

Thanks, that pointed me in the right direction. I had to use cython0 rather than cython2 or cython package. The official package using cython package as dependency had me confused.