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

Update accelerate generate C with Cython v3 #87

Open
EpicWink opened this issue Sep 13, 2022 · 1 comment
Open

Update accelerate generate C with Cython v3 #87

EpicWink opened this issue Sep 13, 2022 · 1 comment

Comments

@EpicWink
Copy link
Contributor

EpicWink commented Sep 13, 2022

An error occurs during the building of accelerate on Python 3.11 with Cython 0.29. Works fine with Cython 3.0a11. Re-generating source should work for Python 3.6+

Failing

docker run --rm -it python:3.11-rc bash
pip install git+https://github.com/mcfletch/pyopengl.git@227f9c6#subdirectory=accelerate

Output

building 'OpenGL_accelerate.wrapper' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-req-build-gz8ht9om/accelerate/.. -I/tmp/pip-req-build-gz8ht9om/accelerate/src -I/tmp/pip-req-build-gz8ht9om/accelerate -I/usr/local/include/python3.11 -c src/wrapper.c -o build/temp.linux-x86_64-cpython-311/src/wrapper.o
      src/wrapper.c: In function ‘__Pyx_AddTraceback’:
      src/wrapper.c:438:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
        438 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
            |                                                              ^~
      src/wrapper.c:28232:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
      28232 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1

Environment

  • OS: Debian 11 Bullseye (Docker)
  • Python 3.11rc2
  • Cython 0.29.32
  • Pip 22.2.2

Succeeding

docker run --rm -it python:3.11-rc bash
pip install 'cython >= 3.0a11'
pip install pyopengl-accelerate
@mcfletch
Copy link
Owner

mcfletch commented Aug 8, 2023

Wrappers generated with Cython v3 are checked in on develop, should be in next release.

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

2 participants