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

Doesn't build for Python 3.11 #52

Closed
tunecrew opened this issue May 10, 2022 · 5 comments
Closed

Doesn't build for Python 3.11 #52

tunecrew opened this issue May 10, 2022 · 5 comments

Comments

@tunecrew
Copy link

Attempting to build unicodedata2 in a docker container (aarch64/amd64). Works fine using Python 3.10.4-slim-bullseye base image. Build fails using Python 3.11.0b1-slim-bullseye base image. No other changes made to the build process except the base container.

Error is as follows:

#17 17.42   Running setup.py install for unicodedata2: started
#17 17.42   Running command Running setup.py install for unicodedata2
#17 17.73   running build_ext
#17 17.74   building 'unicodedata2' extension
#17 17.74   creating build
#17 17.74   creating build/temp.linux-aarch64-cpython-311
#17 17.74   creating build/temp.linux-aarch64-cpython-311/unicodedata2
#17 17.74   gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I./unicodedata2/ -I/usr/local/include/python3.11 -c ./unicodedata2/unicodectype.c -o build/temp.linux-aarch64-cpython-311/./unicodedata2/unicodectype.o
#17 18.07   gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I./unicodedata2/ -I/usr/local/include/python3.11 -c ./unicodedata2/unicodedata.c -o build/temp.linux-aarch64-cpython-311/./unicodedata2/unicodedata.o
#17 18.39   ./unicodedata2/unicodedata.c: In function ‘PyInit_unicodedata2’:
#17 18.39   ./unicodedata2/unicodedata.c:1362:24: error: lvalue required as left operand of assignment
#17 18.39    1362 |     Py_TYPE(&UCD_Type) = &PyType_Type;
#17 18.39         |                        ^
#17 18.41   error: command '/usr/bin/gcc' failed with exit code 1
#17 18.43   error: subprocess-exited-with-error
@jenskutilek
Copy link

I'm getting a similar error with the release version of Python 3.11:

Building wheel for unicodedata2 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'unicodedata2' extension
      creating build
      creating build/temp.macosx-10.9-universal2-cpython-311
      creating build/temp.macosx-10.9-universal2-cpython-311/unicodedata2
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I./unicodedata2/ -I/Users/kuti/Code/variable-fonts/venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c ./unicodedata2/unicodectype.c -o build/temp.macosx-10.9-universal2-cpython-311/./unicodedata2/unicodectype.o
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I./unicodedata2/ -I/Users/kuti/Code/variable-fonts/venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c ./unicodedata2/unicodedata.c -o build/temp.macosx-10.9-universal2-cpython-311/./unicodedata2/unicodedata.o
      ./unicodedata2/unicodedata.c:1362:24: error: expression is not assignable
          Py_TYPE(&UCD_Type) = &PyType_Type;
          ~~~~~~~~~~~~~~~~~~ ^
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

@jenskutilek
Copy link

This just happens for the PyPI version. I can build and install from git just fine.

@anthrotype
Copy link
Member

This just happens for the PyPI version. I can build and install from git just fine.

we need to tag a new release for 15.0.0. I'd like to merge @SnoopJ's PR #58 first. I'm waiting to hear if that's ready, after which I'll tag a release

@SnoopJ
Copy link
Collaborator

SnoopJ commented Oct 28, 2022

This is caused by some upstream churn in the C API.

See #54 for the changes that fix this issue, but it sounds like there may be a new release coming that includes the fix anyway :)

@anthrotype
Copy link
Member

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