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

Build fails on CPython alphas ("3.10") #1627

Closed
Rosuav opened this issue May 26, 2020 · 3 comments
Closed

Build fails on CPython alphas ("3.10") #1627

Rosuav opened this issue May 26, 2020 · 3 comments
Labels
Status: not gevent

Comments

@Rosuav
Copy link

Rosuav commented May 26, 2020

  • gevent version: master branch (currently ed26336)
  • Python version: CPython 3.10 alpha built from git, revision 9645930b5b (master branch as of time of building)
  • Operating System: Debian Linux 9.12 (Stretch) Linux 4.9.0-11-amd6

Description:

gevent fails to build on the current alphas, but worked (with workarounds) on the later alphas and betas of 3.9.

What I've run:

Build CPython from source, install, etc. Create a fresh venv and attempt to install gevent:

$ python3.10 -m venv env
$ source env/bin/activate
$ pip install -U pip
$ pip install cython # optional, doesn't fix anything
$ pip install -v git+git://github.com/gevent/gevent.git

The build fails with this message:

      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/rosuav/asdf/env/include -I/usr/local/include/python3.10 -c greenlet.c -o build/temp.linux-x86_64-3.10/greenlet.o
      greenlet.c: In function ‘g_initialstub’:
      greenlet.c:823:4: warning: ‘PyEval_CallObjectWithKeywords’ is deprecated [-Wdeprecated-declarations]
          result = PyEval_CallObjectWithKeywords(
          ^~~~~~
      In file included from /usr/local/include/python3.10/Python.h:145:0,
                       from greenlet.h:8,
                       from greenlet.c:5:
      /usr/local/include/python3.10/ceval.h:17:43: note: declared here
       Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      greenlet.c: In function ‘green_dealloc’:
      greenlet.c:1046:4: error: ‘_Py_DEC_REFTOTAL’ undeclared (first use in this function)
          _Py_DEC_REFTOTAL;
          ^~~~~~~~~~~~~~~~
      greenlet.c:1046:4: note: each undeclared identifier is reported only once for each function it appears in
      error: command '/usr/bin/gcc' failed with exit code 1

Unsure whether the problem is in gevent or in cython. Not sure how to track down the distinction.

@jamadden
Copy link
Member

jamadden commented May 26, 2020

Thanks for the report.

These errors belong to greenlet, the underlying green-threads library.

For 3.9, @vstinner submitted patches to greenlet to account for the breaking API changes. I think perhaps those are the same API changes you're seeing here, they just haven't been released yet.

@jamadden jamadden added the Status: not gevent label May 26, 2020
@Rosuav
Copy link
Author

Rosuav commented May 26, 2020

Ah, cool. Thanks. I'll check back later on; for now, I just have to run things in 3.9.

@vstinner
Copy link
Contributor

vstinner commented May 26, 2020

For 3.9, @vstinner submitted patches to greenlet to account for the breaking API changes.

There is no release including my fix: the latest one was done 2 years ago, https://pypi.org/project/greenlet/#history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: not gevent
Projects
None yet
Development

No branches or pull requests

3 participants