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

Unable to build accelerate in Python 3.10 #74

Closed
EpicWink opened this issue Feb 1, 2022 · 4 comments
Closed

Unable to build accelerate in Python 3.10 #74

EpicWink opened this issue Feb 1, 2022 · 4 comments

Comments

@EpicWink
Copy link
Contributor

EpicWink commented Feb 1, 2022

I'm trying to build pyopengl-accelerate from source with Python 3.10, but it fails

Reproduction

In the python:3.10-slim Docker image

apt-get update
apt-get install --no-install-recommends --yes gcc libc-dev
CFLAGS='-w' pip install pyopengl-accelerate

Output

...
  building 'OpenGL_accelerate.vbo' extension
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-3kj0w2ta/pyopengl-accelerate_e7c1731c504840c7946394c691718911/.. -I/tmp/pip-install-3kj0w2ta/pyopengl-accelerate_e7c1731c504840c7946394c691718911/src -I/tmp/pip-install-3kj0w2ta/pyopengl-accelerate_e7c1731c504840c7946394c691718911 -I/usr/local/include/python3.10 -c src/vbo.c -o build/temp.linux-x86_64-3.10/src/vbo.o
  src/vbo.c: In function ‘__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBO’:
  src/vbo.c:11131:5: error: lvalue required as increment operand
  11131 |     ++Py_REFCNT(o);
        |     ^~
  src/vbo.c:11133:5: error: lvalue required as decrement operand
  11133 |     --Py_REFCNT(o);
        |     ^~
  src/vbo.c: In function ‘__pyx_tp_dealloc_17OpenGL_accelerate_3vbo_VBOOffset’:
  src/vbo.c:11619:5: error: lvalue required as increment operand
  11619 |     ++Py_REFCNT(o);
        |     ^~
  src/vbo.c:11621:5: error: lvalue required as decrement operand
  11621 |     --Py_REFCNT(o);
        |     ^~
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyopengl-accelerate

Environment

In Docker image python:3.10-slim

  • Python: 3.10.1 (CPython)
  • Pip: 21.2.4
  • Linux: 5.13.0-27-generic #29~20.04.1-Ubuntu
  • GCC: Debian 10.2.1-6
  • C stad-lib: 2.31-13+deb11u2
  • pyopengl-accelerate (source): 3.1.5
@EpicWink
Copy link
Contributor Author

Fixed with cee6534 and b485dde, released in v3.1.6

@cv3d
Copy link

cv3d commented Aug 19, 2022

Hi guys, seems only Windows got v3.1.6 on the pip repository, but what about Linux users? Thanks~

$ lsb_release -d
Description:	Ubuntu 22.04.1 LTS
$ python3 --version
Python 3.10.4
$ sudo pip3 install PyOpenGL-accelerate==3.1.6
ERROR: Could not find a version that satisfies the requirement PyOpenGL-accelerate===3.1.6 (from versions: 3.0.1b1, 3.0.1b2, 3.0.1, 3.0.2a1, 3.0.2b2, 3.0.2, 3.1.0a1, 3.1.0a3, 3.1.0b1, 3.1.0b2, 3.1.0b3, 3.1.0, 3.1.1a1, 3.1.3b1, 3.1.3rc1, 3.1.4, 3.1.5)
ERROR: No matching distribution found for PyOpenGL-accelerate==3.1.6

For now, seems installing from git is the only way for Linux users.

sudo pip3 install git+https://github.com/mcfletch/pyopengl.git@227f9c66976d9f5dadf62b9a97e6beaec84831ca#subdirectory=accelerate

@EpicWink
Copy link
Contributor Author

Hi guys, seems only Windows got v3.1.6 on the pip repository, but what about Linux users? Thanks~

@cv3d See #78, and could be fixed by #84 or #85

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

Successfully merging a pull request may close this issue.

2 participants